Makepp supports most of the command line options and syntax that other makes support. You can assign variables on the command line which will override any assignment in every Makefile loaded, e.g.,
makepp CFLAGS=-O2
As with other implementations of make, if you do not specify a target, the first target in the file which is not part of a pattern rule is invoked.
Options include most of the standard make options, plus a few new ones.
-e
or --environment-override
-C
or --directory=dirname
-F
, except that if the directory does not exist yet
but does exist in a repository,
-F
will make the directory whereas -C
won't.
-f
Makefile or --file=Makefile
or --makefile=Makefile
-f
option, makepp looks first for a file in
the current directory called Makeppfile
, then
makefile
, then Makefile
.
-F
Makefile or --makeppfile=Makefile
Makeppfile
,
makefile
, and Makefile
.
This option can be useful if you execute makepp from unpredictable directories. For example, if you compile from within emacs and you have sources scattered all over your directory tree, the current working directory for the compilation command will be the directory the last source file you edited was in, which may or may not be the top level directory for your compilation. However, you can specify your compilation command as
makepp -F /your/source/dir/topand this will work no matter what your current directory is.
-h
or --help
-j
or --jobs=n
makepp
does not execute commands in parallel.
Unlike some other versions of make, when jobs are executed in parallel, makepp directs their output to a file and only displays the output when the commands have finished. This prevents output from several different commands from being mixed together on the display, but it does mean that you might have to wait a little longer to see the output.
-k
or --keep-going
--log=logfilename
.makepp_log
.
--noimplicit-load
load_makefile
statement, makepp aborts with
an error. You can also turn off makefile loading on a
directory-by-directory basis by using the no_implicit_load
statement in one of your makefiles.
-m
or --signature-method=
value
:signature
modifier in makefiles which
do not have a signature
statement. Possible values
are target_newer
, exact_match
,
md5
, and c_compilation_md5
. This
option has no effect on the signature method for C/C++
compilation; you must use the signature
statement or the :signature
rule modifier to affect that. For more details, see the section
on signature checking.
--nolog
.makepp_log
. This can be extremely valuable for
debugging a makefile--makepp tells you what it thought
all of the dependencies were, and which one(s) it thought
changed. However, it does take some extra CPU time, and you
might not want to bother.
--norc-substitution
rc_substitution=0
in your makefile.
--noremake-makefiles
-
Ordinarily, makepp loads each makefile in, then looks to
see whether there is a rule that specifies how to update the
makefile. If there is, and the makefile needs to be rebuilt,
the command is executed, and the makefile is reread. This often
causes problems with makefiles produced for the standard unix
make utility, because (in my experience) often the make rules
for updating makefiles are inaccurate--they frequently omit
targets which are modified. This can cause makepp to
remake a lot of files unnecessarily. You can often solve this
problem by simply preventing makepp from updating the
makefile automatically (but you have to remember to update it by
hand).
--nowarn
-
Don't print any warning messages. Most warning messages are
about constructs that you might see in legacy makefiles that
makepp considers dangerous, but a few of them concern
possible errors in your makefile.
--percent-subdirs
-
By default, % in a pattern rule (not in the
$(patsubst )
function) matches only the
filename, not a directory. In other words, %.c matches only
*.c. If you want %.c to match **/*.c, specify this option.
You can also enable this in your makefile by the assignment
percent_subdirs=1
.
-q
or --quiet
-
Don't print informational messages like "Scanning xyz.h" or
"Loading makefile /users/src/bob/funproject/Makefile".
-R
or --repository=dir
-
Specify the given directory as a repository. Repositories are added
in the order specified on the command line, so the first one you
specify has precedence. All files in the directory (and all its
subdirectories) are automatically and temporarily linked to the
current directory (and subdirectories) if they are needed.
If you just specify a directory after -R
, its
contents are linked into the current directory. You can link
its contents into any arbitrary place in the file system by
specifying the location before an equals sign, e.g,
-R subdir1/subdir2=/users/joe/joes_nifty_library
.
--traditional-recursive-make
-
This option is present to allow makepp to work with old
makefiles that use recursive make extensively. By default,
recursive make is implemented by a subprocess that communicates
with the parent process; the build is actually done by the
parent process. This allows some of makepp's nice
features like repositories to work with recursive make
invocations. However, this technique will not work if you load
more than one makefile from the same directory, or if you use
different command line options on different invocations of
recursive make. The
--traditional-recursive-make
option makes makepp do recursive makes the same way as
the traditional make, allowing more makefiles to work, but then
repositories and parallel builds do not work properly. This
option is rarely needed any more, and makepp will tell
you if it runs into a construct that requires it.
-v
or --verbose
-
Verbose mode. Explains what it is trying to build, and why each
file is being built. This can be useful if you think a file is
being rebuilt too often.
This option actually takes what would be written to the log
file and displays it on the screen. It's usually easier to run
makepp and then look at .makepp_log
.