Predicates Available When Using The Make Package
Author(s): Manuel Hermenegildo, Edison Mera.
This is the run-time module which implements the predicates which are provided when using the make library package in a given application. For example, they are used internally by lpmake.
Usage and interface
- Library usage:
This module is loaded automatically when the make library package is used. - Exports:
- Predicates:
make/1, make_option/1, verbose_message/1, verbose_message/2, dot_concat/2, call_unknown/1, all_values/2, get_value/2, get_value_def/3, get_all_values/2, name_value/2, set_name_value/2, cp_name_value/2, get_name_value/3, get_name_value_string/3, add_name_value/2, del_name_value/1, check_var_exists/1, find_file/2, vpath/1, add_vpath/1, vpath_mode/3, add_vpath_mode/3, bold_message/1, bold_message/2, normal_message/2, bolder_message/1, bolder_message/2, newer/2, register_module/1, unregister_module/1, push_name_value/3, pop_name_value/1, push_active_config/1, pop_active_config/0, get_active_config/1, dyn_load_cfg_module_into_make/1, get_settings_nvalue/1, apply_vpath_mode/4, get_name/2. - Regular Types:
target/1.
- Predicates:
- Imports:
- System library modules:
compiler/compiler, filenames, terms, system, format, lists, messages, make/up_to_date, aggregates. - Packages:
prelude, nonpure, assertions, regtypes, hiord.
- System library modules:
Documentation on exports
Usage:make(TargetList)
This is the main entry point to the make library. It makes the list of targets one by one as well as any intermediate targets needed as dictated by the dependency rules.
- The following properties should hold at call time:
(basic_props:list/2)TargetList is a list of targets.
Usage:make_option(Option)
Asserting/retracting facts of this predicate sets/clears library options. Default is no options (i.e., the predicate is undefined). The following values are supported:
make_option('-v'). % Verbose: prints progress messages (useful % for debugging rules).
- The following properties should hold at call time:
(basic_props:atm/1)Option is an atom.
Usage:verbose_message(Text,ArgList)
The text provided in Text is printed as a message, using the arguments in ArgList, if make_option('-v') is defined. Otherwise nothing is printed.
- The following properties should hold at call time:
(format:format_control/1)Text is an atom or string describing how the arguments should be formatted. If it is an atom it will be converted into a string with name/2.
(basic_props:list/1)ArgList is a list.
Usage:get_all_values(Name,Values)
Values are all the possible values of Name.
Usage:cp_name_value(Source,Target)
Copy the variable values from Source to Target
- The following properties should hold at call time:
(basic_props:atm/1)Source is an atom.
(basic_props:atm/1)Target is an atom.
Usage:check_var_exists(Var)
Fails printing a message if variable Var does not exist.
Usage:push_name_value(Name,Var,R)
Push variable name Name with all values of variable Var and returns R, an abstract type to pass to pop_name_value/1 to undo the push changes. Push cannot be nested.
Usage:pop_name_value(R)
Restores the value of the variable indicated by the abstract type R. Notice that R _must be_ the argument returned by push_name_value/2.
Usage:dyn_load_cfg_module_into_make(ConfigFile)
Used to load dynamically a module (typically, a Makefile) into the make library from the application using the library.
- The following properties should hold at call time:
(streams_basic:sourcename/1)ConfigFile is a source name.
Usage:get_settings_nvalue(Pred)
Executes Pred as unkown call, in other words, it is useful to execute predicates that have been loaded by register_module/1.
Example: get_settings_nvalue(my_options(ciao, A, B)).
- The following properties should hold at call time:
(basic_props:term/1)Pred is any term.
Known bugs and planned improvements
- The current handle of help messages is defficient. It must be in a standar form, and the user of this library only must be allowed to add messages, not procedures to print it.
- target_comment/1 does not work, why? :-(.