[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04-fyi-languages-in-languages.patch
From: |
Akim Demaille |
Subject: |
04-fyi-languages-in-languages.patch |
Date: |
Sun, 23 Sep 2001 19:22:23 +0200 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* lib/Autom4te/General.pm (&debug): New.
* bin/autom4te.in ($language): Move to...
(parse_args): here.
Handle --language in languages.
* lib/autom4te.in (Automake-selections, Autoheader-selections)
(Autoscan-selections): New.
(Autoconf): Adjust.
Index: bin/autom4te.in
--- bin/autom4te.in Sun, 23 Sep 2001 08:45:24 +0200 akim
+++ bin/autom4te.in Sun, 23 Sep 2001 10:42:27 +0200 akim
@@ -234,9 +234,8 @@ sub load
my $datadir = $ENV{'AC_MACRODIR'} || '@datadir@';
my $autom4te_cfg = $ENV{'AUTOM4TE_CFG'} || "$datadir/autom4te.cfg";
-# $LANGUAGE{$LANGUAGE} is the list of automatic options for $LANGUAGE.
+# $LANGUAGE{LANGUAGE} -- Automatic options for LANGUAGE.
my %language;
-my $language;
my $output = '-';
@@ -460,25 +459,29 @@ sub load_configuration ()
# Process any command line arguments.
sub parse_args ()
{
- my @trace;
-
# We want to look for the early options, which should not be found
# in the configuration file. Prepend to the user arguments.
- Getopt::Long::Configure ("pass_through");
- getopt ("l|language=s" => \$language);
- Getopt::Long::Configure ("defaults");
-
- if ($language)
- {
- die "$me: unknown language: $language\n"
- unless exists $language{$language};
- unshift @ARGV, @{$language{$language}};
- }
+ # Perform this repeatedly so that we can use --language in language
+ # definitions.
+ my $language;
+ do {
+ $language = undef;
+ Getopt::Long::Configure ("pass_through");
+ getopt ("l|language=s" => \$language);
+
+ if ($language)
+ {
+ die "$me: unknown language: $language\n"
+ unless exists $language{lc $language};
+ unshift @ARGV, @{$language{lc $language}};
+ }
+ } while $language;
- verbose "arguments: @ARGV\n"
- if $debug;
+ debug "arguments: @ARGV\n";
# Process the arguments for real this time.
+ my @trace;
+ Getopt::Long::Configure ("defaults");
getopt
(
# Operation modes:
Index: lib/autom4te.in
--- lib/autom4te.in Sun, 16 Sep 2001 15:14:29 +0200 akim
+++ lib/autom4te.in Sun, 23 Sep 2001 10:28:16 +0200 akim
@@ -19,31 +19,35 @@
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-## ---------- ##
-## Autoconf. ##
-## ---------- ##
+## -------------------------- ##
+## Autoheader preselections. ##
+## -------------------------- ##
-begin-language: "Autoconf"
-# patterns: "*.ac"
-# patterns: "configure.in"
-args: --include @datadir@
-args: autoconf/autoconf.m4f
-args: acsite.m4?
-args: aclocal.m4?
-args: --mode 777
-args: --warning syntax
-args: --normalize
-# Wanted by autoheader
+begin-language: "Autoheader-preselections"
args: --preselect AC_CONFIG_HEADERS
args: --preselect AH_OUTPUT
args: --preselect AC_DEFINE_TRACE_LITERAL
-# Wanted by Automake
+end-language: "Autoheader-preselections"
+
+
+## ------------------------ ##
+## Automake-preselections. ##
+## ------------------------ ##
+
+begin-language: "Automake-preselections"
args: --preselect AC_LIBSOURCE
args: --preselect AC_SUBST
args: --preselect AM_CONDITIONAL
args: --preselect AC_LIBSOURCE
args: --preselect AC_CONFIG_FILES
-# Wanted by autoscan
+end-language: "Automake-preselections"
+
+
+## ------------------------ ##
+## Autoscan-preselections. ##
+## ------------------------ ##
+
+begin-language: "Autoscan-preselections"
args: --preselect AC_CHECK_FUNCS
args: --preselect AC_CHECK_HEADERS
args: --preselect AC_CHECK_LIB
@@ -103,8 +107,29 @@ args: --preselect AC_TYPE_PID_T
args: --preselect AC_TYPE_SIGNAL
args: --preselect AC_TYPE_SIZE_T
args: --preselect AC_TYPE_UID_T
+end-language: "Autoscan-preselections"
+
+
+## ---------- ##
+## Autoconf. ##
+## ---------- ##
+
+begin-language: "Autoconf"
+# patterns: "*.ac"
+# patterns: "configure.in"
+args: --include @datadir@
+args: autoconf/autoconf.m4f
+args: acsite.m4?
+args: aclocal.m4?
+args: --mode 777
+args: --warning syntax
+args: --normalize
+args: --language Autoheader-preselections
+args: --language Autoscan-preselections
+args: --language Automake-preselections
end-language: "Autoconf"
+
## -------- ##
## Autotest ##
## -------- ##
@@ -118,6 +143,7 @@ args: --mode 777
args: --warning syntax
end-language: "Autotest"
+
## ---- ##
## M4sh ##
## ---- ##
@@ -129,6 +155,7 @@ args: m4sugar/m4sh.m4
args: --mode 777
args: --warning syntax
end-language: "M4sh"
+
## ------- ##
## M4sugar ##
Index: lib/Autom4te/General.pm
--- lib/Autom4te/General.pm Tue, 04 Sep 2001 09:24:41 +0200 akim
+++ lib/Autom4te/General.pm Sun, 23 Sep 2001 10:40:16 +0200 akim
@@ -29,7 +29,7 @@
use vars qw (@ISA @EXPORT);
@ISA = qw (Exporter);
address@hidden = qw (&find_configure_ac &find_file &getopt &mktmpdir &mtime
address@hidden = qw (&debug &find_configure_ac &find_file &getopt &mktmpdir
&mtime
&uniq &update_file &verbose &xsystem
$debug $help $me $tmp $verbose $version);
@@ -89,6 +89,16 @@ sub END
}
+# debug(@MESSAGE)
+# ---------------
+# Messages displayed only if $DEBUG and $VERBOSE.
+sub debug (@)
+{
+ print STDERR "$me: ", @_, "\n"
+ if $verbose && $debug;
+}
+
+
# $CONFIGURE_AC
# &find_configure_ac ()
# ---------------------
@@ -296,8 +306,8 @@ sub update_file ($$)
}
-# verbose
-# -------
+# verbose(@MESSAGE)
+# -----------------
sub verbose (@)
{
print STDERR "$me: ", @_, "\n"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 04-fyi-languages-in-languages.patch,
Akim Demaille <=