From 56eefd1f8d1ef11a742bb89b5fd18014c8eed0ae Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 20 Oct 2001 06:51:41 +0000 Subject: [PATCH] * bin/autoheader.in ($localdir, $m4, $SIMPLE_BACKUP_SUFFIX): Remove, dead. * bin/autoreconf.in (&autoreconf): Do not run gettextize when `intl' is already present, as it refuses unless --force. (&parse_args): Use -I, --include instead of the old Autoconf options. ($localdir, $autoconf_dir): Remove. (@include): New. (&maybe_autoreconf): New, to preserve $_ for File::Find. --- ChangeLog | 12 ++++++++++++ bin/autoheader.in | 14 ++++++-------- bin/autoreconf.in | 49 +++++++++++++++++++++++------------------------ man/autoheader.1 | 9 +++++---- man/autoreconf.1 | 7 ++----- 5 files changed, 49 insertions(+), 42 deletions(-) diff --git a/ChangeLog b/ChangeLog index c5bf97a9..ddec948a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2001-10-20 Akim Demaille + + * bin/autoheader.in ($localdir, $m4, $SIMPLE_BACKUP_SUFFIX): + Remove, dead. + * bin/autoreconf.in (&autoreconf): Do not run gettextize when + `intl' is already present, as it refuses unless --force. + (&parse_args): Use -I, --include instead of the old Autoconf + options. + ($localdir, $autoconf_dir): Remove. + (@include): New. + (&maybe_autoreconf): New, to preserve $_ for File::Find. + 2001-10-19 Jens Petersen * lib/autoconf/programs.m4 (AC_PROG_AWK): Prefer gawk to mawk. diff --git a/bin/autoheader.in b/bin/autoheader.in index 8b0f2263..fc7c5e3a 100644 --- a/bin/autoheader.in +++ b/bin/autoheader.in @@ -44,12 +44,8 @@ use vars qw ($config_h %verbatim %symbol); my $autom4te = $ENV{'AUTOM4TE'} || '@autom4te-name@'; local $config_h; my $config_h_in; -my $localdir = '.'; my @include; my @warning; -# m4. -my $m4 = $ENV{"M4"} || "@M4@"; -my $SIMPLE_BACKUP_SUFFIX = $ENV{'SIMPLE_BACKUP_SUFFIX'} || '~'; # $HELP @@ -57,7 +53,7 @@ my $SIMPLE_BACKUP_SUFFIX = $ENV{'SIMPLE_BACKUP_SUFFIX'} || '~'; $help = <<"END"; Usage: $0 [OPTION] ... [TEMPLATE-FILE] -Create a template file of C \`#define\' statements for \`configure\' to +Create a template file of C \`\#define\' statements for \`configure\' to use. To this end, scan TEMPLATE-FILE, or \`configure.ac\' if present, or else \`configure.in\'. @@ -65,7 +61,6 @@ or else \`configure.in\'. -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 (cumulative) -f, --force consider all files obsolete -W, --warnings=CATEGORY report the warnings falling in CATEGORY @@ -76,6 +71,9 @@ Warning categories include: \`none\' turn off all the warnings \`error\' warnings are error +Library directories: + -I, --include=DIR look for files in DIR (cumulative) + Report bugs to . END @@ -84,7 +82,7 @@ END # -------- $version = <<"END"; autoheader (@PACKAGE_NAME@) @VERSION@ -Written by Roland McGrath. +Written by Roland McGrath and Akim Demaille. Copyright 1992, 1993, 1994, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. @@ -152,7 +150,7 @@ END # Set up autoconf. my $autoconf = "$autom4te --language=autoconf "; -$autoconf .= join (' ' , map { "--include=$_" } @include); +$autoconf .= join (' ', map { "--include=$_" } @include); $autoconf .= ' --debug' if $debug; $autoconf .= ' --force' if $force; $autoconf .= ' --verbose' if $verbose; diff --git a/bin/autoreconf.in b/bin/autoreconf.in index 17c0afab..f3a8ad0e 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -66,9 +66,8 @@ The option `--install' is similar to the option `--add-missing' in other tools. Library directories: - -A, --autoconf-dir=ACDIR location of Autoconf's macro files (rarely needed) - -l, --localdir=DIR location of `aclocal.m4' and `acconfig.h' - -M, --m4dir=M4DIR this package's Autoconf extensions + -I, --include=DIR look for FILES in DIR (cumulative) + -M, --m4dir=M4DIR this package's Autoconf extensions Unless specified, heuristics try to compute `M4DIR' from the `Makefile.am', or defaults to `m4' if it exists. @@ -100,8 +99,7 @@ my $gettextize = $ENV{'GETTEXTIZE'} || 'gettextize'; # --install -- as --add-missing in other tools. my $install = 0; -my $localdir = '.'; -my $autoconf_dir = '.'; +my @include; # m4dir -- local Autoconf extensions. Typically `m4'. my $m4dir; my $status = 0; @@ -121,11 +119,10 @@ sub parse_args () { my $srcdir; - getopt ('l|localdir=s' => \$localdir, - 'A|autoconf-dir|m|macrodir=s' => \$autoconf_dir, - 'M|m4dir=s' => \$m4dir, - 'i|install' => \$install, - 's|symlink' => \$symlink); + getopt ('I|include|A|autoconf-dir|m|macrodir|l|localdir=s' => \@include, + 'M|m4dir=s' => \$m4dir, + 'i|install' => \$install, + 's|symlink' => \$symlink); die "$me: too many arguments\n" if @ARGV; @@ -147,19 +144,17 @@ sub parse_args () } # Dispatch autoreconf's option to the tools. - # --localdir - $autoconf .= " --include=$autoconf_dir --include=$localdir"; - $autoheader .= " --include=$autoconf_dir --include=$localdir"; + # --include; + $autoconf .= join (' ', map { "--include=$_" } @include); + $autoheader .= join (' ', map { "--include=$_" } @include); + # --install and --symlink; if ($install) { - $automake .= ' --add-missing'; - $automake .= ' --copy' - unless $symlink; - $gettextize .= ' --copy' - unless $symlink; - $libtoolize .= ' --copy' - unless $symlink; + $automake .= ' --add-missing'; + $automake .= ' --copy' unless $symlink; + $gettextize .= ' --copy' unless $symlink; + $libtoolize .= ' --copy' unless $symlink; } # --force; if ($force) @@ -230,6 +225,10 @@ sub autoreconf () { verbose "$configure_ac: not using Gettext"; } + elsif (-d 'intl') + { + verbose "$configure_ac: not running gettextize: `intl' is already present"; + } else { xsystem ($gettextize); @@ -261,14 +260,14 @@ sub autoreconf () # Running aclocal. # # ----------------- # - if (-f "$localdir/aclocal.m4" && - !up_to_date_p ("$localdir/aclocal.m4", "$localdir/acinclude.m4")) + if (-f 'aclocal.m4' && + !up_to_date_p ('aclocal.m4', 'acinclude.m4')) { # If there are flags for aclocal in Makefile.am, use them. my $aclocal_flags; - if (-f "Makefile.am") + if (-f 'Makefile.am') { - my $aclocal_m4 = new Autom4te::XFile "Makefile.am"; + my $aclocal_m4 = new Autom4te::XFile 'Makefile.am'; while ($_ = $aclocal_m4->getline) { if (/^ACLOCAL_[A-Z_]*FLAGS\s*=\s*(.*)/) @@ -351,4 +350,4 @@ sub autoreconf () mktmpdir ('ah'); $ENV{'TMPDIR'} = $tmp; parse_args; -find (\&autoreconf, '.'); +find (\&maybe_autoreconf, '.'); diff --git a/man/autoheader.1 b/man/autoheader.1 index 392681d1..1131c93e 100644 --- a/man/autoheader.1 +++ b/man/autoheader.1 @@ -22,9 +22,6 @@ verbosely report processing \fB\-d\fR, \fB\-\-debug\fR don't remove temporary files .TP -\fB\-I\fR, \fB\-\-include\fR=\fIDIR\fR -look for input files in DIR (cumulative) -.TP \fB\-f\fR, \fB\-\-force\fR consider all files obsolete .TP @@ -46,8 +43,12 @@ turn off all the warnings .TP `error' warnings are error +.SS "Library directories:" +.TP +\fB\-I\fR, \fB\-\-include\fR=\fIDIR\fR +look for files in DIR (cumulative) .SH AUTHOR -Written by Roland McGrath. +Written by Roland McGrath and Akim Demaille. .PP Copyright 1992, 1993, 1994, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. diff --git a/man/autoreconf.1 b/man/autoreconf.1 index f73087d7..aa6bdd25 100644 --- a/man/autoreconf.1 +++ b/man/autoreconf.1 @@ -40,11 +40,8 @@ The option `--install' is similar to the option `--add-missing' in other tools. .SS "Library directories:" .TP -\fB\-A\fR, \fB\-\-autoconf\-dir\fR=\fIACDIR\fR -location of Autoconf's macro files (rarely needed) -.TP -\fB\-l\fR, \fB\-\-localdir\fR=\fIDIR\fR -location of `aclocal.m4' and `acconfig.h' +\fB\-I\fR, \fB\-\-include\fR=\fIDIR\fR +look for FILES in DIR (cumulative) .TP \fB\-M\fR, \fB\-\-m4dir\fR=\fIM4DIR\fR this package's Autoconf extensions