Author(s): Manuel Hermenegildo.
Note:
lpmake
and the
make
library are still under active development, and they may change substantially in future releases.
lpmake
is a Ciao application which uses the Ciao
make
library to implement a dependency-driven scripts in a similar way to the Unix
make
facility.
The original purpose of the Unix
make
utility was to determine automatically which pieces of a large program needed to be recompiled, and issue the commands to recompile them. In fact,
make
is often used for many other purposes: it can be used to describe any task where some files must be updated automatically from others whenever the others change.
To prepare to use
lpmake
, you must write a file (typically called
Makefile.pl
) that describes the relationships among files in your program or application, and states the commands for updating each file. In a program, typically the executable file is updated from object files, which are in turn made by compiling source files.
Once a suitable makefile exists, each time you change some source files, simply typing lpmake
suffices to perform all necessary recompilations. The
make
program uses the makefile data base and the last modification times of the files to decide which of the files need to be updated. For each of those files, it issues the commands recorded in the data base.
lpmake
executes commands in the
Makefile.pl
to update one or more target names, where name is typically a program, but can also be a file to be generated or even a "virtual" target. If no -l
or -m
options are present,
lpmake
will look for the makefile
Makefile.pl
.
lpmake
updates a target if it depends on prerequisite files that have been modified since the target was last modified, or if the target does not exist.
You can provide command line arguments to
lpmake
to control which files should be regenerated, or how.
Note: if you use
make
and
functions
, then
make
should appear before
functions
in the list of packages.
Go to the first, previous, next, last section, table of contents.