The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

makepp_command -- Command line syntax for makepp

DESCRIPTION

    makepp [-options] [VAR=value] target1 target2 ...

Makepp supports most of the command line options and syntax that other makes support. You specify a list of targets to build on the command line. If you do not specify any targets, the first explicit target in the makefile is built.

You can assign variables on the command line which will override any assignment or environment variable in every Makefile loaded, e.g.,

    makepp CFLAGS=-O2

Options include most of the standard make options, plus a few new ones.

-e
--environment-overides

Causes variables from the environment to override definitions in the makefile. By default, assignments within the makefile override variable values which are imported from the environment.

-C dirname
--directory=dirname

Cd to the given directory before trying to build the targets. This is more or less equivalent to specifying a directory with -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
--file=Makefile
--makefile=Makefile

Uses the specified makefile. If you do not specify the -f option, makepp looks first for a file in the current directory called Makeppfile, then makefile, then Makefile.</code>

-F Makefile
--makeppfile=Makefile

Uses the specified makefile, and cd's to the directory containing the Makefile before running the make command. If you specify a directory instead of a Makefile, cd's to the directory and then searches for 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/top

and this will work no matter what your current directory is.

-h
--help

Print out a brief summary of the options.

-j n
--jobs=n

Interprets the next word as the number of shell commands that can be executed in parallel. By default, 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
--keep-going

Build as many files as possible, even if some of them have errors. By default, makepp stops when it encounters the first error, even if there are other files that need to be built that don't depend on the erroneous file.

--log=logfilename

Changes the name of the log file to the indicated name. By default, the log file is called .makepp_log.

--noimplicit-load

Don't automatically load makefiles from directories referenced (see "Implicit loading" in makepp_build_algorithm). By default, makepp automatically loads a makefile from any directory that contains a dependency of some target it needs to build, and from any directory that is scanned by a wildcard. Sometimes, however, this causes a problem, since makefiles need to be loaded with different command line varaibles or options, and if they are implicitly loaded before they are explicitly loaded by a recursive make invocation or the 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 method
--signature-method>=method

Specifies the default signature method to use for rules which do not have the :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 makepp_signatures.

--nolog

Don't bother writing a detailed description of what was done to the log file. By default, makepp writes out an explanation of every file that it tried to build, and why it built it or did not build it, to a file called .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

Disables rc-style substitution of make variables (see "rc-style substitution" in makepp_variables for details). Ordinarily rc-style substitution is either harmless or beneficial, but occasionally you may find a case where it breaks an existing makefile. Also, disabling rc-style expansion is necessary to prevent stripping of leading and trailing whitespace from variables. See makepp_incompatibilities for when this is important. You can also disable rc-style substitution on a per-makefile basis by setting the variable 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
--quiet

Don't print informational messages like "Scanning xyz.h" or "Loading makefile /users/src/bob/funproject/Makefile".

-R dir
--repository=dir

Specify the given directory as a repository (see makepp_repositories for details). 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
--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.

--version

Print out the version number.