logtalk_make/1¶
Description¶
logtalk_make(Target)
Runs a make target. Fails of the target is not valid.
Allows reloading all Logtalk source files that have been modified since
last loaded when called with the target all
, deleting all
intermediate files generated by the compilation of Logtalk source files
when called with the target clean
, checking for code issues when
called with the target check
, listing of circular dependencies
between pairs or trios of objects when called with the target
circular
, generating documentation when called with the target
documentation
, and deleting the dynamic binding caches with the
target caches
.
There are also three variants of the all
target: debug
,
normal
, and optimal
. These targets change the compilation mode
(by changing the default value of the debug and
optimize flags) and reload all files affected.
When using the all
target, only source files loaded using the
logtalk_load/1-2
predicates are reloaded. Non-modified files will
also be reloaded when there is a change to the compilation mode (i.e.
when the files were loaded without explicit debug or
optimize flags and the default values of these
flags changed after loading; no check is made, however, for other implicit
compiler flags that may have changed since loading). When an included file
is modified, this target reloads its main file (i.e. the file that contains
the include/1 directive).
When using the check
or circular
targets, be sure to compile
your source files with the source_data flag
turned on for complete and detailed reports.
When using the check
target, predicates for messages sent to objects
that implement the forwarding built-in protocol
are not reported. While this usually avoids only false positives, it may
also result in failure to report true missing predicates in some cases.
When using the circular
target, be prepared for a lengthy
computation time for applications with a large combined number of
objects and message calls. Only mutual and triangular dependencies are
checked due to the computational cost.
The documentation
target requires the doclet
tool and a single
doclet object to be loaded. See the doclet
tool for more details.
Depending on the backend Prolog compiler, the following top-level shortcuts are usually defined:
{*}
-logtalk_make(all)
{!}
-logtalk_make(clean)
{?}
-logtalk_make(check)
{@}
-logtalk_make(circular)
{#}
-logtalk_make(documentation)
{$}
-logtalk_make(caches)
{+d}
-logtalk_make(debug)
{+n}
-logtalk_make(normal)
{+o}
-logtalk_make(optimal)
Check the adapter files for the availability of these shortcuts as they are not part of the language (and thus should only be used at the top-level interpreter).
The target actions can be extended by defining clauses for the multifile
and dynamic hook predicate logtalk_make_target_action(Target)
where
Target
is one of the targets listed above. The additional user
defined actions are run after the default ones.
Modes and number of proofs¶
logtalk_make(+atom) - zero_or_one
Errors¶
(none)
Examples¶
% check for code issues in the loaded source files:
| ?- logtalk_make(check).
% delete all intermediate files generated by
% the compilation of Logtalk source files:
| ?- logtalk_make(clean).