first cut at make/0y

This commit is contained in:
Vítor Manuel de Morais Santos Costa 2009-10-15 12:56:16 +01:00
parent dd6ac5a8f2
commit d649ba5894
3 changed files with 23 additions and 2 deletions

View File

@ -1685,6 +1685,23 @@ if they have not been loaded before, does nothing otherwise.
@var{F} must be a list containing the names of the files to load.
@item make [ISO]
@findex make/0
@snindex make/0
@cnindex make/0
SWI-Prolog built-in to consult all source files that have been
changed since they were consulted. It checks all loaded source
files. make/0 can be combined with the compiler to speed up the
development of large packages. In this case compile the package
using
@example
sun% pl -g make -o my_program -c file ...
@end example
If `my_program' is started it will first reconsult all source files
that have changed since the compilation.
@item include(@var{+F}) [ISO]
@findex include/1 (directive)
@snindex compile/1 (directive)

View File

@ -321,8 +321,6 @@ prolog:atom_concat(A,B,C) :- atomic_concat(A,B,C).
:- hide(update_mutable).
prolog:make.
prolog:source_location(File,Line) :-
prolog_load_context(file, File),
prolog_load_context(term_position, '$stream_position'(_,Line,_)).

View File

@ -926,3 +926,9 @@ absolute_file_name(File,Opts,TrueFileName) :-
'$access_yap_flags'(11,1).
'$fetch_comp_status'(compact).
make :-
recorded('$lf_loaded','$lf_loaded'(F1,M,_),_),
'$load_files'(F1, [if(changed)],make),
fail.
make.