* m4/depout.m4 (_AM_OUTPUT_DEPENDENCY_COMMANDS): Use `s/xx//p'
instead of `/xx/ s///p'; the latter fails when GNU sed is run with
POSIXLY_CORRECT. Also strip superfluous -e.
Report from Miloslav Trmac.
* tests/lex5.test: Sleep before calling AUTOMAKE the second time,
this fixes a spurious failure reported by Andreas Schwab. Also
make sure ylwrap is not installed unless needed, and exercise
--no-force.
* lib/py-compile: Check input files after option processing.
Ensure --basedir has an argument.
* lib/am/python.am (install-%DIR%PYTHON): Do not run py-compile
if nothing was installed.
* tests/python10.test: New file.
* tests/Makefile.am (TESTS): Add python10.test.
Suggested by Sander Niemeijer.
* automake.in (shadow_unconditionally): New function...
(handle_source_transform): ... extracted from here.
(am_install_var): Use shadow_unconditionally to define %DISTVAR%.
* lib/am/data.am, lib/am/java.am, lib/am/lisp.am, lib/am/python.am,
lib/am/script.am: Add %DISTVAR% to DIST_COMMON.
* tests/cond33.test: Make sure all conditional files are distributed.
Report from Ralf Corsepius.
* m4/mkdirp.m4 (AM_PROG_MKDIR_P): Append `.' to $(mkdir_p).
* lib/install-sh: Accept `install-sh -d' with 0..n arguments,
as well as `install-sh sources... dest' with multiple sources.
* tests/cond33.test: New file.
* tests/instsh2.test: Add more checks for install-sh.
* tests/transform.test: Test for installdirs.
* tests/Makefile.am (TESTS): Add cond33.test
Report from Ralf Corsepius.
* automake.in (handle_configure): Skip AC_CONFIG_LINKS items which
do not look like DEST:SRC.
* tests/conflnk3.test: Check for AC_CONFIG_LINKS($computed).
Fix for PR automake/289:
* automake.in (Automake::Struct::libtool_tag): New attribute. Define
it for the language that have a Libtool tag.
(%libtool_tags): New variable.
(handle_languages, define_compiler_variable)
(define_linker_variable): Pass --tag=XXX to libtool if supported.
(scan_autoconf_traces): Scan for _LT_AC_TAGCONFIG and AC_LIBTOOL_TAGS.
* tests/libtool3.test, tests/subobj9.test: Check that --tag=XXX is
output.
Fix for PR automake/289:
* automake.in (Automake::Struct::libtool_tag): New attribute. Define
it for the language that have a Libtool tag.
(%libtool_tags): New variable.
(handle_languages, define_compiler_variable)
(define_linker_variable): Pass --tag=XXX to libtool if supported.
(scan_autoconf_traces): Scan for _LT_AC_TAGCONFIG and AC_LIBTOOL_TAGS.
* tests/libtool3.test, tests/subobj9.test: Check that --tag=XXX is
output.
* lib/am/inst-vars.am: New file, define am__vpath_adj_setup,
am__vpath_adj, and am__strip_dir.
* lib/am/Makefile.am (dist_am_DATA): Add inst-vars.am.
* lib/am/data.am, lib/am/lisp.am, lib/am/python.am,
lib/am/scripts.am: Include inst-vars.am, and use $(am__vpath_adj),
$(am__vpath_adj_setup), and $(am__strip_dir) in install and
uninstall rules. This fixes installation of nobase_ files in
VPATH setups with Sun and OSF1/Tru64 Make.
* lib/am/libs.am, lib/am/ltlib.am: Include inst-vars.am, and use
$(am__strip_dir) to simplify install and uninstall rules.
* tests/nobase.test: Augment to check installation from VPATH builds.
* automake.in (%transformed_files): New variable.
(initialize_per_input): Reset it.
(make_paragraphs): Fill %transformed_files, and define %FIRST%
each time a file is transformed for the first time.
(handle_configure): Do not define %FIRST_CONFIG_HIN%.
(am_install_var): Do not define %FIRST%.
* lib/am/remake-hdr.am: Use %?FIRST% instead of %?FIRST_CONFIG_HIN%.
* m4/mkdirp.m4: Do not use `-m 0755'. This overrides special bits
and break setups where 775 directories are expected. Just obey
umask as we did in the past.
Report from Harlan Stenn.
* lib/Automake/Variable.pm (define): Rework the way we check
Automake variable definition. Ensure consistent :=/+=/=
definitions only for variables that have been and are defined by
Automake, and make it an internal error. Ignore Automake
attempts to touch a user variable, even with += assignments.
* tests/txinfo29.test: New file.
* tests/Makefile.am (TESTS): Add txinfo29.test.
Reported by Bruce Korb.
Tom Tromey [Fri, 2 Jan 2004 21:38:06 +0000 (21:38 +0000)]
* automake.in (handle_source_transform): Don't generate dist
variables when no-dist is set.
(generate_makefile): Likewise.
* tests/nodist3.test: Ensure that DIST_SOURCES is not created,
and that dist target does not exist.
Reported by Tom Fitzsimmons.
* tests/libtool5.test, tests/ltcond.test, tests/ltcond2.test,
* tests/ltconv.test: Run automake with --add-missing, because
the CVS version of libtoolize no longer install config.sub and
config.guess by default.
Fix for PR automake/319:
* aclocal.in (scan_m4_files): Scan configure.ac.
(trace_used_macros, write_aclocal): Remove configure.ac from the
list of files to include.
* tests/Makefile.am (TESTS): Add acloca15.test.
* tests/acloca15.test: New file.
* aclocal.in (%file_includes): New variable.
(scan_configure_dep): Compile $m4_include_rx and $ac_require_rx once.
(scan_file): Scan for included files, and process these files
recursively. Fill %file_includes and %file_contents. Return the
list of included files, not the contents.
(scan_m4_files): Adjust calls to scan_files.
(strip_redundant_includes): New function.
(trace_used_macros): Call it.
(write_aclocal): Likewise. Also check the mtime of included files.
* tests/Makfile.am (TESTS): Add acloca14.test.
* tests/acloca14.test: New file.
Report from Phil Edwards.
* automake.in (handle_languages): Do not define DEP_FILES.
* m4/depout.m4 (_AM_OUTPUT_DEPENDENCY_COMMANDS): Extract included
files with $(DEPDIR) in their name instead of DEP_FILES.
* tests/depend.test, tests/depend4.test, tests/exsource.test:
Adjust.
Suggested by Tom Tromey.
Do not output .lo rules for programs and static libraries objects,
and do not output .o/.obj rules for libtool libraries. This is
about explicit rules only, not inference rules.
* automake.in (handle_single_transform_list): Rename as ...
(handle_single_transform): ... this. Take a single file
to transform (it was only called this way) and accept a new
%transform argument. Fill %lang_specific_files with list
references instead of strings, and append %transform to each
of these lists.
(define_objects_from_sources, handle_source_transform):
Take a %transform argument, and forward it to &handle_single_transform.
(handle_languages): Adjust to the new format of
%lang_specific_files, and honor its %transform part.
(handle_programs, handle_libraries, handle_ltlibraries): Override
%NONLIBTOOL% and %LIBTOOL% while calling handle_source_transform.
(make_paragraphs): Define %NONLIBTOOL% by default. Make sure
%transform settings override global settings.
* lib/am/depend2.am (%OBJ%, %OBJOBJ%): Define only if %NONLIBTOOL%.
* tests/libtool3.test: Augment to check Makefile.ins for unneeded
rules.
Suggested by Thomas Fitzsimmons.
* automake.in (handle_languages): Define %DEPBASE% conditionally
on subdir-objects. Define SUBDIROBJ. Do not clean *_.c files
here ...
(lang_c_finish): ... do it here.
(handle_single_transform_list): Do not output specific rules for
subdir-objects files which are not renamed. This should reduce
the size of Makefiles with lots of subdirectory sources.
* lib/depcomp: Simplify computation of dependency output, and use
DEPDIR.
* lib/am/depend2.am (%EXT%.o, %EXT%.obj, %EXT%.lo): Adjust call
to depcomp. Compute depbase on-the-fly in generic fastdep rules
for subdir-objects.
* tests/ansi9.test: Do not grep for an explicit rule that
we no longer expect. Really run $MAKE to make sure the chain
of rules works.
* tests/yacc5.test: Do not grep for an explicit rule that
we no longer expect. Adjust to use set -e.
* automake.in (@common_files): Move configure, configure.ac, and
configure.in ...
(@common_sometimes): ... here so that these files do not appear
twice in DIST_COMMON.
* automake.in (maybe_push_required_file): Add $(srcdir) in front
a required files outside the current directory or its subdirectories.
* lib/am/distdir.am (distdir): Update comment.
Report from Nicolas Joly.
* doc/automake.texi (@copying): Do not repeat the version.
(Top): Use @insertcopying. Add a @detailmenu, this works around
Emacs 21's inability to lookup indices in sub-nodes (reported
by Kevin Ryde).
(C++ Support, Assembly Support, Fortran 77 Support, Java Support,
Support for Other Languages, Preprocessing Fortran 77, Compiling
Fortran 77 Files, Mixing Fortran 77 With C and C++, How the Linker
is Chosen): Add missing descriptions in menus.
(Fortran 77 and Autoconf): Remove, this node was just saying "use
Autoconf 2.53 or greater".
* Makefile.am (do_subst): Fix the substitution of @configure_input@.
(automake, aclocal): Create the output atomically and make it
read-only, as done in the Autoconf package.
* lib/Automake/Makefile.am (do_subst): Fix the substitution of
@configure_input@.
(Config.pm): Create the output atomically and make it read-only.
* m4/Makefile.am ($(top_srcdir)/m4/amversion.m4): Substitute
@configure_input@ and make the output read-only.
* lib/Automake/Config.in, m4/amversion.in, tests/aclocal.in,
tests/automake.in, tests/defs.in: Add a @configure_input@ line.
* lib/Automake/Variable.pm (hook): Use $$ as prototype, not $&.
Perl 5.6.0 will not accept a reference sub reference for the
latter.
* automake.in (var_SUFFIXES_trigger): Adjust registration via
Automake::Variabke::hook.
(handle_texinfo_helper): Make sure `inner_expand => 1' appears
on one line, so that Perl 5.6.0 does not complain about
inner_expand being a bare identifier.
* doc/automake.texi (Rebuilding): Document CONFIGURE_DEPENDENCIES
and CONFIG_STATUS_DEPENDENCIES. Move this sections later
in the manual since it's pretty advanced material.
* automake.in ($config_header_location): Remove. Use
%ac_config_files_location instead.
(rewrite_inputs_into_dependencies): Do not prepend $(top_builddir)/
at the top-level.
(handle_configure): Use rewrite_inputs_into_dependencies to
distribute and compute AC_CONFIG_HEADERS dependencies.
(scan_autoconf_traces) <AC_CONFIG_HEADERS>: Fill
%ac_config_files_location.
* lib/am/remake-hdr.am ($(srcdir)/%CONFIG_HIN%): Rename as ...
(%CONFIG_HIN%): ... this. $(srcdir) is already added in
scan_autoconf_traces.
* tests/Makefile.am (TESTS): Add confh5.test.
* tests/confh5.test: New file.
* automake.in (handle_configure): Do not require link sources if
they contain a dollar, or if they were built. Likewise, do not
clean link destination if they contain a dollar.
(scan_autoconf_traces) <AC_CONFIG_LINKS>: Populate
%ac_config_files_location with link destinations. Do not
store locations in @config_links, now that %ac_config_files_location
have them.
* tests/conflnk3.test: New file.
* tests/Makefile.am (TESTS): Add conflnk3.test.
* automake.in (handle_source_transform): If it's present, use
libfoo_la.c instead of libfoo.c as the default source of
libfoo.la, and issue an -Wobsolete diagnostic. Do not be
greedy in the suffix replacement regex.
* doc/automake.texi (Default _SOURCES): New node.
(Program Sources, Libtool Modules): Refer to it.
* tests/ltlibsrc.test: Update to check for old default source files.
* automake.in (&handle_source_transform): Calculate a default file
for use in the absence of an appropriate _SOURCES declaration by
first stripping any suffix from the unxformed target name, and
appending `.c'.
* doc/automake.texi (Program Sources, Libtool Modules): Document this.
* tests/ltlibsrc.test: New file.
* tests/Makefile.am (TESTS): Add ltlibsrc.test.
* lib/Automake/Variable.pm (loc_and_value_as_list_recursive,
_value_as_list_recursive_worker): Merge into ...
(value_as_list_recursive): ... this function. Pass options
as a hash argument, and use the `location' option to trigger
the behavior of loc_and_value_as_list_recursive.
(traverse_recursively, transform_variable_recursively): Take
options as a %options argument.
(_do_recursive_traversal): Perform expansion of inner variables
(as in `$(FILE).ext') on request.
* automake.in (handle_options, check_libobjs_sources)
(handle_source_transform, handle_LIBOBJS, handle_ltlibraries)
(handle_ltlibraries, handle_man_pages, handle_dist)
(handle_gettext, am_install_var): Adjust usage of
value_as_list_recursive.
(handle_texinfo_helper): Pass inner_expand to
value_as_list_recursive.
* tests/txinfo28.test: New file.
* tests/Makefile.am (TESTS): Add txinfo28.test.
Report from Ralf Corsepius.
* lib/Automake/Variable.pm (_do_recursive_traversal): Do not
update @_substfroms and @_substfroms for undefined variables.
* tests/substre2.test: New file.
* tests/Makefile.am (TESTS): Add substre2.test.
* lib/Automake/VarDef.pm (value): Rename as ...
(raw_value): ... this.
(value): New method, strip # and \n.
(dump): Use raw_value.
* lib/Automake/Variable.pm (output): Use raw_value.
(value_as_list): Simplify, now that backslash and comments
are already removed.
* tests/txinfo22.test: Make sure Automake isn't confused
by comments in variables.
* doc/automake.texi: More target vs. rule editing. Back out some
of the previous changes. It's OK to talk about targets as "entry
points", or as thing to build, but targets cannot be run: rules
are run.
* automake.in (prepend_srcdir): Parenthesize @inputs to remove
a maintainer-check warning.
* tests/subst2.test: Rewrite the $MAKE invocation to please
maintainer-check.
* doc/automake.texi (Program variables): Mention per-target
_CPPFLAGS in the documentation of INCLUDES.
* automake.in (generate_makefile): Likewise in the INCLUDES diagnostic.
Report from Bob Friesenhahn.
* lib/Automake/Variable.pm (output): Add $(am__empty) to variable
definitions that end with a line full of @substitutions@ that
would confuse HP-UX Make if it were blank.
(transform_variable_recursively): Make sure not to erase empty
variables.
* tests/Makefile.am (TESTS): Add subst2.test.
* tests/subst2.test: New file.
Report from Harlan Stenn.
Fix for PR automake/411:
* automake.in (rewrite_inputs_into_dependencies): Simplify, and rename
into ...
(prepend_srcdir): ... this.
(rewrite_inputs_into_dependencies): New function, extracted from ...
(handle_configure): ... here. Adjust to use prepend_srcdir
or rewrite_inputs_into_dependencies where needed. Especially,
using (the new) rewrite_inputs_into_dependencies to compute
Makefile dependencies will fix PR/411.
* lib/am/configure.am (DIST_COMMON): Remove %MAKEFILE-IN%, it's
already distributed by rewrite_inputs_into_dependencies.
* tests/Makefile.am (TESTS): Add output10.test, remove distcom.test.
* tests/colon3.test: Use set -e. Don't allow any AUTOMAKE
invocation refer to zardoz. Make sure two.in and three.in
appear as $(srcdir)/two.in and $(srcdir)/three.in dependencies.
* tests/distcom.test: Delete. This is covered by tests/output9.test.
* tests/output10.test: New file, for PR/411.
* automake.in (append_exeext): Do not append $(EXEEXT) to
@substitutions@.
* tests/exeext4.test: New file.
* tests/Makefile.am (TESTS): Add exeext4.test.
* lib/am/texinfos.am (install-info): Depend on
install-info-recursive or install-info-am even if no-installinfo.
* tests/txinfo27.test: New file.
* tests/Makefile.am (TESTS): Add txinfo26.test.
* lib/ylwrap: Do not overwrite headers if they haven't changed.
Fix the include guard substitution.
* tests/yacc6.test: Augment to run ylwrap, and make sure it
does not needlessly update headers.
* tests/yacc8.test: Make sure headers are not needlessly updated
with ylwrap is not used. Move `test -f foo.o' into the
Makefile as `test -f foo.$(OBJEXT)' for portability.
* automake.in (generate_makefile): Define SUBDIRS if it is
not defined and DIST_SUBDIRS is.
* tests/subpkg2.test: New file.
* tests/Makefile.am (TESTS): Add subpkg2.test.
Report from Gary V. Vaughan.
* lib/Automake/Rule.pm (define): Suggest using target-local instead
of target-am, not target-am-local.
* tests/overrid.test: Check the diagnostic for clean-am.
Report from Bruno Haible.