[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
32-autore-gettextize.patch
From: |
Akim Demaille |
Subject: |
32-autore-gettextize.patch |
Date: |
Mon, 15 Oct 2001 10:02:23 +0200 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* 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.
Index: bin/autoheader.in
--- bin/autoheader.in Mon, 08 Oct 2001 01:38:43 +0200 akim
+++ bin/autoheader.in Thu, 11 Oct 2001 19:43:00 +0200 akim
@@ -44,12 +44,8 @@
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 @@
$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 @@ 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 (cumulative)
-f, --force consider all files obsolete
-W, --warnings=CATEGORY report the warnings falling in CATEGORY
@@ -76,6 +71,9 @@ Usage: $0 [OPTION] ... [TEMPLATE-FILE]
\`none\' turn off all the warnings
\`error\' warnings are error
+Library directories:
+ -I, --include=DIR look for files in DIR (cumulative)
+
Report bugs to <address@hidden>.
END
@@ -84,7 +82,7 @@ Usage: $0 [OPTION] ... [TEMPLATE-FILE]
# --------
$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 @@ sub parse_args ()
# 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;
Index: bin/autoreconf.in
--- bin/autoreconf.in Thu, 11 Oct 2001 18:59:41 +0200 akim
+++ bin/autoreconf.in Thu, 11 Oct 2001 19:44:39 +0200 akim
@@ -66,9 +66,8 @@
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 @@
# --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' => address@hidden,
+ '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)
@@ -186,17 +181,30 @@ sub parse_args ()
}
-# &autoreconf ()
-# --------------
-# Reconf the current directory.
-sub autoreconf ()
+# &maybe_autoreconf ()
+# --------------------
+# If the current file ($_) is configure.ac, then there is work to perform
+# there. Otherwise return. The main point is preserving $_.
+sub maybe_autoreconf ()
{
# If there it's not `configure.ac' or `configure.in', we are not
# interested in the directory.
return
if !/^configure\.(ac|in)$/;
- my $configure_ac = $_;
+ # Save $_ as Find::File requires it to be preserved.
+ my $underscore = $_;
+ autoreconf ($_);
+ $_ = $underscore;
+}
+
+
+# &autoreconf ($CONFIGURE_AC)
+# ---------------------------
+# Reconf the current directory.
+sub autoreconf ($)
+{
+ my ($configure_ac) = @_;
verbose "working on $configure_ac";
# If there is no AC_INIT, then we are not interested: it looks like
@@ -230,6 +238,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 +273,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 +363,4 @@ sub autoreconf ()
mktmpdir ('ah');
$ENV{'TMPDIR'} = $tmp;
parse_args;
-find (\&autoreconf, '.');
+find (\&maybe_autoreconf, '.');
- 32-autore-gettextize.patch,
Akim Demaille <=