conditionally, create and use am__foo_SOURCES_DIST for distribution.
* tests/condd.test: Extend to check distributed files.
* tests/substref.test: Make sure we don't use such a variable when
it's not needed.
Reported by Marcus Brinkmann.
+2002-10-01 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * automake.in (handle_source_transform): If foo_SOURCES is defined
+ conditionally, create and use am__foo_SOURCES_DIST for distribution.
+ * tests/condd.test: Extend to check distributed files.
+ * tests/substref.test: Make sure we don't use such a variable when
+ it's not needed.
+ Reported by Marcus Brinkmann.
+
2002-09-30 Ezra Peisach <epeisach@MED-XTAL.BU.EDU>
* tests/defs.in: Run $MAKE --version -v.
Maciej Stachowiak mstachow@mit.edu
Maciej W. Rozycki macro@ds2.pg.gda.pl
Manu Rouat emmanuel.rouat@wanadoo.fr
+Marcus Brinkmann Marcus.Brinkmann@ruhr-uni-bochum.de
Marcus G. Daniels mgd@ute.santafe.edu
Marius Vollmer mvo@zagadka.ping.de
Mark Eichin eichin@cygnus.com
unless $prefix =~ /EXTRA_/;
push @sources, "\$($var)";
- push @dist_sources, "\$($var)"
- unless $prefix =~ /^nodist_/;
+ if ($prefix !~ /^nodist_/)
+ {
+ # If the VAR wasn't definined conditionally, we add
+ # it to DIST_SOURCES as is. Otherwise we create a
+ # am__VAR_DIST variable which contains all possible values,
+ # and add this variable to DIST_SOURCES.
+ my $distvar = "$var";
+ my @conds = variable_conditions_recursive ($var);
+ if (@conds && $conds[0] ne 'TRUE')
+ {
+ $distvar = "am__${var}_DIST";
+ my @files =
+ uniq (variable_value_as_list_recursive ($var, 'all'));
+ define_pretty_variable ($distvar, '', $where, @files);
+ }
+ push @dist_sources, "\$($distvar)"
+ }
@substfroms = ();
@substtos = ();
. ./defs || exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
-AM_CONDITIONAL(COND1, true)
+AM_CONDITIONAL(COND1, false)
+AC_CONFIG_FILES([foo/Makefile])
+AC_CONFIG_FILES([bar/Makefile])
+AC_OUTPUT
END
cat > Makefile.am << 'END'
else
hello_SOURCES += hello-generic.c
endif
+
+test: distdir
+ test -f $(distdir)/foo/Makefile.am
+ test -f $(distdir)/bar/Makefile.am
+ test -f $(distdir)/hello-common.c
+ test -f $(distdir)/hello-cond1.c
+ test -f $(distdir)/hello-generic.c
END
mkdir foo bar
-$ACLOCAL || exit 1
+: > foo/Makefile.am
+: > bar/Makefile.am
+: > hello-common.c
+: > hello-cond1.c
+: > hello-generic.c
+
+$ACLOCAL
+$AUTOCONF
$AUTOMAKE
+./configure
+$MAKE test
val=`$MAKE -s echorule`;
echo $val
test "x$val" = "xdlmain.c dlmain.o"
+
+# This is unrelated to the rest of this test. But while we are
+# at it, make sure we don't use am__helldl_SOURCES_DIST here, since
+# it's not needed. DIST_SOURCES should contains $(helldl_SOURCES).
+grep am__helldl_SOURCES_DIST Makefile && exit 1
+grep 'DIST_SOURCES.*\(helldl_SOURCES\)' Makefile