* automake.in ($am_relative_dir): Global.
authorAkim Demaille <akim@epita.fr>
Mon, 5 Mar 2001 14:33:38 +0000 (14:33 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 5 Mar 2001 14:33:38 +0000 (14:33 +0000)
(&initialize_per_input): Init it.
(%make_list, @make_input_list): My them from
(&scan_autoconf_files): here.
(&require_file_internal): Mying changes.

ChangeLog
automake.in

index 2b7498a..996d663 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2001-03-05  Akim Demaille  <akim@epita.fr>
 
+       * automake.in ($am_relative_dir): Global.
+       (&initialize_per_input): Init it.
+       (%make_list, @make_input_list): My them from
+       (&scan_autoconf_files): here.
+       (&require_file_internal): Mying changes.
+
+2001-03-05  Akim Demaille  <akim@epita.fr>
+
        * automake.in (%am_vars, @var_list, %def_type): Globals.
        (&initialize_per_input): Initialize them.
        (&read_main_am_file): Don't local them.
@@ -13,7 +21,6 @@
        (&am_install_var): Declare @condvals, not $condvals.
        (%make_dirs): My.
 
-       
 2001-03-05  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&initialize_per_input): Move to the top.
@@ -30,7 +37,7 @@
        initialization of the constants to the top, from...
        (&initialize_global_constants): here.
 
-       
+
 2001-03-05  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&handle_single_transform_list, &add_depend2): Let
index 3630c78..a22eadf 100755 (executable)
@@ -469,6 +469,9 @@ my @include_stack;
 # 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;
@@ -656,6 +659,9 @@ sub initialize_per_input ()
     # Eg for src/Makefile.in, this is "src".
     $relative_dir = '';
 
+    # Same but wrt Makefile.am.
+    $am_relative_dir = '';
+
     # This holds a list of files that are included in the
     # distribution.
     %dist_common = ();
@@ -4394,6 +4400,8 @@ sub handle_minor_options
 
 ################################################################
 
+my %make_list;
+my @make_input_list;
 # &scan_autoconf_config_files ($CONFIG-FILES)
 # -------------------------------------------
 # Study $CONFIG-FILES which is the first argument to AC_CONFIG_FILES
@@ -4846,10 +4854,6 @@ sub scan_autoconf_files
     # that won't always be the case.
     %libsources = ();
 
-    # Watchout: these guys need dynamic scope!
-    local %make_list;
-    local @make_input_list;
-
     warn "$me: both \`configure.ac' and \`configure.in' present:"
          . " ignoring \`configure.in'\n"
         if -f 'configure.ac' && -f 'configure.in';
@@ -7360,27 +7364,32 @@ sub maybe_push_required_file
     }
 }
 
-# Verify that the file must exist in the current directory.  Usage:
-# require_file (isconfigure, line_number, strictness, file) strictness
-# is the strictness level at which this file becomes required.  Must
-# set require_file_paths before calling this function.
+
+# &require_file_internal ($IS_CONFIGURE, $LINE, $MYSTRICT, @FILES)
+# ----------------------------------------------------------------
+# Verify that the file must exist in the current directory.
+# $MYSTRICT is the strictness level at which this file becomes required.
+#
+# Must set require_file_paths before calling this function.
 # require_file_paths is set to hold a single directory (the one in
 # which the first file was found) before return.
 sub require_file_internal
 {
     my ($is_configure, $line, $mystrict, @files) = @_;
-    my $fullfile;
-    my ($found_it, $dangling_sym, $errfile, $errdir);
-    my $save_dir;
 
     foreach my $file (@files)
     {
+        my $fullfile;
+       my $errdir;
+       my $errfile;
+       my $save_dir;
+
        # If we've already looked for it, we're done.
        next if defined $require_file_found{$file};
        $require_file_found{$file} = 1;
 
-       $found_it = 0;
-       $dangling_sym = 0;
+       my $found_it = 0;
+       my $dangling_sym = 0;
        foreach my $dir (@require_file_paths)
        {
            if ($dir eq '.')