autoconf-patches
[Top][All Lists]
Advanced

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

67-fyi-autoheader--include.patch


From: Akim Demaille
Subject: 67-fyi-autoheader--include.patch
Date: Fri, 31 Aug 2001 15:30:50 +0200

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * bin/autom4te.in (&parse_args): Die on unknown languages.
        * bin/autoheader.in: Run directly autom4te --mode=autoconf, no
        need for autoconf.
        Promote --include over --macrodir and other obsolete options.

Index: bin/autoheader.in
--- bin/autoheader.in Fri, 31 Aug 2001 11:22:31 +0200 akim
+++ bin/autoheader.in Fri, 31 Aug 2001 11:30:32 +0200 akim
@@ -40,8 +40,7 @@
 use vars qw ($config_h %verbatim %symbol);

 # Lib files.
-my $autoconf_dir = $ENV{"AC_MACRODIR"} || "@datadir@";
-my $autoconf = $ENV{'AUTOCONF'} || '@autoconf-name@';
+my $autom4te = $ENV{'AUTOM4TE'} || '@autom4te-name@';
 local $config_h;
 my $config_h_in;
 my $localdir = '.';
@@ -66,6 +65,7 @@ Usage: $0 [OPTION] ... [TEMPLATE-FILE]
   -V, --version            print version number, then exit
   -v, --verbose            verbosely report processing
   -d, --debug              don\'t remove temporary files
+  -I, --include=DIR        look for input files in DIR.  Accumulates
   -f, --force              consider all the files are obsolete
   -W, --warnings=CATEGORY  report the warnings falling in CATEGORY

@@ -76,10 +76,6 @@ Usage: $0 [OPTION] ... [TEMPLATE-FILE]
   \`none\'          turn off all the warnings
   \`error\'         warnings are error

-Library directories:
-  -A, --autoconf-dir=ACDIR  Autoconf\'s macro files location (rarely needed)
-  -l, --localdir=DIR        location of \`aclocal.m4\' and \`acconfig.h\'
-
 Report bugs to <address@hidden>.
 END

@@ -112,8 +108,7 @@ sub parse_args ()
   # If fixed some day, use this: '' => sub { push @ARGV, "-" }
   my $stdin = grep /^-$/, @ARGV;
   @ARGV = grep !/^-$/, @ARGV;
-  getopt ('A|autoconf-dir|m|macrodir=s' => \$autoconf_dir,
-         'l|localdir=s' => \$localdir,
+  getopt ('I|include|A|autoconf-dir|m|macrodir|l|localdir=s' => address@hidden,
          'f|force'   => \$force,
          'W|warning' => address@hidden);

@@ -163,7 +158,8 @@ sub parse_args ()
   }

 # Set up autoconf.
-$autoconf .= " --include=$autoconf_dir --include=$localdir";
+my $autoconf = "$autom4te --language=autoconf ";
+$autoconf .= join (' ' , map { "--include=$_" } @include);
 $autoconf .= ' --debug' if $debug;
 $autoconf .= ' --force' if $force;
 $autoconf .= ' --verbose' if $verbose;
Index: bin/autom4te.in
--- bin/autom4te.in Fri, 31 Aug 2001 11:22:31 +0200 akim
+++ bin/autom4te.in Fri, 31 Aug 2001 11:31:19 +0200 akim
@@ -472,8 +472,13 @@ sub parse_args ()
   Getopt::Long::Configure ("pass_through");
   getopt ("s|language=s" => \$language);
   Getopt::Long::Configure ("defaults");
-  unshift @ARGV, @{$language{$language}}
-    if $language;
+
+  if ($language)
+    {
+      die "$me: unknown language: $language\n"
+       unless exists $language{$language};
+      unshift @ARGV, @{$language{$language}};
+    }

   verbose "arguments: @ARGV\n"
     if $debug;



reply via email to

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