]> sourceware.org Git - automake.git/commitdiff
Fix for PR automake/411:
authorAlexandre Duret-Lutz <adl@gnu.org>
Sat, 22 Nov 2003 18:05:34 +0000 (18:05 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sat, 22 Nov 2003 18:05:34 +0000 (18:05 +0000)
* automake.in (rewrite_inputs_into_dependencies): Simplify, and rename
into ...
(prepend_srcdir): ... this.
(rewrite_inputs_into_dependencies): New function, extracted from ...
(handle_configure): ... here.  Adjust to use prepend_srcdir
or rewrite_inputs_into_dependencies where needed.  Especially,
using (the new) rewrite_inputs_into_dependencies to compute
Makefile dependencies will fix PR/411.
* lib/am/configure.am (DIST_COMMON): Remove %MAKEFILE-IN%, it's
already distributed by rewrite_inputs_into_dependencies.
* tests/Makefile.am (TESTS): Add output10.test, remove distcom.test.
* tests/colon3.test: Use set -e.  Don't allow any AUTOMAKE
invocation refer to zardoz.  Make sure two.in and three.in
appear as $(srcdir)/two.in and $(srcdir)/three.in dependencies.
* tests/distcom.test: Delete.  This is covered by tests/output9.test.
* tests/output10.test: New file, for PR/411.

14 files changed:
ChangeLog
Makefile.in
automake.in
doc/Makefile.in
lib/Automake/Makefile.in
lib/Automake/tests/Makefile.in
lib/Makefile.in
lib/am/Makefile.in
lib/am/configure.am
m4/Makefile.in
tests/Makefile.am
tests/Makefile.in
tests/colon3.test
tests/output10.test [moved from tests/distcom.test with 51% similarity]

index f24e6c506b0c3a7decd2287ae14621156f8428c4..8e027e69c027619f678db1a35b4295d68f9fe879 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2003-11-22  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       Fix for PR automake/411:
+       * automake.in (rewrite_inputs_into_dependencies): Simplify, and rename
+       into ...
+       (prepend_srcdir): ... this.
+       (rewrite_inputs_into_dependencies): New function, extracted from ...
+       (handle_configure): ... here.  Adjust to use prepend_srcdir
+       or rewrite_inputs_into_dependencies where needed.  Especially,
+       using (the new) rewrite_inputs_into_dependencies to compute
+       Makefile dependencies will fix PR/411.
+       * lib/am/configure.am (DIST_COMMON): Remove %MAKEFILE-IN%, it's
+       already distributed by rewrite_inputs_into_dependencies.
+       * tests/Makefile.am (TESTS): Add output10.test, remove distcom.test.
+       * tests/colon3.test: Use set -e.  Don't allow any AUTOMAKE
+       invocation refer to zardoz.  Make sure two.in and three.in
+       appear as $(srcdir)/two.in and $(srcdir)/three.in dependencies.
+       * tests/distcom.test: Delete.  This is covered by tests/output9.test.
+       * tests/output10.test: New file, for PR/411.
+
 2003-11-21  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * automake.in (append_exeext): Do not append $(EXEEXT) to
index 1273068c3a4436192aa8fe9319be465c467a9931..e648b63562ee665f82c12a4689477a962755e471 100644 (file)
@@ -35,9 +35,9 @@ NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.in \
-       $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL \
-       Makefile.am NEWS THANKS TODO configure configure.ac
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
+       ChangeLog INSTALL NEWS THANKS TODO configure configure.ac
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \
@@ -171,7 +171,7 @@ all: all-recursive
 .SUFFIXES:
 am--refresh:
        @:
-$(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
index f37c3afc94af965282fbfea25a389fcce4656438..1ee5db42db2198b52ad1b3c72cedb69670190bb6 100755 (executable)
@@ -3441,45 +3441,72 @@ sub scan_aclocal_m4 ()
 }
 
 
-# @DEPENDENCY
-# &rewrite_inputs_into_dependencies ($ADD_SRCDIR, @INPUTS)
-# --------------------------------------------------------
-# Rewrite a list of input files into a form suitable to put on a
-# dependency list.  The idea is that if an input file has a directory
-# part the same as the current directory, then the directory part is
-# simply removed.  But if the directory part is different, then
-# $(top_srcdir) is prepended.  Among other things, this is used to
-# generate the dependency list for the output files generated by
-# AC_OUTPUT.  Consider what the dependencies should look like in this
-# case:
-#   AC_OUTPUT(src/out:src/in1:lib/in2)
-# If the first argument, ADD_SRCDIR, is non-zero (e.g. 1), $(top_srcdir)
-# is added to files which are not in the current directory.
-# If ADD_SRCDIR is a filename and the filename occurs in INPUTS, it
-# will be prefixed with $(srcdir) unless already prefixed by $(top_srcdir)
-# by the above rule.
-sub rewrite_inputs_into_dependencies ($@)
-{
-  my ($add_srcdir, @inputs) = @_;
+# @DEPENDENCIES
+# &prepend_srcdir (@INPUTS)
+# -------------------------
+# Prepend $(srcdir) or $(top_srcdir) to all @INPUTS.  The idea is that
+# if an input file has a directory part the same as the current
+# directory, then the directory part is simply replaced by $(srcdir).
+# But if the directory part is different, then $(top_srcdir) is
+# prepended.
+sub prepend_srcdir (@)
+{
+  my @inputs = @_;
   my @newinputs;
 
   foreach my $single (@inputs)
     {
       if (dirname ($single) eq $relative_dir)
        {
-         push (@newinputs,
-               ($add_srcdir eq $single ? '$(srcdir)/' : '')
-               . basename ($single));
+         push (@newinputs, '$(srcdir)/' . basename ($single));
        }
       else
        {
-         push (@newinputs,
-               ($add_srcdir ? '$(top_srcdir)/' : '') . $single);
+         push (@newinputs, '$(top_srcdir)/' . $single);
        }
     }
   return @newinputs;
 }
 
+# @DEPENDENCIES
+# rewrite_inputs_into_dependencies ($OUTPUT, @INPUTS)
+# ---------------------------------------------------
+# Compute a list of dependencies appropriate for the rebuild
+# rule of
+#   AC_CONFIG_FILES($OUTPUT:$INPUT[0]:$INPUTS[1]:...)
+# Also distribute $INPUTs which are not build by another AC_CONFIG_FILES.
+sub rewrite_inputs_into_dependencies ($@)
+{
+  my ($file, @inputs) = @_;
+  my @res = ();
+
+  for my $i (@inputs)
+    {
+      if (exists $ac_config_files_location{$i})
+       {
+         if (dirname ($i) eq $relative_dir)
+           {
+             $i = basename $i;
+           }
+         else
+           {
+             $i = '$(top_builddir)/' . $i;
+           }
+       }
+      else
+       {
+         msg ('error', $ac_config_files_location{$file},
+              "required file `$i' not found")
+           unless exists $output_files{$i} || -f $i;
+         ($i) = prepend_srcdir ($i);
+         push_dist_common ($i);
+       }
+      push @res, $i;
+    }
+  return @res;
+}
+
+
 
 # &handle_configure ($MAKEFILE_AM, $MAKEFILE_IN, $MAKEFILE, @INPUTS)
 # ------------------------------------------------------------------
@@ -3492,14 +3519,13 @@ sub handle_configure ($$$@)
   prog_error 'empty @inputs'
     unless @inputs;
 
-  my ($rel_makefile_am) = rewrite_inputs_into_dependencies (1, $makefile_am);
-  my ($rel_makefile_in) = rewrite_inputs_into_dependencies ($makefile_in,
+  my ($rel_makefile_am, $rel_makefile_in) = prepend_srcdir ($makefile_am,
                                                            $makefile_in);
   my $rel_makefile = basename $makefile;
 
   my $colon_infile = ':' . join (':', @inputs);
   $colon_infile = '' if $colon_infile eq ":$makefile.in";
-  my @rewritten = rewrite_inputs_into_dependencies ($makefile_in, @inputs);
+  my @rewritten = rewrite_inputs_into_dependencies ($makefile, @inputs);
   my ($regen_aclocal_m4, @aclocal_m4_deps) = scan_aclocal_m4;
   define_pretty_variable ('am__aclocal_m4_deps', TRUE, INTERNAL,
                          @configure_deps, @aclocal_m4_deps,
@@ -3572,9 +3598,9 @@ sub handle_configure ($$$@)
            {
              error $config_header_location, "required file `$in' not found"
                unless -f $in;
-             push_dist_common (rewrite_inputs_into_dependencies (1, $in));
+             push_dist_common (prepend_srcdir ($in));
            }
-         @ins = rewrite_inputs_into_dependencies (1, @ins);
+         @ins = prepend_srcdir (@ins);
 
          # Header defined and in this directory.
          my @files;
@@ -3711,33 +3737,7 @@ sub handle_configure ($$$@)
            }
        }
 
-      # An input file is either output by some other AC_CONFIG_FILES,
-      # or it must exist and be relative to $(top_srcdir).  In the
-      # latter case, we distribute it; in the former, we should not.
-      my @rewritten_inputs = ();
-      for my $i (@inputs)
-       {
-         if (exists $ac_config_files_location{$i})
-           {
-             if (dirname ($i) eq $relative_dir)
-               {
-                 $i = basename $i;
-               }
-             else
-               {
-                 $i = '$(top_builddir)/' . $i;
-               }
-           }
-         else
-           {
-             msg ('error', $ac_config_files_location{$file},
-                  "required file `$i' not found")
-               unless -f $i;
-             ($i) = rewrite_inputs_into_dependencies (1, $i);
-             push_dist_common ($i);
-           }
-         push @rewritten_inputs, $i;
-       }
+      my @rewritten_inputs = rewrite_inputs_into_dependencies ($file, @inputs);
 
       $output_rules .= ($local . ': '
                        . '$(top_builddir)/config.status '
index 0d19f79ebcfcb9149001b3bc21bd66731dbfddba..f3e8e80b697551838b2d9abf0c1e94a6f48e41d0 100644 (file)
@@ -34,6 +34,9 @@ NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 subdir = doc
+DIST_COMMON = $(automake_TEXINFOS) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in $(srcdir)/stamp-vti \
+       $(srcdir)/version.texi
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \
@@ -44,8 +47,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-DIST_COMMON = $(automake_TEXINFOS) $(srcdir)/Makefile.in \
-       $(srcdir)/stamp-vti $(srcdir)/version.texi Makefile.am
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
 SOURCES =
@@ -143,7 +144,7 @@ all: all-am
 
 .SUFFIXES:
 .SUFFIXES: .dvi .html .info .pdf .ps .texi
-$(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
index 219dd9d9b6626f5ab4e8474021db7f6c2fd8f920..85d6d0aa99e566c0392fae823d15f06ae184d15f 100644 (file)
@@ -35,6 +35,8 @@ NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 subdir = lib/Automake
+DIST_COMMON = $(dist_perllib_DATA) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \
@@ -45,7 +47,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-DIST_COMMON = $(dist_perllib_DATA) $(srcdir)/Makefile.in Makefile.am
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
 SOURCES =
@@ -166,7 +167,7 @@ EXTRA_DIST = Config.in
 all: all-recursive
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
index 282c6b7daf41a8cf3884d5be78b9b6d7c34b8d5e..4a9b9fe6294e67cbcac9c755b0c7b95199a2b860 100644 (file)
@@ -34,6 +34,7 @@ NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 subdir = lib/Automake/tests
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \
@@ -44,7 +45,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
 SOURCES =
@@ -125,7 +125,7 @@ EXTRA_DIST = $(TESTS)
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
index f9ac9637b4c5dd076d86f0a48c118d0eb5f33b83..3d1c9feb939270f7b6de01a1214743da51961703 100644 (file)
@@ -35,6 +35,11 @@ NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 subdir = lib
+DIST_COMMON = $(dist_pkgvdata_DATA) $(dist_script_DATA) \
+       $(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING INSTALL \
+       ansi2knr.1 ansi2knr.c compile config.guess config.sub depcomp \
+       elisp-comp install-sh mdate-sh missing mkinstalldirs \
+       py-compile texinfo.tex ylwrap
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \
@@ -45,11 +50,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-DIST_COMMON = $(dist_pkgvdata_DATA) $(dist_script_DATA) \
-       $(srcdir)/Makefile.in COPYING INSTALL Makefile.am ansi2knr.1 \
-       ansi2knr.c compile config.guess config.sub depcomp elisp-comp \
-       install-sh mdate-sh missing mkinstalldirs py-compile \
-       texinfo.tex ylwrap
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
 SOURCES =
@@ -144,7 +144,7 @@ dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \
 all: all-recursive
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
index ac1b88727f09d08922b4bdc0f030075c3c4f719e..cf1e3ce7853c213cc6e9c027a595d988d235fe07 100644 (file)
@@ -35,6 +35,8 @@ NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 subdir = lib/am
+DIST_COMMON = $(dist_am_DATA) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \
@@ -45,7 +47,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-DIST_COMMON = $(dist_am_DATA) $(srcdir)/Makefile.in Makefile.am
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
 SOURCES =
@@ -130,7 +131,7 @@ texinfos.am yacc.am
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
index ede227ba0fc1ffeb6421894281b6faa43a9cefcc..8939be0edcddde302802b86c03905a9b2eddd51d 100644 (file)
@@ -79,7 +79,7 @@ endif %?TOPDIR_P%
            cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__depfiles_maybe);; \
        esac;
 
-DIST_COMMON += %MAKEFILE-AM% %MAKEFILE-IN%
+DIST_COMMON += %MAKEFILE-AM%
 
 
 ## --------------------------- ##
index e4846f4069994a15f3737e9dd55cdd10a1968bc4..5cd693a03e74a69842ad89f825a67fdf260a9c63 100644 (file)
@@ -35,6 +35,8 @@ NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 subdir = m4
+DIST_COMMON = $(dist_m4data_DATA) $(srcdir)/Makefile.am \
+       $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \
@@ -45,7 +47,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-DIST_COMMON = $(dist_m4data_DATA) $(srcdir)/Makefile.in Makefile.am
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
 SOURCES =
@@ -156,7 +157,7 @@ EXTRA_DIST = dirlist amversion.in
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
index 1bc548f38e31414f4b51c45644ad31fca3b5b779..0792a683ded99acaabdc8f05535d0a7816122555 100644 (file)
@@ -172,7 +172,6 @@ destdir.test \
 dirforbid.test \
 dirlist.test \
 discover.test \
-distcom.test \
 distcom2.test \
 distcom3.test \
 distcom4.test \
@@ -337,6 +336,7 @@ output6.test \
 output7.test \
 output8.test \
 output9.test \
+output10.test \
 overrid.test \
 parse.test \
 percent.test \
index a999b708353a67d6f0dcb9839b51bf7d8f37f8d1..5b0b5fd7b4b614daed3bbf9d8a8891e5ce5f2f66 100644 (file)
@@ -34,6 +34,8 @@ NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 subdir = tests
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \
@@ -44,8 +46,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
-DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am aclocal.in \
-       automake.in defs.in
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES = defs aclocal-${APIVERSION} automake-${APIVERSION}
 SOURCES =
@@ -286,7 +286,6 @@ destdir.test \
 dirforbid.test \
 dirlist.test \
 discover.test \
-distcom.test \
 distcom2.test \
 distcom3.test \
 distcom4.test \
@@ -451,6 +450,7 @@ output6.test \
 output7.test \
 output8.test \
 output9.test \
+output10.test \
 overrid.test \
 parse.test \
 percent.test \
@@ -637,7 +637,7 @@ check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  Makefile.am  $(am__configure_deps)
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -666,11 +666,11 @@ $(top_srcdir)/configure:  $(am__configure_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-defs: $(top_builddir)/config.status defs.in
+defs: $(top_builddir)/config.status $(srcdir)/defs.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-aclocal-${APIVERSION}: $(top_builddir)/config.status aclocal.in
+aclocal-${APIVERSION}: $(top_builddir)/config.status $(srcdir)/aclocal.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-automake-${APIVERSION}: $(top_builddir)/config.status automake.in
+automake-${APIVERSION}: $(top_builddir)/config.status $(srcdir)/automake.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 uninstall-info-am:
 tags: TAGS
index 64d6d5ba9c1be568923d1ea68ff8380eb4cdb44a..41b2301fbff0e2dc3647fd474e23b4f3be39a75b 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003
+#   Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -23,6 +24,8 @@
 
 . ./defs || exit 1
 
+set -e
+
 cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
@@ -33,26 +36,24 @@ END
 : > two.in
 : > three.in
 
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # We actually check several things here.
 # Automake should have created zardoz.in.
-test -f zardoz.in || exit 1
+test -f zardoz.in
 
 # The generated file should refer to zardoz.in and zardoz.am, but
-# never just "zardoz" -- except the actual automake invocation can
-# refer to it (don't ask).
+# never just "zardoz".
 echo Grep1
-grep zardoz zardoz.in | $FGREP -v 'zardoz.in' | $FGREP -v 'zardoz.am' \
-   | $FGREP -v AUTOMAKE > O
+grep zardoz zardoz.in | $EGREP -v 'zardoz.in' | $FGREP -v 'zardoz.am' > O || :
 # We cat the output file so we see in when verbose.
 cat O
-test -z "`cat O`" || exit 1
+test -z "`cat O`"
 
 # Makefile should depend on two.in.
 echo Grep2
-grep '^Makefile:.* two.in' zardoz.in || exit 1
+grep '^Makefile:.* \$(srcdir)/two.in' zardoz.in
 # Likewise three.in.
 echo Grep3
-grep '^Makefile:.* three.in' zardoz.in
+grep '^Makefile:.* \$(srcdir)/three.in' zardoz.in
similarity index 51%
rename from tests/distcom.test
rename to tests/output10.test
index 24f36ffd8e8a196e0ba68f288b4321597a88595c..21fab9a226c4f4a407a8be5d131ff707d58cb2d5 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2003  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-# A test for failure to include files provided in AC_OUTPUT into
-# DIST_COMMON
-# From Derek R. Price.
+# Make sure an AC_CONFIG_FILES can have an AC_CONFIG_FILES output as input.
+# This is comparable to output9.test, but testing Makefile rules.
+# PR/411
 
 . ./defs || exit 1
 
-cat > configure.in << EOF
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(subdir/bar \
-         Makefile \
-         subdir/Makefile)
-EOF
+set -e
+
+cat >> configure.in << END
+AC_SUBST([FOO], [top])
+AC_SUBST([BAR], [bot])
+AC_CONFIG_FILES([a/top])
+AC_CONFIG_FILES([a/bot])
+AC_CONFIG_FILES([b/Makefile:a/top:b/Makefile.in:a/bot])
+AC_OUTPUT
+END
 
-: > Makefile.am
+mkdir a
+mkdir b
 
-mkdir subdir
-: > subdir/Makefile.am
-: > subdir/bar.in
+cat >Makefile.am <<\EOF
+SUBDIRS = b
+dist-hook:
+       test ! -f $(distdir)/a/top
+       test ! -f $(distdir)/a/bot
+EOF
+
+cat >b/Makefile.am <<\EOF
+output:
+       echo $(TOP)$(BOT) > ok
+EOF
 
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+echo TOP=@FOO@ >a/top.in
+echo BOT=@BAR@ >a/bot.in
 
-# verify bar.in
-grep 'DIST_COMMON.*bar.in' subdir/Makefile.in || exit 1
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
 
-exit 0
+mkdir build
+cd build
+../configure
+cd b
+$MAKE output
+grep topbot ok
+cd ..
+$MAKE distcheck
This page took 0.060803 seconds and 5 git commands to generate.