Akim Demaille [Sun, 21 Oct 2001 18:09:36 +0000 (18:09 +0000)]
* automake.in (%var_line): Rename as...
(%var_location): this.
Use it consistently as the location where the macro is defined,
file and line when possible, otherwise just file.
(&read_am_file): Rules have their own location tracking, don't
pollute %var_location.
Akim Demaille [Sun, 21 Oct 2001 18:09:09 +0000 (18:09 +0000)]
* automake.in (&am_print_error): Set $exit_status since all your
users do.
(&am_error, &am_file_error, &am_line_error, &am_conf_error):
Don't.
(&am_conf_line_error, &am_conf_line_warning): Remove.
Adjust callers to use &am_file_error and...
(&am_file_warning): new.
Akim Demaille [Sun, 21 Oct 2001 18:05:21 +0000 (18:05 +0000)]
* tests/install.test: This test is an empty shell, do not run
automake.
* tests/Makefile.am (TESTS): Don't run it.
* tests/defs (ACLOCAL): When using gettext, pass in the installed
aclocaldir.
* tests/subdircond.test (SUBDIRS): AM_GNU_GETTEXT needs automake
--add--missing.
* tests/obsolete2.test: Remove, merged into...
* tests/obsolete.test: here.
Both aclocal and automake should complain.
Akim Demaille [Sun, 21 Oct 2001 18:05:03 +0000 (18:05 +0000)]
* automake.in (scan_autoconf_traces): Don't recognize AC_SUBSTs
for symbols which cannot be Make macro names.
(scan_one_autoconf_file): `$here' is new.
Use it consistently instead of `1' to remember a token was seen.
Akim Demaille [Sun, 21 Oct 2001 18:03:19 +0000 (18:03 +0000)]
* tests/defs (ACLOCAL): Point to the installed aclocaldir is
libtool is required.
* tests/lex.test: Run AC_INIT once.
* tests/ldflags.test, tests/listval.test, tests/suffix2.test:
Libtool is required.
* tests/header.test: Built a correct configure.in.
* tests/defun2.test (configure.in): Be a bit respectful with
Autoconf, close the macro invocations.
* tests/confdeps.test: Even when not using aclocal, aclocal.m4
must be correct.
* automake.in (scan_autoconf_traces): Add support for
AC_CANONICAL_HOST, AC_CANONICAL_SYSTEM, A[CM]_PROG_LIBTOOL,
AM_CONFIG_HEADER, AM_MAINTAINER_MODE.
* tests/condincl.test (target): Better pattern, to avoid matching
the definition of `target_alias' which is now properly discovered
as an AC_SUBST by traces.
* cond4.test: Better grep pattern: After all, why shouldn't
TWO_FALSE be AC_SUBST properly.
* tests/installsh.test (AUTOMAKE, ACLOCAL): Adjust.
Akim Demaille [Sat, 20 Oct 2001 11:18:04 +0000 (11:18 +0000)]
* automake.in (&scan_autoconf_traces): Add support for
AM_C_PROTOTYPES, AM_GNU_GETTEXT, AM_PROG_CC_C_O, and
AC_CONFIG_AUX_DIR.
* tests/alpha.test (configure.in): Automake wants a Makefile.
Akim Demaille [Sat, 20 Oct 2001 11:17:49 +0000 (11:17 +0000)]
* automake.in (scan_autoconf_traces): Use an unlikely to be used
separator between trace arguments, in particular not `:' as it is
within AC_CONFIG_FILES's $1.
Akim Demaille [Sat, 20 Oct 2001 11:15:10 +0000 (11:15 +0000)]
* automake.in (&scan_autoconf_traces): Add support for
AM_INIT_AUTOMAKE, AM_CONDITIONAL.
Let @args have a more natural M4 correspondence: $1 is args[1], no
args[0] etc.
(&scan_autoconf_files): Using autoconf traces is no longer a
complement of the previous ad hoc scheme: use either.
Akim Demaille [Fri, 19 Oct 2001 17:07:02 +0000 (17:07 +0000)]
* automake.in (&read_main_am_file): s/generated automatically/
generated/.
Insert @configure_input@, since 2.50 no longer output this
automatically for Makefiles.
* automake.in (handle_languages, handle_single_transform_list,
lang_c_rewrite): Use require_conf_file instead of
require_config_file to require depcomp or compile from Makefile.am.
(require_aux_file_with_line): New function, adapted from
require_conf_gile_with_line.
(require_conf_file_with_line, require_conf_file_with_conf_line):
Simplify using require_aux_file_with_line.
(require_config_file): Simplify using require_conf_file_with_conf_line.
(require_conf_file): New function.
Akim Demaille [Mon, 15 Oct 2001 07:52:49 +0000 (07:52 +0000)]
* m4/depend.m4 (AM_DEP_TRACK): Use AC_SUBST([AMDEPBACKSLASH])
normally, what is wrong is that automake outputs a variable
definition for it, hence...
* automake.in (scan_one_autoconf_file): don't.
* m4/depout.m4 (_AM_OUTPUT_DEPENDENCY_COMMANDS): New, extracted
from...
(AM_OUTPUT_DEPENDENCY_COMMANDS): here. Adjust.
Use AC_CONFIG_COMMANDS.
(_AM_OUTPUT_DEPENDENCY_COMMANDS): Use AS_DIRNAME and AS_MKDIR_P.
Akim Demaille [Mon, 15 Oct 2001 07:52:17 +0000 (07:52 +0000)]
* automake.in (&variable_conditions): Be deterministic and Perl
version independent: sort the result.
(&variable_output, &variable_pretty_output): Sort all the @conds,
not only when defaulted.
* tests/cond3.test: Adjust.
Akim Demaille [Wed, 10 Oct 2001 13:05:13 +0000 (13:05 +0000)]
Do not use Autoconf internals.
* tests/dirname.test: Don't use AC_PLAIN_SCRIPT.
* m4/header.m4 (_AM_DIRNAME): Use regexp and patsubst, not
m4_regexp and m4_patsubst, since the latter are reserved for ERE
macro in GNU M4 1.5.
Akim Demaille [Tue, 2 Oct 2001 17:17:42 +0000 (17:17 +0000)]
* lib/Automake/Struct.pm: Update from Autoconf.
* lib/Automake/General.pm, lib/Automake/XFile.pm: New, from CVS
Autoconf.
* automake.in: Use them.
(&uniq, $me): Remove, as they are provided by Automake::General.
* Makefile.am (maintainer-check): Don't check for 'cd' calls in m4.
* lib/am/tags.am (GTAGS): Use $(am__cd) instead of 'CDPATH=: && cd'.
* lib/am/dejagnu.am (check-DEJAGNU): Likewise.
* lib/am/distdir.am (distcheck): Likewise.
* lib/am/texinfos.am (install-info-am, dist-info): Rewrite without
using cd so we don't have to fiddle with CDPATH.
* lib/am/header-vars.am (am__cd): Define so as to support Zsh and
DOSish path separator.
* automake.in (handle_python): Use require_conf_file_with_conf_line
instead of require_file_with_conf_line, so that elisp-comp and
py-compile are installed in the aux-directory.
(handle_emacs_lisp): Likewise. Define elisp_comp.
* lib/am/lisp.am (.el.elc): Use elisp_comp.
Paul Eggert [Sat, 29 Sep 2001 05:53:02 +0000 (05:53 +0000)]
* lib/mkinstalldirs: Use "mkdir -p" if it works, as that fixes
bugs when making file names with unusual characters. Quote chmod
arg "$dirmode", in case it contains white space.
Incorporate the following change from autoconf mkinstalldirs:
1999-04-10 Ben Elliston <bje@cygnus.com>
Add `-m' flag to specify the mode of a newly created
directory. Add command line usage and `-h', `--help' options.
Contributed by Jeff Garzik.
Paul Eggert [Sat, 29 Sep 2001 05:50:16 +0000 (05:50 +0000)]
Use "mkdir -p" if it works, as that fixes bugs when making file names
with unusual characters. Quote chmod arg "$dirmode", in case it
contains white space.
Incorporate the following change from autoconf mkinstalldirs:
1999-04-10 Ben Elliston <bje@cygnus.com>
* mkinstalldirs: Add `-m' flag to specify the mode of a newly created
directory. Add command line usage and `-h', `--help' options.
Contributed by Jeff Garzik.
Tim Van Holder [Sun, 23 Sep 2001 10:16:50 +0000 (10:16 +0000)]
* m4/auxdir.m4, m4/init.m4: Require autoconf 2.50 and rely on it to
neutralize CDPATH for us.
* m4/init.m4: Don't substitute EXEEXT or OBJEXT anymore.
* lib/am/texibuild.am: Use @PATH_SEPARATOR@, not ':' to build
TEXINPUTS.
Tom Tromey [Thu, 23 Aug 2001 05:00:31 +0000 (05:00 +0000)]
2001-08-22 Richard Boulton <richard@tartarus.org>
Tom Tromey <tromey@redhat.com>
* automake.in (lang_yacc_target_hook): Make header file depend on
.c file, not .y file.
* lib/am/yacc.am: Non-generic rule changed to depend on %OBJ% (the
.c file) rather than %SOURCE% (the .y file) Removed `.y.h' rule.
* tests/yacc7.test: New file.
* tests/Makefile.am (TESTS): Added yacc7.test.
Richard Boulton [Mon, 13 Aug 2001 09:37:48 +0000 (09:37 +0000)]
* automake.in (handle_source_transform): Call
define_objects_from_sources() instead of calling
variable_value_as_list(), handle_single_transform_list() and
define_pretty_variable() directly.
(handle_single_transform_list): Add $topparent parameter, used for
error messages. Improved error message.
(define_objects_from_sources): New function.
(subobjname): New function.
(variable_conditions_recursive): New name for variable conditions.
(variable_value_as_list_recursive): New name for variable_value_as_list.
(variable_value_as_list_worker): Renamed to ...
(variable_value_as_list_recursive_worker): ... this.
(variable_conditions_sub): Renamed to ...
(variable_conditions_recursive_sub): ... this.
(variable_conditions): Rewritten: now doesn't recurse subvariables.
(variable_value_as_list): Rewritten: now doesn't recurse subvariables.
(substfroms): New global.
(substtos): New global.
(substnums): New global.
* tests/cond3.test: Update to work with new method of defining _OBJECTS.
* tests/cond4.test: Update to work with new method of defining _OBJECTS.
* tests/sourcesub2.test: New test.
* tests/Makefile.am (TEST): Added sourcesub2.test.
Richard Boulton [Sat, 11 Aug 2001 00:30:27 +0000 (00:30 +0000)]
* automake.in (handle_single_transform_list): Use new global,
`%linkers_used', to store the linkers used, rather than an internal
variable. Enables correct linker to be calculated across a group
of calls to &handle_single_transform_list. Return only list of
objects, since linker to be used is now externally determined.
(handle_source_transform): adapted for new calling conventions of
handle_single_transform_list. Calls resolve_linker() on a set of
all the linkers used for any prefix, rather than for each prefix in
turn.
(linkers_used): New global.
* tests/link_dist.test: New test.
* tests/Makefile.am (TESTS): Added link_dist.test.
Raja R Harinath [Wed, 8 Aug 2001 21:43:59 +0000 (21:43 +0000)]
Dissociate testsuite 'make' invocations from outer 'make'.
* tests/defs: Unset the MFLAGS, MAKEFLAGS and MAKELEVEL
environment variables.
* tests/cond16.test: Use '$MAKE -s', and avoid GNU make
dependency.
* tests/substref.test: Likewise.
Richard Boulton [Wed, 8 Aug 2001 17:42:25 +0000 (17:42 +0000)]
2001-08-08 Richard Boulton <richard@tartarus.org>
* tests/cond18.test: New file.
* tests/cond19.test: New file.
* tests/cond20.test: New file.
* tests/cond4.test: Updated to check the generated _OBJECTS more
thoroughly.
* tests/Makefile.am (TESTS): Added cond18.test, cond19.test and
cond20.test
Richard Boulton [Wed, 8 Aug 2001 16:44:04 +0000 (16:44 +0000)]
* automake.in (file_contents_internal): if a rule is conditionally
defined, define the standard automake definition for it for those
conditions which are not conditionally defined.
(invert_conditions): New function: invert a list of conditionals.
* tests/cond14.test: New file.
* tests/cond15.test: New file.
* tests/Makefile.am (TESTS): Added cond14.test and cond15.test.
Richard Boulton [Sat, 4 Aug 2001 13:28:48 +0000 (13:28 +0000)]
* tests/cond17.test: New file: test for being able to define an
object to be generated in different ways according to a
conditional.
* tests/Makefile.am (XFAIL_TESTS): Add cond17.test.
(TESTS): Added cond17.test.
Tom Tromey [Sat, 4 Aug 2001 04:02:40 +0000 (04:02 +0000)]
2001-08-02 Richard Boulton <richard@tartarus.org>
* automake.in (variable_conditions_sub): Handle variable
substitution refs when computing conditions based on subvariable
conditions. Fixes substitution refs of system variables when sub
variable is conditional.
(SUBST_REF_PATTERN): New global.
* tests/cond16.test: New file: regression test for variable
substitution refs.
* test/Makefile.am (TESTS): Added cond16.test.
Richard Boulton [Fri, 3 Aug 2001 11:57:13 +0000 (11:57 +0000)]
2001-08-03 Richard Boulton <richard@tartarus.org>
* automake.in (value_to_list): Check for whether $from is defined,
rather than whether it is true, so that empty $froms are allowed in
substitution reference patterns.
* tests/substref.test: New file: test behavior of substitution
references when the $from side of the substitution is empty.
* tests/Makefile.am (TESTS): Added substref.test.
* m4/install-sh.m4: New file.
* m4/Makefile.am (m4data_DATA): Add install-sh.m4.
* m4/missing.m4 (AM_MISSING_INSTALL_SH): Move ...
* m4/install-sh.m4 (AM_PROG_INSTALL_SH): ... here. Don't check
for install.sh any longer, always use install-sh, don't even
fall back to missing. Use $am_aux_dir, making $install_sh absolute.
* m4/strip.m4 (AM_PROG_INSTALL_STRIP): Simplify, since $install_sh
is absolute.
* m4/init.m4: Adjust call to AM_PROG_INSTALL_SH.
Tom Tromey [Wed, 1 Aug 2001 06:04:15 +0000 (06:04 +0000)]
2001-07-31 Richard Boulton <richard@tartarus.org>
Raja R Harinath <harinath@cs.umn.edu>
* automake.in (variable_conditions_sub): Remove @parent_conds
argument. This was old logic - duplicate or impossible
conditionals are removed later by &variable_conditions_reduce().
Fixes tests/cond13.test.
(conditionals_true_when): Removed.
* tests/Makefile.am (XFAIL_TESTS): Removed cond13.test.
Tom Tromey [Tue, 31 Jul 2001 05:22:13 +0000 (05:22 +0000)]
* automake.texi (A Program): Typo. Added subsections and more
text about conditional compilation.
(A Shared Library): Moved earlier.
(Program variables): Updated LINK text. Added AM_CFLAGS.
(C++ Support): Added AM_CXXFLAGS.
(Fortran 77 Support): Added AM_FFLAGS and AM_RFLAGS.
(EXEEXT): New node.
* automake.in (make_input_list): Removed.
(scan_autoconf_config_files): Don't add to make_input_list.
(scan_one_autoconf_file): Don't use make_input_list.
(scan_autoconf_files): Use make_list, not make_input_list.
(scan_autoconf_files): Likewise.
* automake.in (seen_exeext): Removed.
(generate_makefile): Don't define EXEEXT or OBJEXT.
(scan_one_autoconf_file): Don't check for AC_EXEEXT.
(am_install_var): Don't check $seen_exeext.
(handle_programs): Likewise.
(rule_define): Allow x to override x$(EXEEXT), for now.
(file_contents_internal): Only define rule if rule_define allows
us to.
* m4/init.m4 (AM_INIT_AUTOMAKE): Define EXEEXT and OBJEXT.