automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

36-fyi-require-conf-file.patch


From: Akim Demaille
Subject: 36-fyi-require-conf-file.patch
Date: Sun, 21 Oct 2001 20:12:29 +0200

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * automake.in ($seen_lispdir): Replace with...
        ($am_lispdir_location): this.
        (&require_conf_file): New.
        (&require_config_file, &require_conf_file_with_line,
        (&require_conf_file_with_conf_line): Use it.
        (&require_conf_file_with_macro): New.
        
        
Index: automake.in
--- automake.in Sun, 21 Oct 2001 17:39:47 +0200 akim
+++ automake.in Sun, 21 Oct 2001 17:47:58 +0200 akim
@@ -411,8 +411,8 @@ sub target_hook ($$$$)
 # Where version is defined.
 my $package_version_location;
 
-# TRUE if we've seen AM_PATH_LISPDIR.
-my $seen_lispdir = 0;
+# Where AM_PATH_LISPDIR appears.
+my $am_lispdir_location;
 
 # TRUE if we've seen AM_PATH_PYTHON.
 my $seen_pythondir = 0;
@@ -3085,7 +3085,7 @@ sub handle_texinfo_helper
            # This is ugly, but it is our historical practice.
            if ($config_aux_dir_set_in_configure_in)
            {
-               &require_conf_file_with_line ('info_TEXINFOS', $FOREIGN,
+               require_conf_file_with_macro ('info_TEXINFOS', $FOREIGN,
                                              'mdate-sh');
            }
            else
@@ -3197,7 +3197,7 @@ sub handle_texinfo_helper
     {
        if ($need_texi_file > 1)
        {
-           &require_conf_file_with_line ('info_TEXINFOS', $FOREIGN,
+           require_conf_file_with_macro ('info_TEXINFOS', $FOREIGN,
                                          'texinfo.tex');
        }
        else
@@ -4313,10 +4313,9 @@ sub handle_emacs_lisp
     push (@all, '$(ELCFILES)');
 
     &am_error ("`lisp_LISP' defined but `AM_PATH_LISPDIR' not in 
`$configure_ac'")
-      if ! $seen_lispdir && &variable_defined ('lisp_LISP');
+      if ! $am_lispdir_location && &variable_defined ('lisp_LISP');
 
-    &require_conf_file_with_conf_line ('AM_PATH_LISPDIR',
-                                      $FOREIGN, 'elisp-comp');
+    require_conf_file ($am_lispdir_location,  $FOREIGN, 'elisp-comp');
     &define_variable ('elisp_comp', $config_aux_dir . '/elisp-comp');
 }
 
@@ -4568,7 +4567,7 @@ sub scan_autoconf_traces ($)
        }
       elsif ($macro eq 'AM_PATH_LISPDIR')
        {
-         $seen_lispdir = $here;
+         $am_lispdir_location = $here;
        }
       elsif ($macro eq 'AM_PATH_PYTHON')
        {
@@ -4857,7 +4856,7 @@ sub scan_one_autoconf_file
            $configure_cond{'MAINTAINER_MODE'} = $here;
        }
 
-        $seen_lispdir = 1 if /AM_PATH_LISPDIR/;
+        $am_lispdir_location = $here if /AM_PATH_LISPDIR/;
 
         if (/AM_PATH_PYTHON/)
          {
@@ -7851,6 +7850,21 @@ sub require_file_with_macro ($$@)
     require_file_internal ($var_location{$macro}, $mystrict, @files);
 }
 
+
+# &require_conf_file ($WHERE, $MYSTRICT, @FILES)
+# ----------------------------------------------
+sub require_config_file ($$@)
+{
+    my ($where, $mystrict, @files) = @_;
+    @require_file_paths = @config_aux_path;
+    &require_file_internal ($where, $mystrict, @files);
+    my $dir = $require_file_paths[0];
+    @config_aux_path = @require_file_paths;
+     # Avoid unsightly '/.'s.
+    $config_aux_dir = '$(top_srcdir)' . ($dir eq '.' ? "" : "/$dir");
+}
+
+
 # &require_config_file ($MYSTRICT, @FILES)
 # ----------------------------------------
 # Require a file that is also required by Autoconf.  Looks in
@@ -7858,12 +7872,7 @@ sub require_file_with_macro ($$@)
 sub require_config_file ($@)
 {
     my ($mystrict, @files) = @_;
-    @require_file_paths = @config_aux_path;
-    &require_file_internal ($configure_ac, $mystrict, @files);
-    my $dir = $require_file_paths[0];
-    @config_aux_path = @require_file_paths;
-     # Avoid unsightly '/.'s.
-    $config_aux_dir = '$(top_srcdir)' . ($dir eq '.' ? "" : "/$dir");
+    require_config_file ($configure_ac, $mystrict, @files);
 }
 
 # &require_conf_file_with_line ($LINE, $MYSTRICT, @FILES)
@@ -7872,12 +7881,15 @@ sub require_config_file ($@)
 sub require_conf_file_with_line ($$@)
 {
     my ($line, $mystrict, @files) = @_;
-    @require_file_paths = @config_aux_path;
-    require_file_internal ("$am_file.am:$line", $mystrict, @files);
-    my $dir = $require_file_paths[0];
-    @config_aux_path = @require_file_paths;
-     # Avoid unsightly '/.'s.
-    $config_aux_dir = '$(top_srcdir)' . ($dir eq '.' ? "" : "/$dir");
+    require_conf_file ("$am_file.am:$line", $mystrict, @files);
+}
+
+# &require_conf_file_with_macro ($MACRO, $MYSTRICT, @FILES)
+# -------------------------------------------------------
+sub require_conf_file_with_line ($$@)
+{
+    my ($macro, $mystrict, @files) = @_;
+    require_conf_file ($var_location{$macro}, $mystrict, @files);
 }
 
 # &require_conf_file_with_line ($LINE, $MYSTRICT, @FILES)
@@ -7886,12 +7898,7 @@ sub require_conf_file_with_line ($$@)
 sub require_conf_file_with_conf_line ($$@)
 {
     my ($line, $mystrict, @files) = @_;
-    @require_file_paths = @config_aux_path;
-    &require_file_internal ("$configure_ac:$line", $mystrict, @files);
-    my $dir = $require_file_paths[0];
-    @config_aux_path = @require_file_paths;
-    # avoid unsightly '/.'s.
-    $config_aux_dir = '$(top_srcdir)' . ($dir eq '.' ? "" : "/$dir");
+    require_conf_file ("$configure_ac:$line", $mystrict, @files);
 }
 
 ################################################################



reply via email to

[Prev in Thread] Current Thread [Next in Thread]