]> sourceware.org Git - automake.git/commitdiff
* automake.in (handle_source_transform): If foo_SOURCES is defined
authorAlexandre Duret-Lutz <adl@gnu.org>
Tue, 1 Oct 2002 19:59:32 +0000 (19:59 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Tue, 1 Oct 2002 19:59:32 +0000 (19:59 +0000)
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.

ChangeLog
THANKS
automake.in
tests/condd.test
tests/substref.test

index ff3d4fd7f45de3ab31b1ce9e9efa9925b2b39360..4b9bc9c5956a3ed230bea027cda9cce1acd7c519 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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.
diff --git a/THANKS b/THANKS
index dbf94d886271727497a16670e5431fbbbed6fc0d..8f26ad65a633e9fb15157d279d7499c119c74c8c 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -112,6 +112,7 @@ Laurent Morichetti  laurentm@cup.hp.com
 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
index 8b1835116d8bd424fafe04ec562bd3fd65501a10..14fced53e6f5c920c4d786102e96913d65fdf7f6 100755 (executable)
@@ -2802,8 +2802,23 @@ sub handle_source_transform
          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 = ();
index 127de542af141b47ccd7652441550bf9f1b7677a..244ad5064aae87fb09fdfdb7ac0e7a08ead6d51b 100755 (executable)
 
 . ./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'
@@ -41,9 +46,25 @@ hello_SOURCES += hello-cond1.c
 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
index 37e54cbbe8e71829ade19f9ddf25d9d18fc16bc2..5edc07367c4dcdc3ca4565be56d44fc93c108766 100755 (executable)
@@ -64,3 +64,9 @@ CC='gcc' ./configure
 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
This page took 0.046952 seconds and 5 git commands to generate.