* 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.
* data.am, header.am, java.am, libs.am, lisp.am, ltlib.am,
* progs.am, python.am: Use if/endif instead of ?INSTALL?.
* java.am (_am_installdirs): Be sure to set it.
* automake.in (&make_condition): Return '#' when FALSE.
(&conditional_string): Return FALSE, not '#' in the corresponding
cases.
(&file_contents_internal): Adjust.
(&check_variable_defined_unconditional): Dump the guilty variable.
Avoid reading twice header-vars.am as now macro_define
complains.
* automake.in (&define_standard_variables): Don't output the
variables.
(&read_main_am_file): Output first user variables, then Automake
variables.
Don't call twice &define_standard_variables.
Save variable comments in $am_vars.
(&variable_output): New.
(&file_contents_internal): New.
Save variable comments in $am_vars.
(&file_contents): Use it.
* automake.in (&variable_dump): If a variable is undefined, say
it.
(&check_ambiguous_conditional): Give finer error messages.
(¯o_define): Check that a `+=' variable is not set with `='.
Check for ambiguous definitions each time you _set_ (even with `+=')
a variable.
(&read_main_am_file): Perform a deep copy of %conditional.
* automake.in (&handle_source_transform): Use
&variable_conditions, don't read $conditional{$var}.
(&variable_conditions_sub): When the call is the top level call,
generate all the permutations of the conditions.
* depend2.am (@AMDEP@%FPFX%DEPMODE): Define it when GENERIC so
that it does not get noticed twice by automake, which now
complains for multiple definitions.
* tests/vartar.test: s/INSTALL/install/g, automake now complains
because we defined INSTALL.
* automake.in (&generate_makefile) Use macro_define to define
SOURCES and OBJECTS.
(&variable_defined): Don't check for $conditional{VAR}{COND} as
this would make perl create $condition{VAR}, which we don't want.
* automake.in (&variable_defined, &define_pretty_variable):
Simplify code which used to handle the cases where not all
variables were in %conditional.
(&define_variable): Use &define_pretty_variable.
(&variable_conditions_sub, &variable_value_as_list_worker)
(&variable_value_as_list, &rule_define): Simplify syntax.
(&read_main_am_file): Dump the guilty predefined variables.
* automake.in (&variable_conditions_sub)
(&variable_value_as_list_worker): Remove dead code which used to
handle the cases where not all variables were in %conditional.
Handle unconditional values of variables as conditioned by
`TRUE'.
* automake.in (%contents): Remove.
(&generate_makefile, &handle_ltlibraries, ¯o_define)
(&read_am_file, &variable_defined, &variable_conditions_sub)
(&variable_value, &variable_value_as_list_worker)
(&variable_value_as_list, &define_pretty_variable)
(&read_main_am_file): Use
$conditional, not %contents.
(&variable_conditions_permutations): Don't return TRUE and FALSE.
(&variable_conditionally_defined): New.
(&handle_dist): Use it.
(&check_ambiguous_conditional): When multiply defined, specify
under which condition.
(¯o_define): Use it.
(&variable_delete): New.
(&read_am_file): Use it.
(&am_install_var): Simplify, as all the variables are in
%conditional now.
Akim Demaille [Fri, 23 Mar 2001 17:54:04 +0000 (17:54 +0000)]
* automake.in (&variable_conditionally_defined): Rename as...
(&check_variable_unconditionally_defined): this.
(&variable_dump): Fix the output.
(&variable_defined, ¯o_define): Since conditions are
canonicalized, don't use a loop to look for a condition: read the
hash.
(¯o_define, &rule_define, &read_am_file, &file_contents):
Rename $cond_string as $cond.
* distdir.am (PACKAGE, VERSION): Remove; since they are already
discovered via AC_SUBST, they now trigger a `defined twice' error.
Akim Demaille [Fri, 23 Mar 2001 17:06:39 +0000 (17:06 +0000)]
* automake.in (¯o_define): Don't lose the location if we
redefine a variable.
Don't push all the variables in @var_list, let...
(&read_am_file, &file_contents): ... do it.
(&define_pretty_variable): Use macro_define.
(&am_install_var): Delete the value of variables being redefined
to pacify ¯o_define which checks that variables are not
doubly defined.
Akim Demaille [Fri, 23 Mar 2001 16:58:43 +0000 (16:58 +0000)]
* automake.in (&file_contents): Maintain $cond_string sync with
@cond_stack.
Output rules only if not under `FALSE'.
Define variables under $cond_string.
* scripts.am: For the time being if/endif does not work properly
with macros.
Akim Demaille [Fri, 23 Mar 2001 16:54:42 +0000 (16:54 +0000)]
* automake.in (IF_PATTERN): Unobfuscate the parens.
(ENDIF_PATTERN): Allow a condition to be specified.
(&file_contents): Use a @cond_stack.
(&transform): At least for an easy transition, also transform
%?FOO% and %!FOO%, as suggested by Lars.
* scripts.am: First test bed for static if/endif use.
Akim Demaille [Fri, 23 Mar 2001 16:45:53 +0000 (16:45 +0000)]
* automake.in (¯o_define): Don't rely on $1.
Initialize the variable.
Set its Automakism only if not defined or if given to the user.
When concatenating values, insert a separator only if the value
was not empty.
(&read_am_file): When dumping the @var_list, skip Automake
variables.
(&file_contents): Use macro_define.
Akim Demaille [Fri, 23 Mar 2001 16:27:18 +0000 (16:27 +0000)]
* automake.in (%am_var_defs): Replace with...
(%var_is_am): this.
(&handle_installdirs, &variable_value_as_list_worker, &read_am_file)
(&file_contents, am_primary_&prefixes): Adjust.
(&variable_defined, &define_variable): The actual semantics is
`user defined'.
(&read_main_am_file): Assert the var is user defined when
outputting @var_list.
Akim Demaille [Fri, 23 Mar 2001 16:23:51 +0000 (16:23 +0000)]
* automake.in (read_am_file): TRUE and FALSE are predefined
conditionals.
(&by_condition): Adjust.
(&conditional_string): Recognize `TRUE' and `FALSE'.
(&make_condition): Use it.
* m4/cond.m4: Reject TRUE and FALSE as conditionals.
* automake.texi (Conditionals): Adjust.
* tests/cond9.test: s/FALSE/WRONG/.
Pavel Roskin [Fri, 9 Mar 2001 22:24:20 +0000 (22:24 +0000)]
* Makefile.am (maintainer-check): Scan all *.am files and tests
for invocations of `rm' without `-f'.
* tests/mclean.test: Adjusted to prevent triggering the above
test.
Pavel Roskin [Fri, 9 Mar 2001 22:08:46 +0000 (22:08 +0000)]
* Makefile.am (maintainer-check): Scan all *.am files and tests
for invocations of `rm' without `-f'.
* tests/mclean.test: Strengthen to prevent triggering the above
test.
Akim Demaille [Fri, 9 Mar 2001 16:17:04 +0000 (16:17 +0000)]
* automake.in (&conditional_string): Produce a unique string
characterizing a condition stack.
(&conditional_same): Remove, comparing two strings is now enough.
(&variable_defined): Adjust.
(&read_am_file): Use conditional_string.
Akim Demaille [Thu, 8 Mar 2001 13:23:15 +0000 (13:23 +0000)]
* automake.in: Use -w.
Normalize all use of `$lang . '-foo'' into `"$lang-foo"'.
(&parse_arguments): Support --Werror and --Wno-error as a
temporary hack until --warning/-W is properly implemented.
(&handle_single_transform_list): Prototype.
Be sure to define $directory.
Use `exists' instead of testing the value of a maybe undefined
hash value.
(&add_depend2, &handle_configure, &handle_footer, &file_contents)
(&handle_factored_dependencies): Use defined values.
(&scan_one_autoconf_file): Save $_.
* tests/lex2.test, tests/sinclude.test, tests/suffix3.test:
Run automake with --Wno-error.
Akim Demaille [Wed, 7 Mar 2001 18:39:09 +0000 (18:39 +0000)]
* automake.in (&handle_merge_targets): Ventilate its non `all'
related content into...
(&generate_makefile): here.
(&handle_merge_targets): Rename as...
(&handle_all): this.
Remove a useless `if': `@all' is obviously not empty, since it
contains at least the `basename ($makefile)' which has just been
unshifted.
Pavel Roskin [Tue, 6 Mar 2001 00:48:20 +0000 (00:48 +0000)]
* tests/copy.test: Never use `rm' without `-f' - it may ask
questions, notably for read-only files during `make distcheck'.
* tests/insh.test: Likewise.
* tests/installsh.test: Likewise.
* tests/symlink.test: Likewise.
* tests/symlink2.test: Likewise.
* tests/symlink3.test: Likewise.
Akim Demaille [Mon, 5 Mar 2001 19:29:15 +0000 (19:29 +0000)]
* automake.in (&handle_options): Change the RE so that the third
part of the versions always exist.
(&file_contents): Don't pass uninitialized values to &transform.
Akim Demaille [Mon, 5 Mar 2001 18:56:44 +0000 (18:56 +0000)]
Always use hashes with &file_contents.
* automake.in (&handle_texinfo): texibuild.am does not need
TEXINFODIR.
texinfos.am wants only TEXICLEANS.
(&handle_dist, &add_depend2, &handle_clean): Replace $xform with
%transform.
* texinfos.am: Adjust.
Akim Demaille [Mon, 5 Mar 2001 15:02:58 +0000 (15:02 +0000)]
If OBJEXT and EXEEXT are not set, provide a default value, and use
them unconditionally.
* automake.in (&generate_makefile): Provide default values for
EXEEXT and OBJEXT.
(&get_object_extension, &finish_languages)
(&handle_single_transform_list, &handle_programs, &add_depend2)
(&check_cygnus, &lang_c_finish, am_install_var): Don't bother with
them, they are defined.
* compile.am, depend2.am, program.am, progs.am: Likewise.
* remake-hdr.am: Fix a typo.
* tests/cxxo.test, tests/fo.test, tests/implicit.test,
* tests/interp.test, tests/subobj.test, tests/subobj2.test,
* tests/suffix2.test: Adjust.
Akim Demaille [Mon, 5 Mar 2001 14:45:36 +0000 (14:45 +0000)]
Make the installation/uninstallation of Info pages follow the
regular am/recursive scheme.
* automake.in (%required_targets, %dependencies): Add
install-info.
(%dependencies): Add install-info, install-info-am, and
unstall-info.
(&handle_subdirs): Don't transform INSTALLINFO, which mapping was
reversed BTW. Does anybody use the option `no-installinfo'?
(&handle_merge_targets): Let the handling of info related targets
to...
(&handle_factored_dependencies): this.
* subdirs.am: Use ?INSTALL-INFO?.
* texinfos.am: Define the install-info, uninstall-info and
uninstall-info-am targets.