Reputation: 7288
Background: Automake provides different types of distributions. After reading the docs "What Goes in a Distribution" I know how to include extra directories in general. But I'm not sure about the best way to exclude directories in this list for a single rule.
This is the part in current configure.ac
that adds to the dist directories
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build_aux])
And this is the part in current Makefile.am
that adds to the dist directories
SUBDIRS = sources po doc tests
EXTRA_DIST = build_windows
Furthermore Makefile.am
has
AUTOMAKE_OPTIONS = dist-zip
For enabling the zip distribution.
Result: both package.tar.gz
and package.zip
have the same content. Therefore the following directories are included:
Question:
How to exclude build_windows
in package.tar.gz
and m4
in package.zip
?
Upvotes: 0
Views: 615
Reputation: 7288
Long answer:
Different types of distributions only mean different format, but the content of these is designed to be exactly the same.
Therefore the solution for the goal is:
build_windows
from EXTRA_DIST
for having only needed content in the tar.gz distributiondist-zip
from AUTOMAKE_OPTIONS
to prevent auto-generation of package.zipdist-hook
rule to manually:
build_windows
exist (it won't exist if build from package.tar.gz
)package_win.zip
from this folder (use a different name for preventing a possible package.zip
to overwrite the file)Edit: removing anything from the manually created dist folder will break make dist
(or at least make distcheck
), therefore this is only a good idea if you want to remove everything that has to do with autoconf/automake/Makfiles in general
Upvotes: 1
Reputation: 3240
The short version is you don't. Different types of distributions only mean different format, but the content of these is designed to be exactly the same.
Upvotes: 1