From 1bdfb2f27c1e68086495d22ca1f801dc40ddea92 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Mon, 5 Mar 2001 14:33:37 +0000 Subject: [PATCH] * 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. --- ChangeLog | 11 +++++++++-- automake.in | 35 ++++++++++++++++++++++------------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2b7498aa..996d6631 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-03-05 Akim Demaille + + * 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 * automake.in (%am_vars, @var_list, %def_type): Globals. @@ -13,7 +21,6 @@ (&am_install_var): Declare @condvals, not $condvals. (%make_dirs): My. - 2001-03-05 Akim Demaille * 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 * automake.in (&handle_single_transform_list, &add_depend2): Let diff --git a/automake.in b/automake.in index 3630c786..a22eadfd 100755 --- a/automake.in +++ b/automake.in @@ -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 '.') -- 2.43.5