lib/Automake/Variable.pm


Log

Author Commit Date CI Message
Alexandre Duret-Lutz 0a1c8dcb 2003-11-29T23:47:02 * 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.
Alexandre Duret-Lutz 0099f67b 2003-11-29T21:47:27 * 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.
Alexandre Duret-Lutz 9177ef89 2003-11-29T18:02:40 * 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.
Alexandre Duret-Lutz 2028e01e 2003-11-24T22:13:42 * 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.
Alexandre Duret-Lutz 526a21cd 2003-11-11T00:07:17 * doc/automake.texi (Texinfo): Define MAKEINFO, MAKEINFOHTML, MAKEINFOFLAGS, AM_MAKEINFOFLAGS, AM_MAKEINFOHTMLFLAGS, TEXI2DVI, TEXI2PDF, DVIPS, and TEXINFO_TEX in a table. (Uniform): Do not speak of missing HTML support, this is confusing. * lib/Automake/Variable.pm (_silent_variable_override): Add AM_MAKEINFOHTMLFLAGS. * lib/am/texibuild.am (%SOURCE_SUFFIX%.html): Use MAKEINFOHTML and AM_MAKEINFOHTMLFLAGS instead of MAKEINFO and AM_MAKEINFOFLAGS. * lib/am/texinfos.am (MAKEINFOHTML, AM_MAKEINFOHTMLFLAGS): Define. * tests/txinfo21.test: Add a test with AM_MAKEINFOHTMLFLAGS.
Alexandre Duret-Lutz 9e88c16c 2003-09-07T09:55:36 * aclocal.in (configure_ac): Do not call require_configure_ac before parsing the options. * automake.in (configure_ac): Likewise. * lib/Automake/Variable.pm (configure_ac): Do not require configure.ac, find it. * lib/Automake/Configure_ac.pm (require_configure_ac): find_configure_ac never return an undefined value, so test the file's existence instead. * tests/Makefile.am (TESTS): Add help.test. * tests/help.test: New file.
Paul Eggert 636c8076 2003-09-06T05:36:57 Spelling and minor grammar fixes.
Akim Demaille 1e118082 2003-08-21T08:49:25 * lib/Automake/Configure_ac.pm (&find_configure_ac) (&require_configure_ac): Accept an optional directory argument. ($configure_ac): Remove. * aclocal.in, automake.in ($configure_ac): New. * lib/Automake/Variable.pm: Don't use $configure_ac, just configure.ac.
Raja R Harinath c5548fdc 2003-08-12T22:33:44 typos in comments
Alexandre Duret-Lutz 9a792314 2003-08-12T17:52:09 * lib/Automake/Item.pm, lib/Automake/ItemDef.pm: New files. * lib/Automake/Rule.pm, lib/Automake/RuleDef.pm: New files. * lib/Automake/Makefile.am (dist_perllib_DATA): Add them. * lib/Automake/VarDef.pm: Make this a subclass of Automake::ItemDef. (new): Adjust to call Automake::ItemDef::new. (comment, location, owner): Delete. Now inherited from ItemDef. * lib/Automake/Variable.pm: Make this a subclass of Automake::Item. (_new): Adjust to call Automake::Item::new. (name, def, rdef, _set, conditions, not_always_defined_in_cond): Delete. How inherited from Item, where `_set' is called `set'. * automake.in (SUFFIX_RULE_PATTERN): Delete. Now in Automake::Rule. (suffix_rules_default): Delete. Now Automake::Rule::_suffix_rules_default (suffixes): Delete. Now Automake::Rule::suffixes. (TARGET_AUTOMAKE, TARGET_USER): Delete. Now Automake::RuleDef::RULE_AUTOMAKE and Automake::RuleDef::RULE_USER. (%targets, %target_source, %target_name, %target_owner): Delete, replaced by the Rule and RuleDef classes. (dependencies, depend, actions): Delete. Now in Automake::Rule. (suffix_rules, register_suffix_rule): Likewise. (KNOWN_EXTENSIONS_PATTERN, accept_extensions): Likewise. (known_extensions_list): Delete. Now Automake::Rule::_known_extensions_list. (target_conditions): Delete. Now inherited by Automake::Rule from Automake::Item::conditions. (rule_define): Delete. Now Automake::Rule::define. Adjust all callers. (target_defined): Delete. Now Automake::Rule::rule. Adjust all callers. (initialize_per_input): Adjust to call Automake::Rule::reset. (err_target, err_cond_target, msg_cond_target, msg_target, reject_target): Delete. Now defined in Automake::Rule as err_rule, err_cond_rule, msg_cond_rule, msg_rule and reject_target. Adjust all callers. (handle_languages): Call suffix_rules_count. * tests/location.test: Adjust expected diagnostics. We now display $(EXEEXT) accurately.
Alexandre Duret-Lutz 90793a74 2003-08-09T22:34:30 Revert the fix for PR automake/291: * lib/Automake/Variable.pm (define): Do not warn about variables starting with `_' which are an issue on NEWS-OS 4.2R. According to Paul Eggert, NEWS-OS 4.2R is ten years old, the latest version was released on 1996 and is not in wide use. On the other hand, variables starting with `_' are mandatory in several situations, so diagnosing them is more annoying than useful. * tests/canon5.test: Do not use -Wno-portability. * tests/vars2.test: Delete. * tests/Makefile.am (TESTS): Remove vars2.test. Suggested by Jim Meyering.
Alexandre Duret-Lutz a1be9812 2003-08-07T21:20:12 * lib/Automake/Variable.pm (condition_ambiguous_p): Move ... * lib/Automake/DisjConditions.pm (ambiguous_p): ... here. * automake.in (rule_define): Adjust usage. * lib/Automake/Variable.pm (_check_ambiguous_condition): Likewise.
Raja R Harinath bbde2866 2003-08-03T21:17:32 * lib/Automake/Variable.pm (@EXPORT): Remove traverse_variable_recursively and require_variables_for_variable. (require_variables_for_variable, traverse_variable_recursively) (_traverse_variable_recursively_worker): Convert to Automake::Variable methods, remove support for being invoked with variable names, and rename to ... (requires_variables, traverse_recursively) (_do_recursive_traversal): ... these. (_value_as_list_recursive_worker, transform_variable_recursively): Update to reflect changes. * automake.in (handle_LIBOBJS, handle_ALLOCA) (handle_libraries, handle_ltlibraries, am_primary_prefixes): Likewise. (define_objects_from_sources): Fix typo in comment.
Raja R Harinath 797e4c6e 2003-08-02T04:27:03 * lib/Automake/Variables.pm (variables): Return a list of Automake::Variable instances, not a list of strings. (dump): Remove support for being invoked with a string. (variables_dump): Adapt to these changes. * automake.in (check_typos): Likewise. (am_primary_prefixes): Likewise.
Alexandre Duret-Lutz 2056a8f3 2003-07-27T21:25:17 * lib/Automake/Variable.pm (@EXPORT): Remove variable_dump. (variable_dump): Replace by ... (dump): ... this method. (rdef, _check_ambiguous_condition): Adjust to use ->dump. (define, variables_dump): Adjust to use Automake::Variable::dump
Raja R Harinath 2b957614 2003-07-10T23:39:09 Avoid using refs as hash keys. * lib/Automake/Variable.pm ($_traversal): New. (reset): Reset $_traversal. (_new): New attribute 'scanned'. (%_vars_scanned): Remove. (traverse_variable_recursively) (traverse_variable_recursively_worker): Use $_traversal instead of %_vars_scanned to detect recursively defined variables.
Alexandre Duret-Lutz 05ab9332 2003-07-10T20:51:27 * lib/Automake/Variable.pm (define): Make clear the diagnostic about variable names starting with `_' is about *Make* variables.
Alexandre Duret-Lutz 1a37abc5 2003-07-09T22:07:10 * lib/Automake/Variable.pm (_traverse_variable_recursively_worker): Return the empty list on recursively defined variable. This supersedes my change of 2003-07-02.
Akim Demaille d23e6821 2003-07-06T19:27:29 * automake.in (&define_files_variable): New. (&handle_texinfo_helper): Move the handling of user variables from here, to... (&handle_texinfo): here. This is to balance the size of these functions, and to match the convention of other _helper functions. (&handle_texinfo_helper): Use &define_files_variable. Move some code to use less variables. Rename $info_cursor as $texi. (&handle_texinfo): Do not call handle_texinfo_helper if there are no TEXINFOS. * lib/am/texinfos.am: Sort the occurrences of dvi, info, pdf, ps and html. Remove *-recursive targets from .PHONY, they are part of $(RECURSIVE_TARGETS) anyway. (install-info, mostlyclean-aminfo): Are .PHONY.
Alexandre Duret-Lutz 21af290f 2003-07-02T21:57:51 * lib/Automake/Variable.pm (_traverse_variable_recursively_worker): Do not return undef when a variable is recursively defined, this causes warnings all over the place. Return the empty string instead.
Alexandre Duret-Lutz 41740be4 2003-06-30T06:35:55 * automake.in ($SUBST_REF_PATTERN): Do not define. (%gen_varname): Move to Variable.pm, as %_gen_varname. (initialize_per_input): Do not clean %gen_varname. (handle_options, check_libobjs_sources, handle_source_transform, handle_LIBOBJS, handle_ltlibraries, handle_texinfo_helper, handle_man_pages, handle_dist, handle_subdirs, handle_gettext, am_install_var): Adjust to use value_as_list_recursive, loc_and_value_as_list_recursive, and has_conditional_contents. (require_file_with_macro): Accept an Automake::Variable as argument. (traverse_variable_recursively, traverse_variable_recursively_worker, gen_varname, transform_variable_recursively): Move ... * lib/Automake/Variable.pm (traverse_variable_recursively, _traverse_variable_recursively_worker, _gen_varname, transform_variable_recursively): ... here. * automake.in (variable_conditionally_defined, variable_value_as_list_recursive_worker, variable_value_as_list_recursive variable_loc_and_value_as_list_recursive): Move ... * lib/Automake/Variable.pm (has_conditional_contents, _value_as_list_recursive_worker, value_as_list_recursive, loc_and_value_as_list_recursive): ... here. (reset): Reset %_gen_varname.
Alexandre Duret-Lutz 5b94845c 2003-06-23T21:39:54 * lib/Automake/Variable.pm (vardef, rvardef, set_seen): New functions. (variable_defined, examine_variable): Remove. (%_ac_macro_for_var): Add an entry for ALLOCA. (require_variables): Use vardef instead of variable_defined. Do not use _cvar. * automake.in (generate_makefile): Do not push $(SOURCE) into @sources. Use define_pretty_variable to define SOURCES. (handle_LIBOBJS, handle_ALLOCA): Use require_variables_for_variable to require LIBOBJS, LTLIBOBJS and ALLOCA. (handle_programs, handle_ltlibraries): Do not define an empty _DEPENDENCIES or _LDFLAGS variable when none is defined. (define_configure_variable): Do not check whether the variable already exists (it's Automake::Variable::define's job). (require_build_directory): Likewise, do not check the existence of am__dirstamp. (generate_makefile, handle_options, handle_languages) (check_libobjs_sources, handle_single_transform_list) (traverse_variable_recursively_worker, handle_source_transform) (handle_lib_objects, handle_LIBOBJS, handle_compile) (handle_libtool, handle_programs, handle_libraries) (handle_ltlibraries, check_typos, handle_texinfo_helper) (handle_man_pages, handle_tags, handle_dist, handle_subdirs) (scan_aclocal_m4, handle_gettext, handle_footer, handle_install) (handle_all, do_check_merge_target, handle_clean, lang_c_finish) (handle_tests, lang_yacc_target_hook, define_pretty_variable) (define_compiler_variable, define_linker_variable) (make_paragraphs, am_primary_prefixes, am_install_var): Adjust to call var, vardef, or set_seen, instead of variable_defined. Use set_seen only for variables which are actually checked by check_typos. * tests/target.test: Delete. * tests/alloca.test, tests/alloca2.test: New files. * tests/libobj3.test: Check error message. * tests/distcom4.test: Make sure configure is in DIST_COMMON. This replace confdist.test. * tests/Makefile.am (TESTS, XFAIL_TESTS): Remove target.test. (TESTS): Add alloca.test and alloca2.test. Remove confdist.test.
Alexandre Duret-Lutz 9f02b686 2003-06-02T23:35:00 * alocal.in: Use Automake::Configure_ac. ($configure_ac): Delete. (scan_configure): Adjust use of find_configure_ac; * automake.in: Use Automake::Configure_ac. ($configure_ac): Delete. (scan_autoconf_files): Adjust use of find_configure_ac; * lib/Automake/Configure_ac.pm: New file. * lib/Automake/General.pm (find_configure_ac): Delete. Now replaced by Automake::Configure_ac::search_configure_ac. * lib/Automake/Makefile.am (dist_perllib_DATA): Add Configure_ac.pm. * lib/Automake/Variable.pm: Use Automake::Configure_ac. (require_variables): Adjust use of $configure_ac.
Alexandre Duret-Lutz 4f299408 2003-05-29T19:05:55 * lib/Automake/Variable.pm (check_defined_unconditionally): Add the $parent_cond argument. (output): Use $self->name in diagnostic not $self. (variable_value_as_list): Rename as ... (value_as_list): ... this. Declare as a method. Take a $parent_cond argument and pass it to check_defined_unconditionally. Do not call variable_assert, now that this is a method. (variable_assert): Delete (unused). * automake.in (traverse_variable_recursively_worker): Adjust to use check_defined_unconditionally and value_as_list as a methods.
Alexandre Duret-Lutz 66fdf15e 2003-05-29T17:34:52 * lib/Automake/Variable.pm (output): Declare as a method, since it is only used this way. (define): Fix documentation of $cond. Suggested by Raja R. Harinath.
Alexandre Duret-Lutz fde42f14 2003-05-25T20:05:50 * lib/Automake/Variable.pm, lib/Automake/VarDef.pm: New files. * lib/Automake/Makefile.am (dist_perllib_DATA): Add Variable.pm and VarDef.pm. * automake.in: Use Automake::Variable and Automake::VarDef. (MACRO_PATTERN): Delete. Now Automake::Variable::_MACRO_PATTERN. (am_macro_for_var): Delete. Now Automake::Variable::_am_macro_for_var. (ac_macro_for_var): Delete. Now Automake::Variable::_ac_macro_for_var. (silent_variable_override): Delete. Now Automake::Variable::_silent_variable_override. (var_value, var_location, var_comment, var_type, var_owner, var_pretty, content_seen): Delete. This functionality is now offered by Automake::Variable and Automake::VarDef. (VAR_AUTOMAKE, VAR_CONFIGURE, VAR_MAKEFILE, VAR_ASIS, VAR_PRETTY): Delete. Now defined in Automake::VarDef. (var_order): Delete. Now Automake::Variable::_var_order. (appendvar): Delete. Now Automake::Variable::_appendvar. (var_SUFFIX_trigger): Register using Automake::Variable::hook. (initialize_per_input): Call Automake::Variable::reset. (err_var, msg_cond_var, msg_var, reject_var): Delete. Now defined in Automake::Variable. (generate_makefile, process_option_list, handle_languages) (traverse_variable_recursively_worker) (transform_variable_recursively, handle_compile) (handle_libraries, handle_ltlibraries) (check_typos, handle_dist, handle_subdirs, scan_autoconf_files): Adjust to use Automake::Variable functions. (check_ambiguous_condition): Delete. Now Automake::Variable::_check_ambiguous_condition. (condition_ambiguous_p): Delete. Now Automake::Variable::condition_ambiguous_p. (variable_not_always_defined_in_cond): Delete. Now Automake::Variable::not_always_defined_in_cond. (macro_define): Delete. Now Automake::Variable::define. (macro_delete): Delete. Now Automake::Variable::variable_delete. (macro_dump): Delete. Now Automake::Variable::variable_dump. (macros_dump): Delete. Now Automake::Variable::variables_dump. (variable_defined): Delete. Now Automake::Variable::variable_defined, with the target check temporarily disabled. (variable_assert): Delete. Now Automake::Variable::variable_assert. (examine_variable): Delete. Now Automake::Variable::examine_variable. (variable_conditions): Delete. Now Automake::Variable::conditions. (scan_variable_expansions): Delete. Now Automake::Variable::scan_variable_expansions. (check_variable_expansions): Delete. Now Automake::Variable::check_variable_expansions. (check_variable_defined_unconditionally): Delete. Now Automake::Variable::check_defined_unconditionally. (variable_value): Delete. Now Automake::Variable::variable_value. (variable_value_as_list): Delete. Now Automake::Variable::variable_value_as_list. (variable_value_as_list_recursive_worker): Adjust to use Automake::Variable functions. (variable_output): Delete. Now Automake::Variable::output. (define_pretty_variable, define_configure_variable, read_am_file) (define_standard_variables, read_main_am_file): Adjust to use Automake::Variable functions. (handle_variables): Delete. Now Automake::Variable::output_variables. (file_contents_internal, am_primary_prefixes, am_install_var) (require_file_with_macro, require_conf_file_with_macro) (push_dist_common): : Adjust to use Automake::Variable functions. (require_variables): Delete. Now Automake::Variable::require_variables. (require_variables_for_macro): Delete. Now Automake::Variable::require_variables_for_variable. * tests/Makefile.am (XFAIL_TESTS): Add target.test.