* lib/am/distdir.am (distdir): Also look for directory in build
directory first. (See 2001-05-14.)
* tests/Makefile.am (TESTS): Add extra5.test.
* tests/extra5.test: New file.
From Dean Povey.
Fix for distcommon2.test:
* automake.in (automake_needs_to_reprocess_all_files): New
variable.
("main"): Process all Makefiles a second time if
$automake_needs_to_reprocess_all_files is set.
(maybe_push_required_file): Return 1 or 0 whether the file is
pushed or not.
(require_file_internal): Set $automake_needs_to_reprocess_all_files
if an added file can't be pushed.
* test/distcommon2.test: New file.
* test/Makefile.am (TESTS): Add distcommon2.test.
From Pavel Roskin.
Fix for nobase.test:
* lib/am/header-vars.am (install_sh_DATA): New.
* lib/am/data.am (install-%DIR%%PRIMARY%): Declare and use
%DIR%%PRIMARY%_INSTALL, and set it to $(install_sh_DATA) instead
of $(INSTALL_DATA) for nobase_ targets.
* lib/am/lisp.am (install-%DIR%LISP): Likewise.
* lib/am/python.am (install-%DIR%PYTHON): Likewise.
* tests/nobase.test (configure.in): Append AC_OUTPUT.
* tests/Makefile.am (XFAIL_TESTS): Remove nobase.test.
Paul Eggert [Mon, 5 Nov 2001 19:53:59 +0000 (19:53 +0000)]
* lib/am/distdir.am (am__remove_distdir):
New macro. Do not change permission of non-directories.
Change only user permission, as there's no point to changing group
or other permission.
(distdir, dist, dist-bzip2, dist-tarZ, dist-shar, dist-zip, dist-all,
distcheck): Use it.
Paul Eggert [Mon, 5 Nov 2001 19:52:57 +0000 (19:52 +0000)]
(am__remove_distdir):
New macro. Do not change permission of non-directories.
Change only user permission, as there's no point to changing group
or other permission.
(distdir, dist, dist-bzip2, dist-tarZ, dist-shar, dist-zip, dist-all,
distcheck): Use it.
* lib/am/python.am: Cleanup the cleaning section.
* automake.texi (Python): Remove documentation for PYCFILES
and PYOFILES. Update the first paragraphes.
* automake.in (handle_single_transform_list): Pass $nonansi_obj to
derive_suffix. Don't use an hardcoded 'o' for object extensions.
(derive_suffix): Accept $OBJ as a second argument, don't
hardcode 'o'.
* tests/suffix5.test: New test.
* tests/Makefile.am (TESTS): Add suffix5.test.
Reported by Arkadiusz Miskiewicz <misiek@pld.ORG.PL>.
Akim Demaille [Mon, 5 Nov 2001 09:24:01 +0000 (09:24 +0000)]
* automake.in (@common_sometimes, &handle_configure): No longer
use stamp-hin.
* lib/am/remake-hdr.am: Adjust.
* tests/confh.test: There is no stamp.hin.
Akim Demaille [Thu, 1 Nov 2001 17:39:39 +0000 (17:39 +0000)]
* lib/am/lex.am, lib/am/yacc.am: Use the output file name in
`#line' and multiple inclusion guards.
* lib/ylwrap: Remove debugging code.
(input_dir, input_rx): Move where used.
Use the output file name in `#line'.
Akim Demaille [Tue, 30 Oct 2001 16:31:17 +0000 (16:31 +0000)]
* automake.in ($verbose): Remove, inherited from
Automake::General.
(&variable_delete): Rename as...
(¯o_delete): this, for consistency.
(&variable_assert): New.
(&variable_value_as_list, &variable_value_as_list_recursive_worker):
Use it.
Akim Demaille [Sun, 28 Oct 2001 14:01:40 +0000 (14:01 +0000)]
* automake.in (am_primary_prefixes): Now, in accordance with its
comment, return the list of prefixes actually used, not all the
possible prefixes for a primary.
(&handle_libraries, &handle_ltlibraries, &handle_java)
(&am_install_var): Adjust.
* Makefile.am (maintainer-check): Allow `local $_;'.
Akim Demaille [Sun, 28 Oct 2001 14:00:59 +0000 (14:00 +0000)]
* automake.in (&am_primary_prefixes): Now returns a list, not a
hash.
(&handle_libraries, &handle_ltlibraries, &handle_java)
(&am_install_var): Adjust.
Akim Demaille [Sun, 28 Oct 2001 14:00:09 +0000 (14:00 +0000)]
* automake.in (&scan_autoconf_traces): Use eq for equality.
Anchor regexps.
Remove dead comment.
(&initialize_per_input): Don't initialize several times the same
vars.
Akim Demaille [Fri, 26 Oct 2001 10:01:04 +0000 (10:01 +0000)]
* tests/stamph2.test: Strengthen.
* tests/confh2.test, tests/confh3.test: Remove.
These are bad tests: they don't check the effects, but some
internal details in Makefile.
And they are covered by stamph2.test.
Akim Demaille [Fri, 26 Oct 2001 09:59:57 +0000 (09:59 +0000)]
Now that stamp-h's are created by config.status, we don't need to
handle them in Makefile's.
* lib/am/remake-hdr.am (%STAMP%): Just run config.status.
* m4/header.m4 (_AM_STAMP): New.
(_AM_CONFIG_HEADER): Use it.
Akim Demaille [Fri, 26 Oct 2001 09:58:39 +0000 (09:58 +0000)]
* automake.in (@config_fullnames, @config_names): Remove.
(@config_headers): Now contains the actual spec used in
AC_CONFIG_HEADERS.
(&split_config_file_spec): New.
(&handle_tags, &handle_configure, &handle_all, &scan_autoconf_traces)
(&scan_one_autoconf_file): Adjust.
(&scan_one_autoconf_file): Pff, don't think _AM_CONFIG_HEADER is
AM_CONFIG_HEADER.
Akim Demaille [Fri, 26 Oct 2001 09:56:40 +0000 (09:56 +0000)]
* automake.in (&handle_configure): Use the config.status 2.50
invocation syntax for config files and headers.
autoheader needs the name of the file to create, not from what it
must be created, hence CONFIG_HEADER_FULL is $one_name, not
$one_fullname.
* lib/am/configure.am, lib/am/remake-hdr.am: Likewise.
* tests/confsub.test (SUBDIRS): Adjust to the new config.status
invocation.
Strengthen: Use the non-default config.hin source.
Strengthen: Make sure config.h is properly updated when config.hin
is changed.
Akim Demaille [Fri, 26 Oct 2001 09:56:05 +0000 (09:56 +0000)]
* automake.in (&handle_configure): Seeing Automake files in
@other_input_files is a programming error, not merely something to
ignore.
Factor slightly the code.
* lib/am/python.am (install-%DIR%PYTHON, uninstall-%DIR%PYTHON):
Have the basename step optional and use %NDIR% instead of %DIR% in
filenames in order to support 'nobase_'.
* 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. (This is a part of my patch of 2001-10-15 which got
mistakenly reverted.)
Akim Demaille [Sun, 21 Oct 2001 21:54:01 +0000 (21:54 +0000)]
* automake.in ($ac_output_location): Replace with...
($ac_config_files_location): this.
(&scan_autoconf_traces): We don't need $file and $line, $here is
enough.
(&scan_one_autoconf_file): Use `$in_ac_output' to store the macro
name (AC_OUTPUT or AC_CONFIG_FILES) for error messages.
Akim Demaille [Sun, 21 Oct 2001 18:10:51 +0000 (18:10 +0000)]
* automake.in (&require_file_internal): Instead of $file and $line,
take $where as first argument.
Adjust all callers.
(&require_file_with_macro): New.
Use it where internal black magic was used to recover the location
of a macro definition.
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.