Commit Graph

312 Commits

Author SHA1 Message Date
Akim Demaille
6acd8f5313 * lib/autom4te.in: New.
* lib/Makefile.am (edit, autom4te.cfg): New.
* bin/autom4te.in (BEGIN): Simplify.
Rely on `AC_MACRODIR' in addition of `autom4te_perllibdir'.
(&load_configuration): New.  Use it.
(&parse_args): Support --mode, --set, and --melt.
* bin/autoconf.in: Simplify and adjust.
* tests/Makefile.am (AUTOMAKE): Use --set.
* tests/atlocal.in: Adjust.
* BUGS: distcheck and check are weak.
2001-08-29 09:52:49 +00:00
Akim Demaille
ba3b08af20 Automake 1.5.
* Makefile.am (AUTOMAKE_OPTIONS): Add 1.5 and dist-bzip2.
(AMTAR): Help automake define it.
(INSTALL, install-data-hook): The INSTALL.txt trick is no longer
needed, 1.5 can have a macro and a target with the same name.
* m4/auxdir.m4, m4/cond.m4, m4/depend.m4, m4/install-sh.m4,
* m4/strip.m4: New.
* m4/init.m4, m4/sanity.m4: Update.
* doc/Makefile.am (CLEANFILES): 1.5 knows the texi2dvi files.
* lib/autoconf/Makefile.am, lib/autotest/Makefile.am,
* lib/m4sugar/Makefile.am, lib/autoscan/Makefile.am,
* lib/Autom4te/Makefile.am, man/Makefile.am: Use dist/nodist.
2001-08-27 07:12:16 +00:00
Akim Demaille
f827e95708 Provide a mean to ``AC_PREREQ'' for M4sugar, M4sh and Autotest.
* lib/autoconf/version.in: Remove.
* lib/m4sugar/version.in: New.
* lib/m4sugar/m4sugar.m4 (m4_acversion, m4_version_prereq): New.
Adjust callers.
* bin/autoupdate.in: Distinguish M4sugar vs. Autoconf macros by
the name of the directory they're in, instead of the filename,
since version.m4 is now in m4sugar, but m4_acversion must not be
classified as an Autoconf macro.
($input_m4): Don't qualify the path to m4sugar.
Rather, pass autoconf_dir to m4.
* tests/Makefile.am (testsuite): Remove -I top_srcdir, unneeded.
* tests/suite.at: Require 2.52c.
2001-08-27 07:08:56 +00:00
Akim Demaille
22d6c214ea * bin/autom4te.in (handle_output): Handle @__@. 2001-08-20 14:44:26 +00:00
Akim Demaille
d69c3d31b4 * bin/autom4te.in (&parse_args): Recognize --normalize. 2001-08-17 12:38:53 +00:00
Akim Demaille
80001aa3dc * bin/autom4te.in: --normalize is a new option.
* bin/autoconf.in: Use it.
2001-08-17 12:06:56 +00:00
Akim Demaille
40556ab827 * bin/Makefile.am, lib/Autom4te/Makefile.am, lib/autoconf/Makefile.am
* lib/autotest/Makefile.am, lib/m4sugar/Makefile.am: Add TAGS support.
2001-08-17 12:06:44 +00:00
Akim Demaille
283bf6a536 * bin/autom4te.in (@m4_warning): New.
(&handle_m4): Use it.
* tests/m4sugar.at (m4_warn): Pass `-f' to autom4te to ensure the
warnings are issued at each run.
* tests/atspecific.m4 (AT_CHECK_M4SUGAR, AT_CHECK_M4SH): M4sugar
is in the src tree.
2001-08-15 07:49:59 +00:00
Akim Demaille
14a3c0c717 * bin/autom4te.in (&handle_output): Don't use `grep' with side
effects.
Suggested by Russ Allbery.
2001-08-10 07:48:09 +00:00
Akim Demaille
0b0cae0fed * bin/autom4te.in ($icache): Load it only if older than autom4te. 2001-08-09 10:27:40 +00:00
Akim Demaille
dbf7fc61b5 * bin/autoconf.in, bin/autoheader.in: --force, -f is a new option. 2001-08-07 07:55:07 +00:00
Akim Demaille
bbfdf23a93 Don't rely on M4sugar outputting the patterns in files, since we
might process the output _without_ running m4, hence without these
files.
* lib/m4sugar/m4sugar.m4 (m4_init): No need for `m4_tmpdir'.
* bin/autom4te.in (@Request::includes): Remove, unused.
(@Request::source): Rename as...
(@Request::input): this.
(@preselect): Add `m4_pattern_forbid' and `m4_pattern_allow'.
(&handle_output): Fetch the patterns from the traces.
`$forbidden' and `$allowed' are constant: use m//o.
(&handle_m4): M4sugar no longer wants `m4_tmpdir'.
(m4_pattern_forbid, m4_pattern_allow): Adjust for tracing only.
2001-08-04 13:16:47 +00:00
Akim Demaille
f12c18c780 autoconf && autoheader' is sped up. Now, speed up autoheader &&
autoconf', i.e., in addition to caching traces, cache the output.
* bin/autom4te.in (Request::cache): Rename as...
(Request::id): this.
($cache, $icache, $tcache, $ocache): New.
(&handle_m4): Save M4 output in the cache instead of $tmp.
(&handle_output): Adjust.
(&up_to_date_p): Check that the output cache is up to date too.
(top level): Run `&handle_m4' iff force or the cache is invalid.
Run `&handle_output' if the output cache is more recent.
2001-08-04 13:16:30 +00:00
Akim Demaille
337c1e9594 * bin/autom4te.in ($force): New.
(&parse_args, &print_usage): -f, --force is a new option.
(&handle_output): CPP directives might have spaces after `#'.
(&parse_args): The first file only can be frozen.
2001-08-04 13:16:15 +00:00
Akim Demaille
4ffd4212d6 Don't let autom4te compute the `include' traces several times:
first check that the trace cache file is up to date, and then
compare its timestamp with that of the output.
* bin/autom4te.in, bin/autoupdate.in, bin/autoscan.in: Normalize
the preamble.  Don't require 5.005 as Autom4te::General does it,
and better yet (use `use', not `require'!).
* lib/Autom4te/Struct.pm: Rename the last occurrences of
Class::Struct as Autom4te::Struct.
* lib/Autom4te/General.pm (File::stat): Use it.
(&mtime): New, export it.
* bin/autom4te.in: Use it.
Declare `$req' is invalid if it is outdated.
Don't declare it valid before saving it if something went wrong.
2001-08-04 13:14:39 +00:00
Akim Demaille
4eea9f6530 Autom4te shall not encode Autoconf data, and preselecting traces
must be proposed to the users.
* bin/autom4te.in (@required_trace): Remove.
(@preselect): New.
(&parse_args, &print_usage): -p, --preselect is a new option.
(&up_to_date_p): Adjust.
* bin/autoconf.in: Preselect some Autoconf macros.
2001-08-04 13:14:10 +00:00
Alexandre Duret-Lutz
8fffbbe523 * bin/autom4te.in (handle_traces): Fix rewriting of traces without 2001-08-03 15:22:34 +00:00
Akim Demaille
01f2ae88a0 * bin/autoconf.in ($@): Work around the usual sh bug.
From Nicolas Joly.
2001-08-03 09:23:34 +00:00
Akim Demaille
9fcd1589f5 Clean up the handling of the M4 builtins tracing exception.
* bin/autom4te.in (Request::request): Don't complete M4 builtins
trace requests.
(@m4_builtins): Rename as...
(@m4_builtin): this.
(%m4_builtin_alternate_name): New.
(&parse_args): Complete the trace requests with alternate names.
(&handle_traces): Hence no longer do it here.
(&trace_requests): Remove, unused.
2001-08-03 09:14:38 +00:00
Akim Demaille
7d26817715 * lib/m4sugar/m4sugar.m4 (m4_init): Also forbid `_m4_*' tokens.
(m4_divert_pop): Dump the whole diversion stack when a diversion
mismatch happens.
* bin/autom4te.in (&handle_output): Remember of the first
occurrence of a possibly undefined macro, not the last.
Complain about the possibly undefined macros in the same order as
the appear in the output.
* lib/autoconf/Makefile.am (autoconf.m4f): List its dependencies.
* tests/tools.at (autoconf: forbidden tokens, basic)
(autoconf: forbidden tokens, exceptions): No longer sort
autoconf's stderr, as it is now deterministic.
Check that `dnl' is caught.
2001-08-03 09:09:45 +00:00
Akim Demaille
0a7e3d9bef Add. 2001-08-01 15:11:04 +00:00
Akim Demaille
ca7d52c867 * lib/Autom4te/General.pm: Use carp' and croak', not `warn' and
`die'.
(&END): New.
* bin/autoconf.in, bin/autom4te.in, bin/autoupdate.in: Remove your
`END', as `Autom4te::General::END' will be triggered.
* bin/autoupdate.in, bin/autoscan.in: Improve error messages accuracy.
* bin/autoupdate.in (File::Compare, File::Copy): Use them instead of
system to run `mv', `rm', and `cmp'.
2001-08-01 15:10:36 +00:00
Akim Demaille
f0cd6d6a75 * lib/Autom4te/General.pm (&unique): New.
* bin/autoscan.in (&output): Use it to issue trace requests once.
2001-08-01 15:02:36 +00:00
Akim Demaille
2892d23307 * lib/Autom4te/General.pm: New.
* bin/autom4te.in (Autom4te::General): Use it.
($me, $tmp, $verbose, $debug, &mktmpdir, &verbose, &xsystem)
(&find_configure_ac, &find_slave): Remove.
* bin/autoscan.in: Likewise.
* bin/autoupdate.in: Likewise.
2001-08-01 15:01:16 +00:00
Akim Demaille
93fec71c13 * autoconf.in, autom4te.in, autoscan.in, ifnames.in,
* autoheader.in, autoreconf.in, autoupdate.in: Move to...
* bin: here, new directory.
* lib/Autoconf: Rename as...
* lib/Autom4te: this, to please case insensitive junkie OSes.
2001-08-01 14:28:57 +00:00
Akim Demaille
26056c4bef * autom4te.in ($m4): Handle the --nesting-limit.
* autoconf.in (M4): Remove.
2001-08-01 13:58:44 +00:00
Akim Demaille
ca0684ddb6 * autoconf.in ($AWK): Remove, no longer used.
* test/tools.at: Use AT_CHECK_AUTOCONF.
(AWK portability): Remove, for autoconf no longer uses AWK.
(Syntax of the Perl scripts): New.
* configure.ac: autoconf no longer needs an AWK with a good
regexp engine.
Use a static test on AC_PACKAGE_VERSION.
* autom4te.in (&up_to_date_p): Output depends on the arguments.
* lib/autoconf/Makefile.am: Ship version.m4, maintainer file.
* tests/atconfig.in (PERL): New.
2001-08-01 13:56:52 +00:00
Akim Demaille
b21ca4dd20 * acfunctions.m4: Rename as...
* lib/autoconf/functions.m4: this.
* acgeneral.m4: Rename as...
* lib/autoconf/general.m4: this.
* acheaders.m4: Rename as...
* lib/autoconf/headers.m4: this.
* aclang.m4: Rename as...
* lib/autoconf/lang.m4: this.
* acoldnames.m4: Rename as...
* lib/autoconf/oldnames.m4: this.
* acspecific.m4: Rename as...
* lib/autoconf/specific.m4: this.
* actypes.m4: Rename as...
* lib/autoconf/types.m4: this.
* autoconf.m4: Rename as...
* lib/autoconf/autoconf.m4: this.
* m4sugar.m4: Rename as...
* lib/m4sugar/m4sugar.m4: this.
* m4sh.m4: Rename as...
* lib/m4sugar/m4sh.m4: this.
* tests/atgeneral.m4: Rename as...
* lib/autotest/general.m4: this.
* acfunctions: Rename as...
* lib/autoscan/functions: this.
* acheaders: Rename as...
* lib/autoscan/headers: this.
* acidentifiers: Rename as...
* lib/autoscan/identifiers: this.
* aclibraries: Rename as...
* lib/autoscan/libraries: this.
* acmakevars: Rename as...
* lib/autoscan/makevars: this.
* acprograms: Rename as...
* lib/autoscan/programs: this.
2001-08-01 13:46:22 +00:00
Akim Demaille
8bd95d39ab Prepare file moves. 2001-07-30 08:50:22 +00:00
Pavel Roskin
9e7499b740 * autom4te.in (mktmpdir): Strip trailing newline from mktemp
output.
2001-07-25 14:39:18 +00:00
Akim Demaille
b8ad147903 * autoconf.in: Try to define the variables before using them.
* autom4te.in ($perllibdir): Use `$autom4te_perllibdir' as envvar
instead of `$perllibdir'.
* tests/atconfig.in ($autom4te_perllibdir): Export it.
2001-07-25 07:07:33 +00:00
Akim Demaille
db93100aac * autoconf.in (ac_LF_and_DOT): Remove, unused. 2001-07-25 07:06:59 +00:00
Akim Demaille
27103b83f0 Let autoconf use autom4te for traces.
* autoconf.in ($task, task trace): Remove, merely pass --trace to
autom4te.
* autoheader.in: Don't pass `-' to autoconf, rather, a tmp file.
(Because I found no way for autom4te to accept `-').
* autom4te.in (&Request::request): Beware of M4 builtins.
(END): Don't try to remove the content of an empty dir.
(&parse_args): Default is `$f:$l:$n:$%', not `$f:$l:$n:$*'.
(&handle_output): Set a default value to `$forbidden'.
* autoupdate.in (&verbose, &xsystem): New, from autom4te.in.
($autoconf): Pass --debug and --verbose.
* tests/atspecific.m4 (AT_CHECK_AUTOCONF): Clean up autom4te's
cache.
2001-07-24 09:05:28 +00:00
Akim Demaille
45929722e1 Let autoconf use autom4te to create configure.
* autoconf.in ($automate): New var.
(task script): Use autom4te.
* autom4te.in (File::Spec): Use it.
(&find_file): New.
(&parse_args): --warning is -W, not -w.
Find the top level files.
(&handle_m4): Pass the warnings flags.
Don't report verbosely m4's failures, unless requested.
(&handle_output): Don't complain for forbidden tokens in comments.
Be sure to report all the forbidden tokens within a single line.
(&trace_format_to_m4): Preserve `$_'.
(&handle_traces): Sort the output macros.
(&up_to_date_p): Find the files before trying to get its time stamp.
2001-07-24 08:57:55 +00:00
Akim Demaille
91fbae6966 * Makefile.am: Ship, build and install Autom4te.
(SUBDIRS): Add lib.
* lib/Autoconf/Struct.pm: New, from Automake 1.5.
* configure.in: Require Perl.
* man/autom4te.in: New.
2001-07-24 08:43:06 +00:00
Akim Demaille
beaa477c90 * autoscan.in: Use IO::File.
Adjust all the routines to use it.
($log): New file (autoscan.log).
(output): Dump detailed logs into $log, and a shortened version to
stderr.
(&scan_makefile): Refine the regexp catching tokens in the code.
* doc/autoconf.texi (autoscan Invocation): Document `autoscan.log'
and the `configure.ac' checking feature.
2001-07-14 14:19:19 +00:00
Akim Demaille
f25219dfd6 For some AWK, such as on HPUX 11, xfoo' does not match foo|^bar'.
Reported by Michael Elizabeth Chastain.
* autoconf.in: Refuse such AWK.
* configure.in: Likewise.
* Makefile.am (acversion.m4): Do not use move-if-change this file
has dependencies.
* doc/autoconf.texi (Fortran 77 Compiler): Some typos.
2001-07-12 12:42:46 +00:00
Akim Demaille
d026b456c5 * autoscan.in (&scan_makefile): Improve programs regexp to parse
things like "g++", "file.c" and "some-conf" as tokens.
(&scan_file): Match C++ files extensions.
If the filename extension is C++ then ask for c++.
2001-07-10 09:16:33 +00:00
Akim Demaille
043dcc81de * autoscan.in (&scan_file): Skip FILE if there is FILE.in.
From Jens Petersen.
2001-07-04 07:45:12 +00:00
Akim Demaille
02adf2d812 * autoscan.in ($initfile): Remove.
(&find_file): Rename as...
(&scan_file): this.
Immediately scan the current file, instead of gathering them, and
later having them handled by &scan_files.
(&scan_files): Merely invoke Find::File.
Adjust.
2001-07-03 14:11:06 +00:00
Akim Demaille
4155128221 * autoscan.in: Formatting changes, matching the invocation order.
(File::Find): Use it instead of Perl 4's `find.pl'.
(&wanted): Rename as...
(&find_file): this.
2001-07-03 14:10:41 +00:00
Akim Demaille
80dc65a8a0 * autoscan.in (%macro): Now maps from word to list of macros.
(&init_tables): Die when a word which is already handled by
explicit macros is mapped to the default macro.
(&print_unique): Remove, inlined in...
(&output_kind): here.
(File::Basename): Use it.
(&output): Sort the CONFIG_FILES.
* acheaders: Normalize.
* acfunctions: Likewise.
2001-06-25 06:15:07 +00:00
Akim Demaille
ca36be0606 * autoconf.in (Task traces): Separate the error messages from the
traces to improve robustness.
2001-06-23 22:58:54 +00:00
Akim Demaille
a89977e147 * autoconf.in (M4): Pass --nesting-limit=1024, unless already set
in $M4.
Suggested by Andreas Schwab.
2001-06-18 18:15:24 +00:00
Akim Demaille
9d948a65ed * autoscan.in (&output_kind): Output the comment only if it exists.
(%kind_comment): Add entry for `programs'.
(&output_programs): Use &output_kind.
(&output_functions, &output_identifiers, &output_headers)
(&output_programs): Inline, and remove.
2001-06-12 10:16:49 +00:00
Akim Demaille
49ee5178ef * autoscan.in (%kind_comment): New.
(output_kind): New.
(output_functions, output_identifiers, output_headers): Use it.
2001-06-12 10:05:27 +00:00
Akim Demaille
00e2194dad * autoscan.in (&print_unique): Take $kind' and $word' as
arguments, to factor indirections into `%macro' and `%used'.
(%generic_macro): Fix a typo.
2001-06-12 09:45:01 +00:00
Akim Demaille
54a953b733 * aclibraries: New.
* autoscan.in (@kinds): Add `libraries'.
Use `@kinds' instead of hard coded lists.
(%programs, %headers, %identifiers, %makevars, %libraries, %functions):
Remove, replaced by...
(%used): this.
2001-06-12 09:33:58 +00:00
Akim Demaille
c306314db9 * autoscan.in (%functions_macros %headers_macros)
(%identifiers_macros %programs_macros %makevars_macros): Remove,
replaced by...
(%macro): New.
2001-06-12 08:40:02 +00:00
Akim Demaille
eddc4ccb87 GNU getopt, when POSIXLY_CORRECT does not permute options and
arguments.  So pass the options first.
Fixes PR autoconf/184.
* autoconf.sh (m4_prefiles, m4f_prefiles): New variables.
(run_m4): Remove files.
(run_m4f): Remove.
Update remainder of script to use them.
(for warning in): Do not use a literal comma as it will not be
split by IFS.
2001-06-02 15:45:32 +00:00