Tom Tromey [Sun, 6 May 2001 23:01:34 +0000 (23:01 +0000)]
Fix for PR automake/132:
* automake.in (c, c++, objc, asm, ppf77): Add DEFAULT_INCLUDES to
compilation.
(java): Remove INCLUDES and DEFS from compilation.
(lang_c_finish): Add DEFAULT_INCLUDES to compilation.
* compile.am (DEFS): Don't include %DEFAULT_INCLUDES%.
(DEFAULT_INCLUDES): New macro.
Tom Tromey [Sun, 6 May 2001 05:25:58 +0000 (05:25 +0000)]
* automake.in (conditional_true_when): Use a hash, not index().
Also, a TRUE component always results in a true return.
Fixes test cond10.test. For PR automake/164.
* tests/Makefile.am (XFAIL_TESTS): Removed cond10.test.
Tom Tromey [Sat, 5 May 2001 20:47:29 +0000 (20:47 +0000)]
Fix bug reported by Robert Boehne:
* automake.in (output_lex_build_rule): Don't let AMDEP_TRUE be
substituted.
(handle_dependencies): Likewise.
* Makefile.am (maintainer-check): Look for AMDEP_TRUE
substitution. Correct diff now has 30 lines. Look for space
after losing `undef'.
* automake.in (&read_am_file, &file_contents_internal): Don't
define macros when `FALSE', to avoid errors on doubly defined
variables but under condition `FALSE'. In order to allow...
(&am_install_var): When reading the associated file for the first
time, enable `%?FIRST%'.
(&handle_libraries): Let libs.am define $(AR) and $(RANLIB).
* libs.am: Do it when `%?FIRST%'.
* automake.in (®ister_language, &finish_languages): Use `pure'
as a Boolean.
(®ister_language): Use %done properly with objects, not names.
(&finish_languages): Replace `$non_c' with `$needs_c'.
Unify LISP, PYTHON and JAVA primaries.
* automake.in (&handle_emacs_lisp): Be like &handle_python, i.e.,
return if there are no files, hook elist-comp on the Autoconf
macro, rely on lisp.am to define variables.
(&handle_python, &handle_java): Likewise.
(&scan_one_autoconf_file): Pseudo AC_SUBST of `pythondir' and
`PYTHON' must be handled here, not in `&handle_python'.
* java.am: Define needed variables and rules.
* automake.in (&finish_languages, &handle_single_transform_list)
(&add_depend2, &handle_dependencies): No longer use the language
name in `$lang'. Rename `$lang_obj' as `$lang'.
* automake.in (®ister_language): Rename `output-arg' and
`derived-autodep' as `output_arg' and `derived_autodep' to match
the Language attribute.
Set the defaults in %option instead of $lang.
* Automake/: New directory.
* Automake/Struct.pm: New file, based on Perl 5.6's Class::Struct.
* automake.in (Language): Use Automake::Struct.
* tests/defs: Adjust to find Struct.
* automake.in (Language): Add attribute `name'.
(®ister_language): The name of the language is now given in the
hash.
No longer use `$lang' as the name of the language.
Rename `$lang_obj' as `$lang'.
* automake.in (Language): Add attribute `extensions'.
(Automake): Pass a hash to `®ister_language' instead of a
list of pseudo assignments.
(®ister_language): Adjust.
(&finish_languages): Initialize `$ltoutarg'.
* automake.in (Language): Add attribute `output_arg'.
(%language_map): Remove.
(®ister_language): Build only the object, and store in
%languages only.
(&finish_languages, &handle_single_transform_list): Adjust.
* automake.in (Language): Add attributes `flags', `compile' and
`compiler'.
(&finish_languages, &handle_single_transform_list, &handle_dist)
(&add_depend2, ®ister_language): Use them and the `linker' and
`pure' attributes.
* automake.in (&handle_single_transform_list, &finish_languages)
(&handle_dist, &handle_dependencies): Use the language object for
autodep and derived-autodep too.
* automake.in (Language): New package, temporarily in this file.
Use Class::Struct.
(Automake): New package.
(%languages): New.
(&handle_single_transform_list): Use the language object's `ansi'
attribute instead of `$language_map{"$lang-ansi-p"}'.
(®ister_language): Build and register the language too.
* automake.in (&scan_aclocal_m4): Handle $relative_dir and special
variables.
Specify to the caller whether $regen_aclocal_m4.
(&handle_configure): Adjust.
Transform `REGEN-ACLOCAL-M4'.
* configure.am: Use it.
* tests/defs (me): New.
* tests/configdeps.test: New.
* automake.in (&handle_single_transform_list): Remove $xbase,
unused.
(&handle_source_transform): All the variables have conditions now,
simplify.
(&variable_delete): Admit an argument @conds.
* ext-compile.am: New file.
* automake.in (&finish_languages): Output it.
Require a C linker if there are several registered source suffixes.
(&handle_compile): No longer push the `.c', `.o', `.obj', `.lo'
extensions, which are discovered in ext-compile.am.
With the help from Robert Boehne.
Use AM_CONDITIONAL and if/endif for AMDEP.
* m4/depend.m4 (AM_DEP_TRACK): Use AM_CONDITIONAL to define AMDEP.
* automake.in (&add_depend2): Transform %AMDEP% into `AMDEP' (leading
to a configure time if/endif), or to `FALSE' (static removal of
the code).
(&handle_dependencies): Adjust to use `AMDEP_TRUE'.
* depend2.am: Use if/endif.
Adjust the 101 tests that use dependencies so that they
properly invoke aclocal before automake. They need to `see'
`AM_CONDITIONAL([AMDEP], ...)'.
* automake.in: Use simple quotes to define the _PATTERN variables
to unobfuscate the regexps.
($AM_CONDITIONAL_PATTERN): Let the user quote the variable.
* automake.in (&rule_define): When you discover a suffix rules,
register the extensions for .SUFFIXES.
(&handle_texinfo): Don't register the suffixes.
(&get_object_extension): Don't register suffixes, let them be
discovered in depend2.am.
(&handle_emacs_lisp): Depend on your lisp.am.
* lisp.am: Include the rule &handle_emacs_lisp used to output.
* subdirs.am (RECURSIVE_TARGETS): New variable.
Use it.
* automake.in (&handle_subdirs): Output it.
(&file_contents_internal): Support value spread on several lines.
* automake.in (&variable_dump): Use %var_type properly.
(¯o_define): Enforce better overriding rules.
Handle the special case that used to handle...
(&define_pretty_variable): this.
Hence, don't.
The variables you define are owned by Automake.
(&generate_makefile): PRE_INSTALL and co must not be defined *by
the user*.
(&variable_defined): Now independent from the owner.
(&variable_output, &variable_pretty_output): Adjust to %var_type.
* automake.in (&variable_output): Admit a list of @CONDS.
(&variable_pretty_output): New.
(&define_pretty_variable): Use it.
(&read_am_file, &file_contents_internal): Prepend a separator to
$am_vars only if there is none yet.
(&file_contents_internal): Rename $separator as $spacing to
harmonize with &read_am_file.
* automake.in (%dist_common): Remove.
(%configure_dist_common): Replace with...
($configure_dist_common): this.
(&generate_makefile): Read the user file before using
push_dist_common, as it sets DIST_COMMON, and read_am_file checks
that no variable is defined before it is run.
(&handle_texinfo): Don't handle DIST_COMMON, let your file do it.
(&dist_cmp): Rename as...
(&for_dist_common): this.
(&handle_dist): Don't handle DIST_COMMON, let `configure.am' do
it.
Adjust to $configure_dist_common.
* configure.am, texi-vers.am: Set DIST_COMMON.
* automake.in (&handle_aclocal_m4): Rename as...
(&scan_aclocal_m4): this.
Return the list of aclocal.m4 dependencies.
(&handle_configure): Invoke it, and use it when loading...
* configure.am: Template the rules to recreate aclocal.m4.
* automake.in (&condition_negate): New.
(&variable_conditions_permutations): Use it.
(&read_am_file, &file_contents): Use it on `else' clauses to
support `if FALSE'.
(&output_yacc_build_rule): Output this...
* yacc.am: New file.