pmake quick reference guide Command flags ------------- -d Turn on debug in modules of pmake. -f Use for makefile. -h Print help. -i Ignore all errors. -k Keep going even after detecting an error. -l Create lock file. -n Don't actually execute. -p <#> Print graph. # = 0, 1, 2, 3 -q Query and return 0 if up-to-date. -r Remove built-in rules. -s Do not echo commands. -t Just touch targets. -v System V compatable make (same as -B -V). -x Ignored. -B System V compatable but try to parallelize. -C Disable -B. -D Define to be 1. -I Define to search for include files. -J <#> Specify maximum number of jobs to run at once. -L Ignored. -M Do old-style make. -P Don't use pipes. Controls the way pmake displays output from all of its children. -V Do old-style variable expansion. -W Don't print warning messages. -X Ignored. VAR=value Set the value of variable VAR. Makefile Search Order --------------------- Normal -M flag ------ ------- ./Makefile ./makefile ./makefile ./Makefile Dependency operators -------------------- : Set dependency for target to source. Can accumulate over multiple lines. ! Same as : except always done. :: Same as : except cannot accumulate. Target can be specified more than once but each time is separate. Variable definitions -------------------- = Set to . += Append to . ?= Reassign to if exists. := Set to expanded . != Execute and set to stdout. Predefined local variables -------------------------- .TARGET ($@) Name of the target. If an archive, includes the path to the file which will be archived. .OODATE ($?) List of sources that were out of date. .ALLSRC ($>) List of all sources for this target. .PREFIX ($*) File portion of the current file being processed. .IMPSRC ($<) Implied source file for this target (if none provided). .ARCHIVE ($%) The path to the archive file. .MEMBER ($!) The actual member name. $(@F) File portion of target file. $(F) File portion of all sources for this target. $(*F) File portion of current file being processed. $(%F) File portion of archive file. $(@D) Directory portion of target file. $(D) Directory portion of all sources for this target. $(*D) Directory portion of the current file being processed. $(%D) Directory portion of archive file. Predefined variables -------------------- .PMAKE Set to name by which pmake was invoked. MAKE Set to name by which pmake was invoked. .MAKEFLAGS Set to flags passed to pmake. MFLAGS Set to flags passed to pmake. Environment variables (always included) --------------------- PMAKE Set to flags to be used by pmake. Variable expansion $([:[:]]) ------------------ M Select only words containing pattern. * 0 or more characters of any sort. ? Any single character. [abcd] Any single character a, b, c or d. [a-z] Any single lower case character. N Same as M except selects all other words except those containing the pattern. S///[g] Replaces with . 'g' does it globally. Can have '^' or '$' to select beginning or ending of word. '&' in represents all of . T Tail of the component. H Head of the component. E Extension of the component. R Root of the component. Special pmake commands ---------------------- #include "" Include from search path internal to pmake. #include <"file"> Include "file" from pmake system directory. include Include from current directory. #if Conditional execution. Can use the following macros: defined must be defined. make .MAIN must be defined. exists must be in .PATH. empty After expansion, is null. #ifdef Conditional execution to test variable definition. #ifndef Conditional execution to test variable non-definition. #ifmake Conditional execution to test if .MAIN defined. #ifnmake Conditional execution to test if .MAIN not defined. #else Follows one of the above #if???. #elif Follows one of the above #if???. #elifdef Follows one of the above #if???. #elifndef Follows one of the above #if???. #elifmake Follows one of the above #if???. #elifnmake Follows one of the above #if???. #endif Follows one of the above #if???. #undef Un-defines a variable. Target attributes : ----------------- .DONTCARE If pmake can't figure out how to create it, pmake doesn't care. .EXEC Always executes the script but is invisible to other targets. .IGNORE Ignore errors from target's commands. .INVISIBLE Does not affect another target's local variables. .JOIN Join's this target's source list to that of all the targets that depend on it. .MAKE Special target to be executed even if -n specified. .NOTMAIN If this is first target, don't assume it is .MAIN. .PRECIOUS Do not delete target if pmake is interrupted. .SILENT Do not echo script. .USE Causes all commands, sources and attributes to be passed to targets that depend on this target. .EXPORT Not used. .EXPORTSAME Not used. .NOEXPORT Not used. Special targets --------------- .BEGIN Performed first. .DEFAULT Performed if pmake can't figure out how to make a particular target. .END Performed last. .IGNORE Defines all targets that are to ignore errors. .INCLUDES Lists suffixes that are to be searched for in .PATH. .INTERRUPT Performed if pmake is interrupted. .LIBS Lists suffixes that are to be searched for in .LIBS. .MAIN Defines target to be used if no .MAIN defined. .MAKEFLAGS Default flags to be used by pmake. .NULL Lists suffixes to assume if none present on a file. .PATH Lists directories to search for files in. .PATH Lists directories to search for files with the given suffix in. .PRECIOUS Sets the .PRECIOUS attribute to each of the sources given. .RECURSIVE Applies the .MAKE attribute to all of its sources. .SHELL Defines the shell to use by pmake. Sources have the following format: path= Path of shell. name= Name of shell. quiet= Command to send shell to make it not echo commands. echo= Command to send shell to make it echo commands. filter= Text of echo-off command to be filtered from printing. echoFlag=Flag to use to enable echoing of commands by the shell (-x). errFlag= Flag to use to turn error checking on in the shell (-e). check= Command to send shell to turn on error checking. ignore= Command to send shell to turn off error checking. hasErrCtl=Indicates whether the shell even has error checking. .SILENT Applies the .SILENT attribute to each of its sources. .SUFFIXES Defines the suffixes that pmake should recognize. Any of the attributes listed above can be given in this form to set the attribute for the sources listed. .EXPORT Ignored. Files of interest ----------------- /usr/include/make/system.mk Built-in rules. /usr/include/make/makelib.mk .USE target for making archives. /usr/include/make/makelint.mk .USE target for makeing lint libs.