Commit Graph

236 Commits

Author SHA1 Message Date
Pavel Roskin
9c5fe516c9 * autoscan.pl (scan_c_file): When in verbose mode, don't print
out hashes common for the whole package. Do it in scan_files()
instead.
(scan_makefile): Likewise.
(scan_sh_file): Likewise.
Thanks to Jim Meyering for improved implementation.
2001-02-02 18:15:36 +00:00
Pavel Roskin
7aaa1f5959 * autoreconf.sh: Fix the case when the verbose output was not
redirected to stderr as everywhere else.
2001-02-01 23:23:57 +00:00
Akim Demaille
4d2b6bfb9a * autoheader.sh: Don't pass a string to 'echo' that might
possibly contain backslashes.
2001-01-30 10:42:36 +00:00
Akim Demaille
6eaa0cd781 * autoscan.pl: Do scan `configure.ac' when you claim it.
From Raja R Harinath.
(@kinds): Use `qw', rather than lots of quotes and commas.
(%generic_macro): Use single quotes around literals.
($configure_scan): Define global, and use it instead of the literal.
Use `warn' in place of `printf STDERR'.
2001-01-29 09:50:01 +00:00
Akim Demaille
8af30c8986 * autoscan.pl: `Formatting++' changes: prototypes all the
functions, no longer use `&' to call functions as it disables
prototype checking, topological sort so that functions are defined
before being used, and put an Autoconf like nice comment to
describe the functions.
(output): Accept an CONFIGURE_SCAN parameters, and open CONF.
2001-01-29 09:24:13 +00:00
Akim Demaille
5b494c3353 * autoreconf.sh (find): Fix precedence.
(aclocal): Same as below for autoheader.
2001-01-26 16:10:42 +00:00
Akim Demaille
88d2fd8441 * autoreconf.sh (autoheader): Run it when there is no template, as
there is no risk to override a handwritten template.
From Assar Westerlund.
2001-01-26 14:42:14 +00:00
Akim Demaille
2092655553 * autoreconf.sh: Also find configure.in. 2001-01-25 16:02:08 +00:00
Akim Demaille
f2f63c8cb6 * autoscan.pl (output): Detect/report a close failure. 2001-01-24 17:44:59 +00:00
Akim Demaille
4c23c729fa * autoscan.pl (generic_macro): s/AC_CHECK_FUNCTIONS/AC_CHECK_FUNCS/.
* acfunctions: Just like the previous patch.
2001-01-24 07:58:59 +00:00
Akim Demaille
b6c86b528a * autoscan.pl (@kinds, %generic_macro): New.
(&init_tables): Use them.
* acheaders: Run `autoconf -t AC_CHECK_HEADERS:'$1'' on the fileutils,
and include all these headers in here.
Don't specify `AC_CHECK_HEADERS' as it's the default.
2001-01-24 07:58:46 +00:00
Akim Demaille
c0e271d2a6 * autoscan.pl: Just like the previous patch, but for
AC_CHECK_FUNCS, AC_CHECK_TYPES, and AC_CHECK_MEMBERS.
2001-01-24 07:58:31 +00:00
Akim Demaille
a29dd40a44 * autoscan.pl (print_unique): Push all the macro invocation
locations.
(output_headers): For headers that need to be checked, push either
the specialized macro, or the generic macro call.
(check_configure_ac): Handle AC_CHECK_HEADERS.
2001-01-24 07:58:16 +00:00
Akim Demaille
8538546df6 * autoscan.pl: Don't use `defined' to check whether an array is
defined.
Don't use parens with `defined'.
2001-01-23 10:28:29 +00:00
Pavel Roskin
487edb489f * autoscan.pl: Use "use strict". Declare all global variables
or make them private. Make all local variables private.
(find_autoconf): New, moved some code from the top level.
Use %ENV outside quotes to eliminate a warning.
2001-01-22 20:21:33 +00:00
Akim Demaille
2b4643604b * autoscan.pl ($dir, $autoconf): New. 2001-01-22 19:05:16 +00:00
Akim Demaille
c3aa22ab53 * autoscan.pl ($headers, $functions, $identifiers, $libraries):
Also register locations of their requirement instead of a simple
counter.
(&check_configure_ac): Close TRACES.
2001-01-22 19:04:47 +00:00
Akim Demaille
9229a5416d * autoscan.pl: Formatting changes.
Check `configure.ac' or `configure.in' if present.
2001-01-22 19:04:00 +00:00
Akim Demaille
2711ab3056 * autoscan.pl (&wanted): Don't register `Makefile' when
`Makefile.in' is present.
Factor the simplification of $name.
(&scan_makefile, &scan_sh_file): Instead of counting the number of
occurrences where a program/makevar is wanted, register	file:line.
Adjust the verbose output.
(&check_configure_ac): Report the location where the macro is required.
2001-01-22 19:01:40 +00:00
Akim Demaille
85065e6ad0 * autoscan.pl: Instead of undefined globals, set them to empty
values.
(%needed_macros): New.
(&check_configure_ac): New.  Call it.
(&output_libraries): Eve out from &output_programs.
(&print_unique): For the time being register in %needed_macros
only argument less macros.
2001-01-22 19:01:23 +00:00
Akim Demaille
e2e36c55ce * Makefile.am (editpl, editsh): Merge into...
(edit).
* m4sh.m4 (AS_UNAME): Eved out from...
* acgeneral.m4 (_AC_INIT_DEFAULTS): here.
(_AC_INIT_PACKAGE): Define AC_PACKAGE_NAME.
(_AC_INIT_PARSE_ARGS): AC_SUBST the PACKAGE_ variables.
Propagate their use in the executables and the test suite.
* tests/atgeneral.m4 (PATH): Include only absolute paths.
(AT_INIT): Use AS_UNAME.
2001-01-16 10:25:57 +00:00
Akim Demaille
5058e82d54 * acgeneral.m4: Last changes for `configure.ac'.
(_AC_INIT_HELP, _AC_OUTPUT_SUBDIRS): Take `configure.ac' into
account.
* autoreconf.sh: Likewise.
2001-01-12 09:19:59 +00:00
Akim Demaille
3e7682ecb7 * autoconf.sh (M4): Handle PC drive letters.
* autoupdate.sh: Likewise.
2001-01-11 14:18:48 +00:00
Pavel Roskin
86ac9c829a * autoreconf.sh: s/localddir/localdir/.
Reported by Motoyuki Kasahara.
2000-12-25 14:57:53 +00:00
Akim Demaille
cd7cd7bf31 * autoconf.sh: Promote configure.ac' over configure.in'.
* autoreconf.sh: Likewise.
* autoheader.sh: Ditto.
* autoupdate.sh: Similarly.
* doc/autoconf.texi: Adjust.
* tests/atspecific.m4: Be sure to remove configure.in.
Adjust the test suite to use `configure.ac'.
2000-12-23 10:11:57 +00:00
Pavel Roskin
21ca8441bc * autoconf.sh: If the "allowed" pattern is not defined set it
to "^$".
* tests/tools.at (autoconf: forbidden tokens, basic): New test.
(autoconf: forbidden tokens): Renamed to ...
(autoconf: forbidden tokens, exceptions): ... this.
2000-12-15 19:23:16 +00:00
Pavel Roskin
7173ba3da5 * autoscan.pl (init_tables): Allow spaces on the right hand side
in autoscan tables. Die if there are no spaces at all.
(scan_c_file): Use b instead of W so that keywords match at
the beginning and the end of the line.
(scan_sh_file): Likewise.
(scan_makefile): Likewise. Use B to match before `-l'.
(output): Suggest AC_CONFIG_HEADER if any C/C++ sources are
found.
* acidentifiers: Update macros for structure members st_blksize
and st_rdev.
2000-12-12 12:45:41 +00:00
Akim Demaille
9eb6e4e204 The SunOS' egrep fails to process properly the `egrep' invocations
of the test suite.
* tests/aclocal.m4 (AC_STATE_SAVE): If egrep fails, remove the
output file.
* tests/atspecific.m4 (_AT_CHECK_AC_MACRO): Don't check `state-*'
if the files are not present.
* m4sugar.m4 (m4_join): Rename as...
(m4_smash): this.
* tests/aclocal.m4 (join): Move as...
* m4sugar.m4 (m4_flatten): this.
* autoconf.sh (trace.m4): Rename m4_smash as m4_flatten.
2000-12-06 14:05:46 +00:00
Akim Demaille
83e4065f15 * autoconf.sh (task trace): s/m4/$M4/.
* autoheader.sh: When loading trace.sh, catch errors and exit with
a decent error message.
* tests/tools.at: Be sure to test autoconf --trace before
autoheader.
2000-12-06 10:53:58 +00:00
Akim Demaille
e43386442e * m4sugar.m4 (m4_dquote, m4_pattern_forbid, m4_pattern_allow)
(m4_cr_letters, m4_cr_LETTERS, m4_cr_Letters, m4_cr_digits)
(m4_cr_symbols1, m4_cr_symbols2, m4_re_string, m4_re_word)
(m4_init): New macros.
(m4_token_allow): Remove.
* acgeneral.m4: Don't push BODY into the diversion stack.
(AC_PLAIN_SCRIPT): Do it.
Call m4_init, define the Autoconf patterns.
(AC_INIT): Use AC_PLAIN_SCRIPT.
Remove the useless `dnl' (those where the current diversion is
KILL).
* autoconf.sh (m4_common): Fix quotation.
(finalize.awk): Load forbidden.rx and allowed.rx.
Split the line into tokens, and check their validity.
* tests/tools.at (Forbidden tokens): Adjust.
2000-12-06 08:58:13 +00:00
Akim Demaille
5eb1d8aeb6 POSIX doesn't require s/[^/]// to work.
From Paul Eggert and Johan Danielsson.
* doc/autoconf.texi (Limitations of Usual Tools) <sed>:
Reorganize.  Document this issue.
* autoupdate.sh (dir): Use `,' as separator instead of `/'
* autoreconf.sh: Likewise.
* autoupdate.sh: Ditto.
2000-11-16 10:12:50 +00:00
Akim Demaille
e62a041a2f Provide a means for escaping the forbidden patterns test.
* tests/tools.at (Forbidden tokens): Test m4_token_allow.
* m4sugar.m4 (m4_file_append, m4_token_allow): New macros.
* autoconf.sh (task script): Pass `tmp' and `verbose' to
finalize.awk.
(finalize.awk::check_patterns): Eve out from the body.
(finalize.awk): Read `$tmp/tokens_allowed', and don't complain for
these exceptions.
2000-11-16 08:33:46 +00:00
Pavel Roskin
fddcd13579 * autoscan.pl (scan_files): Eliminate a warning if no C files
are found.
(output): Likewise. Use AC_CONFIG_SRCDIR and AC_CONFIG_FILES
instead of old-style arguments for AC_INIT and AC_OUTPUT.
2000-11-10 15:49:15 +00:00
Pavel Roskin
603fad0c9c * autoconf.sh: Temporarily disable recognizing of abbreviated
long options - it's hard to maintain them by hand.
* autoheader.sh: Likewise.
* autoreconf.sh: Likewise.
* autoupdate.sh: Likewise.
* ifnames.sh: Likewise.
2000-11-07 17:58:43 +00:00
Akim Demaille
f1ba26c218 * tests/tools.at (unexpanded macros): Strengthen.
* autoconf.sh (finalize.awk): Use `sub' instead of `index' +
`substr'.
More comments.
2000-11-03 15:08:28 +00:00
Pavel Roskin
48f158e039 * ifnames.sh: Put the opening brace on the same line with
patterns. Reported by Paul Martinolich.
        * tests/tools.at (AWK portability): Check ifnames.
        (ifnames): New test for ifnames.
        * THANKS: Updated.
2000-11-02 17:03:32 +00:00
Akim Demaille
5b4f860940 * autoconf.sh (trace.m4): Move all the M4 builtins into `at_'.
Catch the failures of the big pipe.
2000-11-02 16:03:58 +00:00
Akim Demaille
ff03218ac3 * tests/tools.at (Tracing M4 builtins): New test.
* autoconh.sh (trace_format): Fix its computation.
2000-11-02 15:32:23 +00:00
Akim Demaille
648bf798eb * autoconf.sh (task trace) [debug]: Instead of a long pipe, extend
trace.m4.
2000-11-02 15:06:02 +00:00
Akim Demaille
2353e0d366 * m4sugar.m4 (popdef, pushdef): Rename as...
(m4_popdef, m4_pushdef): these.
Adjust dependencies.
* acgeneral.m4: Adjust.
* aclang.m4: Likewise.
* autoconf.m4 (popdef, pushdef): Reactivate them.
2000-11-02 14:12:18 +00:00
Pavel Roskin
33de71ca28 * autoconf.sh: Using trap-safe "exit".
* autoreconf.sh: Likewise.
        * autoupdate.sh: Likewise.
        * tests/base.at: Use AS_EXIT instead of exit in configure.in.
        * tests/m4sh.at: Likewise.
        * tests/semantics.at: Likewise.
2000-11-01 19:57:54 +00:00
Akim Demaille
701a1dde55 GNU M4 1.4 improperly handle the traces of copies of builtins.
* autoconf.sh (task trace): When tracing `BUILTIN' also trace
`m4_BUILTIN'.
2000-11-01 17:02:34 +00:00
Pavel Roskin
a63489da61 * autoconf.sh: Typo: s/m4__warnings/m4_warnings/. 2000-11-01 15:01:54 +00:00
Akim Demaille
82756f7543 Move the handling of classified warnings into M4sugar.
* m4sugar.m4 (m4_diagnose): Remove.
(m4_warning): New.
* acgeneral.m4 (AC_WARNING_IFELSE, _AC_WARNING_IFELSE)
(_AC_WARNING_ERROR_IFELSE, __AC_WARNING_ERROR_IFELSE)
(_AC_DIAGNOSE, AC_DIAGNOSE): Rename as...
* m4sugar.m4 (m4_warning_ifelse, _m4_warning_ifelse)
(_m4_warning_error_ifelse, __m4_warning_error_ifelse)
(_m4_warn, m4_warn): these.
* acgeneral.m4 (AC_DIAGNOSE): Wrapper around `m4_warn'.
* autoconf.sh: Define `m4_warnings' instead of `_AC_WARNINGS'.
2000-10-31 15:20:15 +00:00
Pavel Roskin
80f8404bec * autoconf.sh: When scanning for unexpanded macros match only
words beginning with "A?_" and "m4_" or containing "_A?_".
        Strip the comments before the matching. Don't use character
        ranges.
2000-10-30 03:20:00 +00:00
Pavel Roskin
c46d9d8480 * autoconf.sh: Recognize short options followed by arguments
without separators.
        * autoheader.sh: Likewise.
        * autoreconf.sh: Likewise. Recognize abbreviations for
        "--autoconf-dir" and "--m4dir"
        * autoupdate.sh: Likewise. Recognize abbreviations for
        "--autoconf-dir"
2000-10-27 13:47:54 +00:00
Pavel Roskin
0dd3144b2e * autoconf.sh: Don't show obsolete options on "--help". Report
obsolete options to stderr. Adjust list of options. Correct
        processing of options. Process options with values separated by
        "=" first, so that abbreviations work. Don't accept "=" with
        short options.
        * autoheader.sh: Likewise.
        * autoreconf.sh: Likewise.
        * autoupdate.sh: Likewise.
        * ifnames.sh: There is no "--verbose" option.
        * doc/autoconf.texi: Option "-A" requires an argument.
        (autoreconf Invocation): Document "--install", "--symlink",
        "--m4dir" and the options passed to Automake.
2000-10-26 22:27:48 +00:00
Akim Demaille
161112fd78 In order to check that all the CPP symbols which are AC_DEFINE'd
are properly templated, autoheader traces
AC_DEFINE/AC_DEFINE_UNQUOTED.  Only literals can be traced, and
actually tracing non literals produces invalid autoheader input.
Hence, provide a means to trace calls to
AC_DEFINE/AC_DEFINE_UNQUOTED with literals.
* acgeneral.m4 (AC_DEFINE_TRACE, AC_DEFINE_TRACE_LITERAL): New
macros.
(AC_DEFINE, AC_DEFINE_UNQUOTED): Use AC_DEFINE_TRACE.
* autoheader.sh: Trace AC_DEFINE_TRACE_LITERAL, not
AC_DEFINE/AC_DEFINE_UNQUOTED.
2000-10-23 18:32:17 +00:00
Akim Demaille
1e3cdfe0a3 * acgeneral.m4: Adjust copyright notice.
* acspecific.m4: Likewise.
* acoldnames.m4: Likewise.
* acversion.m4.in: Likewise.
* autoconf.sh: Likewise.
* autoheader.sh: Likewise.
* autoreconf.sh: Likewise.
* autoscan.pl: Likewise.
* autoupdate.sh: Likewise.
* ifnames.sh: Likewise.
2000-10-16 18:25:55 +00:00
Akim Demaille
e6600f6485 * autoconf.sh: Report full macro name for missing macros. 2000-09-27 10:29:30 +00:00