For PR automake/371 and PR automake/372:
* automake.in (rule_define): Honor inference rules with multiple
targets, and warn when they are used.
* tests/suffix11.test: New file.
* tests/Makefile.am (TESTS): Add suffix11.test.
Reported by Duncan Gibson.
For PR automake/370:
* automake.in (handle_languages): Don't prepend $U to $myext
since handle_single_transform_list now appends it to $obj.
Process the rule twice to handle deansified files in subdirectories.
Mark _.c files in subdirectories for cleaning.
(handle_single_transform_list): Append $U to $obj_sans_ext if
needed: before this dependencies were output foo.Po instead
of foo$U.Po. Don't output explicit dependencies for renamed
objects or sources in sub-directories: we already output
a full compile rule for them.
(lang_c_finish): Don't always use the full filename in the
.c -> _.c rule. This reverts part of my change of 2002-11-21.
* tests/ansi6.test, tests/ansi7.test: Make sure deansified
files are created in the right directory, and cleaned.
Reported by Kevin Ryde.
* automake.in (handle_single_transform_list): Don't strip the
directory from $full_ansi. This reverts my patch of 2002-10-16.
(lang_c_finish): Use the full filename, including the directory,
in the .c -> _.c rule. These two files must reside in the same
directory.
* tests/ansi6.test: Also try to compile without ansi2knr.
Reported by Andreas Schwab
* lib/Automake/Conditional.pm [SYNOPSIS]: Fix not's description.
* lib/Automake/ConditionalSet.pm (sub_conditions): New function.
(multiply): Also accept an Automake::Conditional as argument.
* automake.in (variable_not_always_defined_in_cond): Simplify,
using only Automake::ConditionalSet methods.
Suggested by Raja R Harinath.
* lib/Automake/ConditionalSet.pm (conds): Use value() to simplify.
(invert): Rewrite as a product-of-sums to sum-of-products converter.
(_multiply, multiply): New functions.
* lib/Automake/Conditional.pm (not): New function.
* lib/Automake/tests/ConditionalSet.pl (test_invert): Update.
* automake.in (condition_negate): Move ...
* lib/Automake/Conditional.pm (negate_condition): ... here.
Suggested by Raja R Harinath.
* lib/Automake/ConditionalSet.pm (_simplify, simplify): New methods.
(true): Cache return value, so _simplify can use it.
* lib/Automake/tests/ConditionalSet.pl (test_simplify): New function.
* automake.in (variable_not_always_defined_in_cond): Return
a simplified ConditionalSet.
(macro_define, require_variables): Adjust.
* tests/Makefile.am (TEST): Add library3.test.
* tests/library3.test: New file.
* tests/pluseq9.test: Adjust.
Thanks to Raja R Harinath.
* lib/Automake/ConditionalSet.pm (_permutations_worker): Ignore TRUE
conditions.
(permutations): Treat empty permutations as TRUE.
(invert): Simplify.
Suggested by Raja R Harinath.
* automake.in (variable_conditions): Split into ...
(variable_conditions, variable_sorted_conditions): ... these
functions, where variable_sorted_conditions has the semantic of
the old variable_condition.
(target_conditions): New function.
(msg_var, handle_lib_objects_cond, check_ambiguous_conditional,
variable_not_always_defined_in_cond, macro_define,
variable_defined, check_variable_defined_unconditionally,
variable_conditions_recursive_sub,
variable_conditions_permutations, variable_value_as_list,
variable_value_as_list_recursive_worker, append_exeext,
am_install_var, require_variables_for_macro): Use variable_conditions.
(msg_target, rule_define): Use target_conditions.
(define_objects_from_sources, macro_define, macro_dump,
variable_pretty_output): Use variable_sorted_conditions.
* automake.in: Don't declare TRUE and FALSE, import them from
Automake::Conditional.
* lib/Automake/Conditional.pm (TRUE, FALSE): New constants.
(new): Simplify using FALSE.
(reduce): New function, moved from ...
* automake.in (variable_conditions_reduce): ... here.
(variable_conditions_recursive_sub, invert_conditions):
Adjust calls to Automake::Conditional::reduce.
* tests/cond12.test: Adjust to use Automake::Conditional.
Jim Meyering [Sun, 10 Nov 2002 14:26:15 +0000 (14:26 +0000)]
Make install-sh work even when names contain spaces or
certain (but not all) shell metachars.
* lib/install-sh: Remove lots of unnecessary quoting.
Add double quotes where necessary.
Write diagnostics to stderr, not stdout.
Normalize spacing in diagnostics: use one space (not two,
and not a TAB) after the leading `install:'.
Remove trailing white space.
Remove unnecessary curly braces.
If removing the destination fails, also try to move it aside.
Use `trap' more portably.
Jim Meyering [Sun, 10 Nov 2002 14:24:00 +0000 (14:24 +0000)]
Make install-sh work even when names contain spaces or
certain (but not all) shell metachars.
* lib/install-sh: Remove lots of unnecessary quoting.
Add double quotes where necessary.
Write diagnostics to stderr, not stdout.
Normalize spacing in diagnostics: use one space (not two,
and not a TAB) after the leading `install:'.
Remove trailing white space.
Remove unnecessary curly braces.
If removing the destination fails, also try to move it aside.
Use `trap' more portably.
* tests/installsh2.test: New file, to test for the above fix.
* tests/Makefile.am (TESTS): Add installsh2.test.
Akim Demaille [Thu, 31 Oct 2002 11:55:25 +0000 (11:55 +0000)]
* tests/location.test (Makefile.am): Strengthen.
* lib/Automake/Channels.pm (_print_message): Be sure to flush
$partial when the message is output.
Thanks to Alexandre Duret-Lutz.
Akim Demaille [Thu, 31 Oct 2002 11:42:22 +0000 (11:42 +0000)]
* automake.in (&read_am_file): Use $last_where to register the
_first_ line of a variable definition as location instead of the
last one.
(&conditional_ambiguous_p): Don't forget to ->string the
Conditionals.
(&rule_define): Likewise.
* tests/location.test: Adjust to exercise this.
* tests/ansi6.test, tests/ansi7.test: Set ac_cv_prog_cc_stdc instead
of am_cv_prog_cc_stdc. This follows Akim's patch of 2002-10-09,
and reveals a bug in my patch of 2002-10-15.
* automake.in (handle_single_transform_list): Strip directory name
from $full_ansi if subdir-objects is not set.
* automake.in (handle_single_transform_list) <full_ansi>: New variable.
Use this to record correct dependencies about deansifiable files which
are using per-program flags or are in a subdirectory.
* tests/ansi9.test: New file.
* tests/Makefile.am (TESTS): Add ansi9.test.
Reported by Paul D. Smith
* aclocal.in (ac_defun_rx, ac_require_rx): If the macro name is
quoted, accept any character but `]'. This makes it possible
to define macros such as `AC_LANG_PREPROC(Fortran 90)'.
(scan_m4_files): Quote $key in the regex. Don't define $expr, it's
not used.
(add_file, scan_file): Adjust to the new definitions of $ac_defun_rx
and $ac_require_rx.
* tests/aclocal2.test: New file.
* tests/Makefile.am (TESTS): Add aclocal2.test.
Reported by Tamara L. Dahlgren and Tom Epperly.
For PR automake/358:
* lib/am/texi-vers.am (%STAMPVTI%): Depend on configure instead of
configure.ac.
Suggested by Thien-Thi Nguyen.
* lib/am/configure.am ($(srcdir)/configure): Depends on
%CONFIGURE_DEPS%
* automake.in (@configure_deps): New array.
(scan_autoconf_traces): Scan for m4_include and m4_sinclude,
and fill @configure_deps.
(handle_configure): Substitute %CONFIGURE_DEPS%.
Distribute @configure_deps.
* tests/version7.texi: New file.
* tests/vtexi.test: Adjust.
* tests/Makefile.am (TESTS): Add version7.test.
* automake.texi (Dist): Mention that m4_include'd files
are distributed.
* m4/ccstdc.m4 (AM_PROG_CC_STDC): Its definition is now empty:
the content of this macro was merged in AC_PROG_CC.
* m4/protos.m4 (AM_C_PROTOTYPES): Adjust to AC_C_PROTOTYPES.
* tests/depacl.test: Remove, it exercize aclocal in a way that was
exercized by all the other tests since the test suite really uses
aclocal.
* tests/Makefile.am (TESTS): Remove depacl.test.
Paul Eggert [Wed, 9 Oct 2002 00:05:27 +0000 (00:05 +0000)]
* lib/am/texibuild.am (%DEST_PREFIX%%DEST_SUFFIX%,
%DEST_PREFIX%.dvi, %DEST_PREFIX%.pdf): Use "makeinfo -o output
input", not "makeinfo input -o output", as the latter fails if
POSIXLY_CORRECT=1.
* lib/am/texinfos.am (.dvi.ps): Likewise for dvips.
* m4/depend.m4 (_AM_DEPENDENCIES): Likewise for $depcc.
Paul Eggert [Wed, 9 Oct 2002 00:02:40 +0000 (00:02 +0000)]
(%DEST_PREFIX%%DEST_SUFFIX%, %DEST_PREFIX%.dvi, %DEST_PREFIX%.pdf):
Use "makeinfo -o output input", not "makeinfo input -o
output", as the latter fails if POSIXLY_CORRECT=1.
* automake.in (handle_source_transform): If foo_SOURCES is defined
conditionally, create and use am__foo_SOURCES_DIST for distribution.
* tests/condd.test: Extend to check distributed files.
* tests/substref.test: Make sure we don't use such a variable when
it's not needed.
Reported by Marcus Brinkmann.
* m4/as.m4 (AM_PROG_AS): Let CCAS and CCASFLAGS default to the actual
values of $CC and $CFLAGS (as opposed to $(CC) and $(CFLAGS)), so
configure tests can use them. Use AC_ARG_VAR instead of AC_SUBST.
* automake.in (require_variables): The fix introduced in 2002-09-19
is imcomplete. Rewrite the conditional variable definition check
using &variable_not_always_defined_in_cond.
* tests/cond26.test, tests/cond27.test, tests/cond28.test: New file.
* tests/Makefile.am (TESTS): Add cond26.test, cond27.test, and
cond28.test.
Reported by Juergen Keil.
Fix for PR automake/366:
* automake.in (handle_dist): Strip $(srcdir) and replace
$(top_srcdir) when computing DIST_COMMON directories.
* tests/include2.test: Use an obsolute $(srcdir), and check
for spurious directories in $(distdir)/sub.
* lib/am/distdir.am: Rewrite $(top_srcdir) as $(top_builddir).
Reported by Kevin Ryde.
* automake.in (handle_ltlibraries): Record library locations in
%liblocations, and print the previous declaration on error.
* tests/libtool6.test: Check that the locations of the two
definitions are shown.
For PR automake/360: Propagate more locations.
* automake.in (handle_programs): Adjust usage of am_install_var's
return value. Pass on locations as context to file_contents.
(handle_libraries, handle_ltlibraries): Likewise. Use locations
in the 'not a standard library name' diagnostic.
(handle_emacs_lisp, handle_python): Adjust usage of am_install_var's
return value. Pass on locations to require_variables and
require_conf_file.
(check_ambiguous_conditional): Strip trailing dot in message.
(value_to_list): Add the $WHERE and $LOC_WANTED arguments.
(variable_value_as_list_recursive_worker): Add the $LOC_WANTED
argument. Adjust calls to value_to_list.
(variable_value_as_list_recursive): Call
variable_value_as_list_recursive_worker with $LOC_WANTED = 0.
(variable_loc_and_value_as_list_recursive): New function,
variable_value_as_list_recursive_worker with $LOC_WANTED = 1.
(am_install_var): Use variable_loc_and_value_as_list_recursive,
and return a list of [$location, $value] pairs.
(rule_define): Use better locations in EXEEXT diagnostic.
(handle_source_transform, define_objects_from_sources): Add and use
a $WHERE argument. Adjust callers.
* tests/stdlib.test: Grep the location in error message.
* tests/location.test: New file.
* tests/Makefile.am (TESTS): Add location.test.
* tests/exeext3.test: New file.
* tests/Makefile.am (TESTS): Add exeext3.test.
* automake.in (%target_name): New hash.
(initialize_per_input): Reset %target_name.
(rule_define): Fill %target_name, and use it to detect targets
which have been registered with key X but really are X$(EXEEXT).
For PR automake/360:
* lib/Automake/Location.pm: New file.
* lib/Automake/Channels.pm (_print_message): Display contexts
when given an Automake::Location.
(msg): Clone the location.
* lib/Automake/Makefile.am (dist_perllib_DATA): Add Location.pm.
* tests/comment5.test: Make sure we display `included from' stacks.
* automake.in: Use Automake::Location.
(INTERNAL): New constant.
(file_contents, file_contents_internal, define_variable,
define_pretty_variable, read_am_file): Take $WHERE as argument.
Adjust all callers.
(scan_autoconf_traces) <$where>: Define as a Location, and use
it instead of $here.
(macro_define, rule_define): Make sure $WHERE is a location.
Clone it before updating $var_location or $targets.
* NEWS: Mention distuninstallcheck.
* automake.texi (Dist): Document new macro and target.
* lib/am/distdir.am (distuninstallcheck_listfiles): New macro.
(distuninstallcheck): New target.
(distcheck): Use distuninstallcheck.
* automake.in (handle_single_transform_list): Revert the change
from 2002-09-22. We need to erase .libs/ in the object directory
in addition to the library directory.
* automake.in (read_am_file): Prefix included files with
$(top_srcdir) or $(srcdir) in DIST_COMMON. Fixes
subdircond2.test, and subdircond3.test on OSF1.
For PR automake/350:
* automake.in (handle_ltlibraries): Allow a library to be installed
many times in the same directory.
* tests/libtool5.test, tests/libtool6.test: New files.
* tests/Makefile.am (TESTS): Add libtool5.test and libtool6.test.
* automake.in (handle_ltlibraries): Fill $libtool_clean_directories
here, with directories where .la files are built...
(handle_single_transform_list): ... not here with directories
where .lo files are built.
* tests/libtool3.test: Build a library in a subdirectory to
check for this.
Reported by Peter Gavin.
* automake.in (macro_define): Update a variable's location each
time its owner is updated.
* tests/gnuwarn.test: Append to CFLAGS to check for this.
Reported by Harlan Stenn.