Using Tools: 13.3 pmake: Command Line Arguments

Up: GEOS SDK TechDocs | Up | Prev: 13.2 How to Customize pmake | Next: 13.4 Contents of a Makefile

The pmake program comes with a wide variety of flags to choose from. They must be passed in the following order: flags (if any), variable assignments (if any), target (if any).

pmake [flags] [variables] [target]

The flags are as follows:

-d info
This causes pmake to print out debugging information that may prove useful to you. The info parameter is a string of single characters that tell pmake what aspects you are interested in. Most of these options will make little sense to you unless you've dealt with Make before. Just remember where this table is and come back to it as you read on. The characters and the information they produce are as follows:
*
All debugging information.
c
Conditional evaluation.
d
The searching and caching of directories.
m
The making of each target: what target is being examined; when it was last modified; whether it is out-of-date; etc.
p
Makefile parsing.
r
Remote execution.
s
The application of suffix-transformation rules.
t
The maintenance of the list of targets.
v
Variable assignment.

Of these, the "m" and "s" flags will be most useful.

-f file
Specify a makefile to read different from the default (MAKEFILE). If file is "-", pmake uses the standard input. This is useful for making "quick and dirty" makefiles.
-h
Prints out a summary of the various flags pmake accepts. It can also be used to find out what level of concurrence was compiled into the version of pmake you are using (look at -J and -L) and various other information on how pmake is configured.
-i
If you give this flag, pmake will ignore non-zero status returned by any of its shells. It's like placing a "-" before all the commands in the makefile.
-k
This is similar to -i in that it allows pmake to continue when it sees an error, but unlike -i where pmake continues blithely as if nothing went wrong, -k causes it to recognize the error and only continue work on those things that don't depend on the target, either directly or indirectly (through depending on something that depends on it), whose creation returned the error. (The "k" is for "keep going".)
-n
This flag tells pmake not to execute the commands needed to update the out-of-date targets in the makefile. Rather, pmake will simply print the commands it would have executed and exit. This is particularly useful for checking the correctness of a makefile. If pmake doesn't do what you expect it to, it's a good chance the makefile is wrong.
-p number
You should never have to use this option; it is used for debugging pmake . This causes pmake to print its input in a reasonable form, though not necessarily one that would make immediate sense to anyone but a pmake expert. The number is a bitwise-or of 1 and 2 where 1 means it should print the input before doing any processing and 2 says it should print it after everything has been re-created. Thus "-p 3"would print it twice--once before processing and once after (you might find the difference between the two interesting).
-q
If you give pmake this flag, it will not try to re-create anything. It will just query to see if anything is out-of-date and exit non-zero if so.
-s
This silences pmake , preventing it from printing commands before they're executed. It is the equivalent of putting an "@" before every command in the makefile.
-t
Rather than try to re-create a target, pmake will simply "touch" it so as to make it appear up-to-date. If the target didn't exist before, it will when pmake finishes, but if the target did exist, it will appear to have been updated.
-D var
Allows you to define a variable to have 1 as its value. The variable is a global variable, not a command-line variable. This is useful mostly for people who are used to the C compiler arguments and those using conditionals, which are described in Conditional Statements , below.
-I directory
Tells pmake another place to search for included makefiles.
-W
Suppresses pmake 's warnings. Note that tools which pmake invokes (Goc, Glue, etc.) may still print out warnings of their own.

Up: GEOS SDK TechDocs | Up | Prev: 13.2 How to Customize pmake | Next: 13.4 Contents of a Makefile