]> sourceware.org Git - automake.git/commitdiff
* automake.in ($in_file_name, $am_file_name, $relative_dirs):
authorAkim Demaille <akim@epita.fr>
Mon, 5 Mar 2001 14:35:44 +0000 (14:35 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 5 Mar 2001 14:35:44 +0000 (14:35 +0000)
Globals, initialized...
(&initialize_per_input): here.

ChangeLog
Makefile.am
Makefile.in
automake.in
lib/am/Makefile.am
m4/Makefile.in
tests/Makefile.in

index 996d66317ed0d4d0cf4807b8a5ec84e63f9952bb..f90197b094b28e0268c89a5e8438a410bf40f287 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-03-05  Akim Demaille  <akim@epita.fr>
+
+       * automake.in ($in_file_name, $am_file_name, $relative_dirs):
+       Globals, initialized...
+       (&initialize_per_input): here.
+
 2001-03-05  Akim Demaille  <akim@epita.fr>
 
        * automake.in ($am_relative_dir): Global.
index 0bfa82845ef54de199031adc3e682825d6130356..c4a7eb9d65a0173a151048833729720f305c6714 100644 (file)
@@ -116,18 +116,18 @@ maintainer-check: automake aclocal
          echo "Don't use \`local' with parens: use several \`local' above." >&2; \
          exit 1; \
        fi
-## Up to now we manage to limit to 6 uses of local.
+## Up to now we manage to limit to 1 use of local.
        @locals=`grep -c '^[ \t]*local [^*]' $(srcdir)/automake.in`; \
        case $$locals in \
-         [0-6] ) \
-           echo "Wow, congrats!  There are $$locals \`local' now!." >&2; \
+         [0] ) \
+           echo "Wow, congrats!  There are no \`local' now!." >&2; \
            echo "Please update Makefile.am (maintainer-check)." >&2; \
            exit 1; \
          ;; \
-         7 ) ;; \
+         1 ) ;; \
          * ) \
            echo "Too many \`local'!  Are you sure you need $$locals of them?" >&2; \
-           echo "Up to now 7 was enough." >&2; \
+           echo "Up to now 1 was enough." >&2; \
            exit 1; \
          ;; \
        esac
index 69f71d4fce6eb21abe6566aeea29d40394c07b26..8d9166fea8f464a6f12e7c302e8e46f7c1c239f7 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4e from Makefile.am
+#  generated automatically by automake 1.4e from 
 
 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 # Free Software Foundation, Inc.
@@ -129,12 +129,12 @@ DVIS = automake.dvi
 TEXINFOS = automake.texi
 DATA =  $(dist_pkgdata_DATA) $(dist_script_DATA)
 
-DIST_COMMON =  README $(dist_pkgdata_DATA) $(dist_script_DATA) AUTHORS \
-COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS README-alpha \
-THANKS TODO aclocal.in aclocal.m4 ansi2knr.1 ansi2knr.c automake.in \
-compile config.guess config.sub configure configure.in depcomp \
-elisp-comp install-sh mdate-sh missing mkinstalldirs py-compile \
-stamp-vti texinfo.tex version.texi ylwrap
+DIST_COMMON =  README  $(dist_pkgdata_DATA) $(dist_script_DATA) AUTHORS \
+COPYING ChangeLog INSTALL NEWS README-alpha THANKS TODO aclocal.in \
+aclocal.m4 ansi2knr.1 ansi2knr.c automake.in compile config.guess \
+config.sub configure configure.in depcomp elisp-comp install-sh \
+mdate-sh missing mkinstalldirs py-compile stamp-vti texinfo.tex \
+version.texi ylwrap
 
 DIST_SUBDIRS =  $(SUBDIRS)
 all: all-recursive
@@ -646,15 +646,15 @@ maintainer-check: automake aclocal
        fi
        @locals=`grep -c '^[ \t]*local [^*]' $(srcdir)/automake.in`; \
        case $$locals in \
-         [0-6] ) \
-           echo "Wow, congrats!  There are $$locals \`local' now!." >&2; \
+         [0] ) \
+           echo "Wow, congrats!  There are no \`local' now!." >&2; \
            echo "Please update Makefile.am (maintainer-check)." >&2; \
            exit 1; \
          ;; \
-         7 ) ;; \
+         1 ) ;; \
          * ) \
            echo "Too many \`local'!  Are you sure you need $$locals of them?" >&2; \
-           echo "Up to now 7 was enough." >&2; \
+           echo "Up to now 1 was enough." >&2; \
            exit 1; \
          ;; \
        esac
index a22eadfd3f0e9c52651f501ac5b24c2490b54ca6..ad5039e6a7c1f1f714d7de4df68c0fa3e7bff4c3 100755 (executable)
@@ -28,7 +28,7 @@ eval 'exec @PERL@ -S $0 ${1+"$@"}'
 # Perl reimplementation by Tom Tromey <tromey@cygnus.com>.
 
 require 5.005;
-use strict;
+# FIXME: use strict;
 use File::Basename;
 use IO::File;
 
@@ -414,6 +414,16 @@ my %required_targets =
 ## Variables reset by &initialize_per_input.  ##
 ## ------------------------------------------ ##
 
+# Basename and relative dir of the input file.
+my $am_file_name;
+my $am_relative_dir;
+
+# Same but wrt Makefile.in.
+my $in_file_name;
+my $relative_dir;
+
+# These two variables are used when generating each Makefile.in.
+# They hold the Makefile.in until it is ready to be printed.
 my $output_rules;
 my $output_vars;
 my $output_trailer;
@@ -465,13 +475,6 @@ my @conditional_stack;
 # This holds the set of included files.
 my @include_stack;
 
-# This holds the "relative directory" of the current Makefile.in.
-# Eg for src/Makefile.in, this is "src".
-my $relative_dir;
-
-# Same but wrt Makefile.am.
-my $am_relative_dir;
-
 # This holds a list of files that are included in the
 # distribution.
 my %dist_common;
@@ -602,6 +605,14 @@ my %def_type;
 # (Re)-Initialize per-Makefile.am variables.
 sub initialize_per_input ()
 {
+    # Basename and relative dir of the input file.
+    $am_file_name = '';
+    $am_relative_dir = '';
+
+    # Same but wrt Makefile.in.
+    $in_file_name = '';
+    $relative_dir = '';
+
     # These two variables are used when generating each Makefile.in.
     # They hold the Makefile.in until it is ready to be printed.
     $output_rules = '';
@@ -1040,11 +1051,10 @@ sub generate_makefile
 {
     my ($output, $makefile) = @_;
 
-    # Name of input file ("Makefile.in") and output file
-    # ("Makefile.am").  These have no directory components.
-    (my $am_file_name = $makefile) =~ s/^.*\///;
-    my $in_file_name = $am_file_name . '.in';
-    $am_file_name .= '.am';
+    # Name of input file ("Makefile.am") and output file
+    # ("Makefile.in").  These have no directory components.
+    $am_file_name = basename ($makefile) . '.am';
+    $in_file_name = basename ($makefile) . '.in';
 
     # $OUTPUT is encoded.  If it contains a ":" then the first element
     # is the real output file, and all remaining elements are input
@@ -4897,8 +4907,9 @@ sub scan_autoconf_files
     # check must be done for every run, even those where we are only
     # looking at a subdir Makefile.  We must set relative_dir so that
     # the file-finding machinery works.
-    # Needs dynamic scopes.
-    local $relative_dir = '.';
+    # FIXME: Is this broken because it needs dynamic scopes.
+    # My tests seems to show it's not the case.
+    $relative_dir = '.';
     &require_config_file ($FOREIGN, 'install-sh', 'mkinstalldirs', 'missing');
     &am_error ("\`install.sh' is an anachronism; use \`install-sh' instead")
         if -f $config_aux_path[0] . '/install.sh';
index 0bfa82845ef54de199031adc3e682825d6130356..c4a7eb9d65a0173a151048833729720f305c6714 100644 (file)
@@ -116,18 +116,18 @@ maintainer-check: automake aclocal
          echo "Don't use \`local' with parens: use several \`local' above." >&2; \
          exit 1; \
        fi
-## Up to now we manage to limit to 6 uses of local.
+## Up to now we manage to limit to 1 use of local.
        @locals=`grep -c '^[ \t]*local [^*]' $(srcdir)/automake.in`; \
        case $$locals in \
-         [0-6] ) \
-           echo "Wow, congrats!  There are $$locals \`local' now!." >&2; \
+         [0] ) \
+           echo "Wow, congrats!  There are no \`local' now!." >&2; \
            echo "Please update Makefile.am (maintainer-check)." >&2; \
            exit 1; \
          ;; \
-         7 ) ;; \
+         1 ) ;; \
          * ) \
            echo "Too many \`local'!  Are you sure you need $$locals of them?" >&2; \
-           echo "Up to now 7 was enough." >&2; \
+           echo "Up to now 1 was enough." >&2; \
            exit 1; \
          ;; \
        esac
index f51de231636250985f8045e880313ce744006414..e9a1b01d1594d1c6cb45478dd78e7a2b7b50cd9c 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4e from Makefile.am
+#  generated automatically by automake 1.4e from 
 
 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 # Free Software Foundation, Inc.
@@ -94,7 +94,7 @@ CONFIG_CLEAN_FILES =
 DIST_SOURCES = 
 DATA =  $(m4data_DATA)
 
-DIST_COMMON =  Makefile.am Makefile.in
+DIST_COMMON =  
 
 all: all-am
 .SUFFIXES:
index 1288ef8393106f3ccb0485a4c957c7da55608bcc..9009342ad81b321d7b866ad9f9251108e5a3fbca 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.4e from Makefile.am
+#  generated automatically by automake 1.4e from 
 
 # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
 # Free Software Foundation, Inc.
@@ -361,7 +361,7 @@ subdir = tests
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_CLEAN_FILES = 
 DIST_SOURCES = 
-DIST_COMMON =  Makefile.am Makefile.in
+DIST_COMMON =  
 
 all: all-am
 .SUFFIXES:
This page took 0.042135 seconds and 5 git commands to generate.