]> sourceware.org Git - automake.git/commitdiff
* automake.in (&scan_aclocal_m4): Handle $relative_dir and special
authorAkim Demaille <akim@epita.fr>
Tue, 10 Apr 2001 09:20:59 +0000 (09:20 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 10 Apr 2001 09:20:59 +0000 (09:20 +0000)
variables.
Specify to the caller whether $regen_aclocal_m4.
(&handle_configure): Adjust.
Transform `REGEN-ACLOCAL-M4'.
* configure.am: Use it.
* tests/defs (me): New.
* tests/configdeps.test: New.

ChangeLog
automake.in
configure.am
lib/am/configure.am
tests/Makefile.am
tests/Makefile.in
tests/defs

index 3b1277b09e21174fefb584d9b110f60ba247252c..ee1c9e950e7e78671add08496b5c69223076a9d0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2001-04-10  Akim Demaille  <akim@epita.fr>
+
+       * automake.in (&scan_aclocal_m4): Handle $relative_dir and special
+       variables.
+       Specify to the caller whether $regen_aclocal_m4.
+       (&handle_configure): Adjust.
+       Transform `REGEN-ACLOCAL-M4'.
+       * configure.am: Use it.
+       * tests/defs (me): New.
+       * tests/configdeps.test: New.
+
 2001-04-09  Tom Tromey  <tromey@redhat.com>
 
        * m4/missing.m4 (AM_MISSING_HAS_RUN): Use `true', not `:'.
index 03e7653dafa309d80f88d4b1a4cf1b2ba3e78a1d..c86f5bada216de8a97647c71ef2ca8622080ba02 100755 (executable)
@@ -3155,13 +3155,20 @@ sub handle_subdirs
 }
 
 
-# @DEPENDENCIES
+# ($REGEN, @DEPENDENCIES)
 # &scan_aclocal_m4
 # ----------------
 # If aclocal.m4 creation is automated, return the list of its dependencies.
 sub scan_aclocal_m4
 {
     my $regen_aclocal = 0;
+
+    return (0, ())
+      unless $relative_dir eq '.';
+
+    &examine_variable ('CONFIG_STATUS_DEPENDENCIES');
+    &examine_variable ('CONFIGURE_DEPENDENCIES');
+
     if (-f 'aclocal.m4')
     {
        &define_variable ("ACLOCAL_M4", '$(top_srcdir)/aclocal.m4');
@@ -3180,21 +3187,14 @@ sub scan_aclocal_m4
        }
     }
 
-    my $acinclude = 0;
+    my @ac_deps = ();
+
     if (-f 'acinclude.m4')
     {
        $regen_aclocal = 1;
-       $acinclude = 1;
+       push @ac_deps, 'acinclude.m4';
     }
 
-    return ()
-      unless $regen_aclocal;
-
-    # Note that it might be possible that aclocal.m4 doesn't exist but
-    # should be auto-generated.  This case probably isn't very
-    # important.
-    my @ac_deps = ($acinclude ? ' acinclude.m4' : '');
-
     if (&variable_defined ('ACLOCAL_M4_SOURCES'))
     {
        push (@ac_deps, '$(ACLOCAL_M4_SOURCES)');
@@ -3226,7 +3226,12 @@ sub scan_aclocal_m4
            }
        }
     }
-    return @ac_deps;
+
+    # Note that it might be possible that aclocal.m4 doesn't exist but
+    # should be auto-generated.  This case probably isn't very
+    # important.
+
+    return ($regen_aclocal, @ac_deps);
 }
 
 # Rewrite a list of input files into a form suitable to put on a
@@ -3283,14 +3288,7 @@ sub handle_configure
 
     my @rewritten = &rewrite_inputs_into_dependencies (1, @secondary_inputs);
 
-    my @aclocal_m4_deps;
-    if ($relative_dir eq '.')
-    {
-        @aclocal_m4_deps = &scan_aclocal_m4 ();
-       &examine_variable ('CONFIG_STATUS_DEPENDENCIES');
-       &examine_variable ('CONFIGURE_DEPENDENCIES');
-    }
-
+    my ($regen_aclocal_m4, @aclocal_m4_deps) = scan_aclocal_m4 ();
 
     $output_rules .=
       &file_contents ('configure',
@@ -3313,6 +3311,8 @@ sub handle_configure
                       => $cmdline_use_dependencies ? '' : ' --ignore-deps',
                       'MAKEFILE-AM-SOURCES'
                       =>  "$input$colon_infile",
+                      'REGEN-ACLOCAL-M4'
+                      => $regen_aclocal_m4,
                       'ACLOCAL_M4_DEPS'
                       => join (' ', @aclocal_m4_deps)));
 
index 05d1f9bd7b324e15a2bf8a81c2bd7a4d45f14145..bbae72c33dc0452f23fc4252d62ab8189b3a510b 100644 (file)
@@ -61,6 +61,8 @@ endif %?TOPDIR_P%
 ## ------------ ##
 
 if %?TOPDIR_P%
+if  %?REGEN-ACLOCAL-M4%
 $(ACLOCAL_M4): %MAINTAINER-MODE% %CONFIGURE-AC% %ACLOCAL_M4_DEPS%
        cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+endif  %?REGEN-ACLOCAL-M4%
 endif %?TOPDIR_P%
index 05d1f9bd7b324e15a2bf8a81c2bd7a4d45f14145..bbae72c33dc0452f23fc4252d62ab8189b3a510b 100644 (file)
@@ -61,6 +61,8 @@ endif %?TOPDIR_P%
 ## ------------ ##
 
 if %?TOPDIR_P%
+if  %?REGEN-ACLOCAL-M4%
 $(ACLOCAL_M4): %MAINTAINER-MODE% %CONFIGURE-AC% %ACLOCAL_M4_DEPS%
        cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+endif  %?REGEN-ACLOCAL-M4%
 endif %?TOPDIR_P%
index 7d78ef2eab5b12f3ac0f9ac6351a77069a7c76dd..b95e38d14d9a7caafeb3956d7e12aed91bed783f 100644 (file)
@@ -64,6 +64,7 @@ condlib.test \
 condman.test \
 condman2.test \
 conf2.test \
+confdeps.test \
 confdist.test \
 confh.test \
 confh2.test \
index fbdb3a655fd08e4156084a93927ad9145b33e229..adbe30eb97fc9841ee31a4fc50d4a702285e31ab 100644 (file)
@@ -137,6 +137,7 @@ condlib.test \
 condman.test \
 condman2.test \
 conf2.test \
+confdeps.test \
 confdist.test \
 confh.test \
 confh2.test \
index 1b91c03f33391435661309ffe9e91b5d4a620438..d5d9a36ca639def7e75e375b98881bcba42a32b0 100644 (file)
@@ -8,6 +8,8 @@ test -f $srcdir/defs || {
    exit 1
 }
 
+me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
+
 # Always use an absolute srcdir.  Otherwise symlinks made in subdirs
 # of the test dir just won't work.
 case "$srcdir" in
This page took 0.044765 seconds and 5 git commands to generate.