home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-07-26 | 38.9 KB | 1,051 lines |
- Newsgroups: comp.sources.misc
- subject: v14i019: dmake version 3.5 part 9/21
- From: dvadura@watdragon.waterloo.edu (Dennis Vadura)
- Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
-
- Posting-number: Volume 14, Issue 19
- Submitted-by: dvadura@watdragon.waterloo.edu (Dennis Vadura)
- Archive-name: dmake/part09
-
- #!/bin/sh
- # this is part 9 of a multipart archive
- # do not concatenate these parts, unpack them in order with /bin/sh
- # file man/dmake.tf continued
- #
- CurArch=9
- if test ! -r s2_seq_.tmp
- then echo "Please unpack part 1 first!"
- exit 1; fi
- ( read Scheck
- if test "$Scheck" != $CurArch
- then echo "Please unpack part $Scheck next!"
- exit 1;
- else exit 0; fi
- ) < s2_seq_.tmp || exit 1
- echo "x - Continuing file man/dmake.tf"
- sed 's/^X//' << 'SHAR_EOF' >> man/dmake.tf
- Xcontaining a collection of object files.
- XThus to make a library you simply specify it as a target with the .LIBRARY
- Xattribute set and specify its list of prerequisites. The prerequisites should
- Xbe the object members that are to go into the library. When
- X.B dmake
- Xmakes the library target it uses the .LIBRARY attribute to pass to the
- Xprerequisites the .LIBMEMBER attribute and the name of the library. This
- Xenables the file binding mechanism to look for the member in the library if an
- Xappropriate object file cannot be found. A small example best illustrates
- Xthis.
- X.RS
- X.nf
- X.sp
- Xmylib.a .LIBRARY : mem1.o mem2.o mem3.o
- X\trules for making library...
- X\t# remember to remove .o's when lib is made
- X.sp
- X# equivalent to: '%.o : %.c ; ...'
- X\&.c.o :; rules for making .o from .c say
- X.sp
- X.fi
- X.RE
- X.B dmake
- Xwill use the .c.o rule for making the library members if appropriate .c files
- Xcan be found using the search rules. NOTE: this is not specific in any way
- Xto C programs, they are simply used as an example.
- X.PP
- X.B dmake
- Xtries to handle the old library construct format in a sensible way.
- XThe construct
- X.I lib(member.o)
- Xis separated and the \fIlib\fP portion is declared
- Xas a library target.
- XThe new target is defined
- Xwith the .LIBRARY attribute set and the \fImember.o\fP portion of the
- Xconstruct is
- Xdeclared as a prerequisite of the lib target.
- XIf the construct \fIlib(member.o)\fP
- Xappears as a prerequisite of a target in the
- Xmakefile, that target has the new name of the lib assigned as it's
- Xprerequisite. Thus the following example:
- X.RS
- X.sp
- X.nf
- Xa.out : ml.a(a.o) ml.a(b.o); $(CC) -o $@ $<
- X
- X\&.c.o :; $(CC) -c $(CFLAGS) -o $@ $<
- X%.a:
- X\tar rv $@ $<
- X\tranlib $@
- X\trm -rf $<
- X.sp
- X.fi
- X.RE
- Xconstructs the following dependency
- Xgraph.
- X.RS
- X.sp
- X.nf
- Xa.out : ml.a; $(CC) -o $@ $<
- Xml.a .LIBRARY : a.o b.o
- X
- X%.o : %.c ; $(CC) -c $(CFLAGS) -o $@ $<
- X%.a :
- X\tar rv $@ $<
- X\tranlib $@
- X\trm -rf $<
- X.sp
- X.fi
- X.RE
- Xand making a.out then works as expected.
- X.PP
- XThe same thing happens for any target of the form \fIlib((entry))\fP.
- XThese targets have an
- Xadditional feature in that the \fIentry\fP target has the .SYMBOL attribute
- Xset automatically.
- X.PP
- XNOTE: If the notion of entry points is supported by the archive and by
- X\fBdmake\fP (currently not the case) then
- X.B dmake
- Xwill search the archive for the entry point and return not only the
- Xmodification time of the member which defines the entry but also the name of
- Xthe member file. This name will then replace \fIentry\fP and will be used for
- Xmaking the member file. Once bound to an archive member the .SYMBOL
- Xattribute is removed from the target.
- XThis feature is presently disabled as there is little standardization
- Xamong archive formats, and we have yet to find a makefile utilizing this
- Xfeature (possibly due to the fact that it is unimplemented in most versions
- Xof UNIX Make).
- X.SH "MULTI PROCESSING"
- XIf the architecture supports it then \fBdmake\fP is capable of making a target's
- Xprerequisites in parallel. \fBdmake\fP will make as much in parallel as it
- Xcan and use a number of child processes up to the maximum specified by
- XMAXPROCESS or by the value supplied to the -P command line flag.
- XA parallel make is enabled by setting the value of MAXPROCESS (either directly
- Xor via -P option) to a value which is > 1.
- X\fBdmake\fP guarantees that all dependencies as specified in the makefile are
- Xhonored. A target will not be made until all of its prerequisites have been
- Xmade.
- XIf a parallel make is being performed then the following restrictions on
- Xparallelism are enforced.
- X.RS
- X.IP 1.
- XIndividual recipe lines in a non-group recipe are performed sequentially in
- Xthe order in which they are specified within the makefile and in parallel with
- Xthe recipes of other targets.
- X.IP 2.
- XIf a target contains multiple recipe definitions (cf. :: rules) then these are
- Xperformed sequentially in the order in which the :: rules are specified within
- Xthe makefile and in parallel with the recipes of other targets.
- X.IP 3.
- XIf a target rule contains the `!' modifier, then the recipe is performed
- Xsequentially for the list of outdated prerequisites and in parallel with the
- Xrecipes of other targets.
- X.IP 4.
- XIf a target has the .SEQUENTIAL attribute set then all of its prerequisites
- Xare made sequentially relative to one another (as if MAXPROCESS=1), but in
- Xparallel with other targets in the makefile.
- X.RE
- X.PP
- XNote: If you specify a parallel make then
- Xthe order of target update and the order in which the associated recipes are
- Xinvoked will not correspond to that displayed by the -n flag.
- X.SH "CONDITIONALS"
- X.B dmake
- Xsupports a makefile construct called a \fIconditional\fR. It allows
- Xthe user
- Xto conditionally select portions of makefile text for input processing
- Xand to discard other portions. This becomes useful for
- Xwriting makefiles that are intended to function for more than one target
- Xhost and environment. The conditional expression is specified as follows:
- X.sp
- X.RS
- X.nf
- X\&.IF \fIexpression\fR
- X ... if text ...
- X\&.ELSE
- X ... else text ...
- X\&.END
- X.RE
- X.fi
- X.sp
- XThe .ELSE portion is optional, and the conditionals may be nested (ie.
- Xthe text may contain another conditional).
- X\&.IF, .ELSE, and .END
- Xmay appear anywhere in the makefile, but a single conditional expression
- Xmay not span multiple makefiles.
- X.PP
- X\fIexpression\fR can be one of the following three forms:
- X.sp
- X\t<text> | <text> == <text> | <text> != <text>
- X.sp
- Xwhere \fItext\fR is either text or a macro expression. In any case,
- Xbefore the comparison is made, the expression is expanded. The text
- Xportions are then selected and compared. White space at the start and
- Xend of the text portion is discarded before the comparison. This means
- Xthat a macro that evaluates to nothing but white space is considered a
- XNULL value for the purpose of the comparison.
- XIn the first case the expression evaluates TRUE if the text is not NULL
- Xotherwise it evaluates FALSE. The remaining two cases both evaluate the
- Xexpression on the basis of a string comparison.
- XIf a macro expression needs to be equated to a NULL string then compare it to
- Xthe value of the macro $(NULL).
- X.SH "EXAMPLES"
- X.RS
- X.nf
- X.sp
- X# A simple example showing how to use make
- X#
- Xprgm : a.o b.o
- X cc a.o b.o -o prgm
- Xa.o : a.c g.h
- X cc a.c -o $@
- Xb.o : b.c g.h
- X cc b.c -o $@
- X.fi
- X.RE
- X.sp
- XIn the previous
- Xexample prgm is remade only if a.o and/or b.o is out of date with
- Xrespect to prgm.
- XThese dependencies can be stated more concisely
- Xby using the inference rules defined in the standard startup file.
- XThe default rule for making .o's from .c's looks something like this:
- X.sp
- X\&\t%.o : %.c; cc -c $(CFLAGS) -o $@ $<
- X.sp
- XSince there exists a rule (defined in the startup file)
- Xfor making .o's from .c's
- X\fBdmake\fR will use that rule
- Xfor manufacturing a .o from a .c and we can specify our dependencies
- Xmore concisely.
- X.sp
- X.RS
- X.nf
- Xprgm : a.o b.o
- X cc -o prgm $<
- Xa.o b.o : g.h
- X.fi
- X.RE
- X.sp
- XA more general way to say the above using the new macro expansions
- Xwould be:
- X.sp
- X.RS
- X.nf
- XSRC = a b
- XOBJ = {$(SRC)}.o
- X.sp
- Xprgm : $(OBJ)
- X cc -o $@ $<
- X.sp
- X$(OBJ) : g.h
- X.fi
- X.RE
- X.sp
- XIf we want to keep the objects in a separate directory, called
- Xobjdir, then we would write
- Xsomething like this.
- X.sp
- X.RS
- X.nf
- XSRC = a b
- XOBJ = {$(SRC)}.o
- X.sp
- Xprgm : $(OBJ)
- X cc $< -o $@
- X.sp
- X$(OBJ) : g.h
- X\&%.o : %.c
- X $(CC) -c $(CFLAGS) -o $(@:f) $<
- X mv $(@:f) objdir
- X
- X\&.SOURCE.o : objdir # tell make to look here for .o's
- X.fi
- X.RE
- X.sp
- XAn example of building library members would go something like this:
- X(NOTE: The same rules as above will be used to produce .o's from .c's)
- X.sp
- X.RS
- X.nf
- XSRC\t= a b
- XLIB\t= lib
- XLIBm\t= { $(SRC) }.o
- X.sp
- Xprgm: $(LIB)
- X cc -o $@ $(LIB)
- X.sp
- X$(LIB) .LIBRARY : $(LIBm)
- X ar rv $@ $<
- X rm $<
- X.fi
- X.RE
- X.sp
- XFinally, suppose that each of the source files in the previous example had
- Xthe `:' character in their target name. Then we would write the above example
- Xas:
- X.sp
- X.RS
- X.nf
- XSRC\t= f:a f:b
- XLIB\t= lib
- XLIBm\t= "{ $(SRC) }.o" # put quotes around each token
- X.sp
- Xprgm: $(LIB)
- X cc -o $@ $(LIB)
- X.sp
- X$(LIB) .LIBRARY : $(LIBm)
- X ar rv $@ $<
- X rm $<
- X.fi
- X.RE
- X.SH "COMPATIBILITY"
- XThere are two notable differences between
- X.B \fBdmake\fR
- Xand the standard version of BSD UNIX 4.2/4.3 Make.
- X.RS
- X.IP 1. .3i
- XBSD UNIX 4.2/4.3 Make supports wild card filename expansion for
- Xprerequisite names. Thus if a directory contains a.h, b.h and c.h, then a
- Xline like
- X.sp
- X\ttarget: *.h
- X.sp
- Xwill cause UNIX make to expand the *.h into "a.h b.h c.h". \fBdmake\fR
- Xdoes not support this type of filename expansion.
- X.IP 2. .3i
- XUnlike UNIX make, touching a library member causes \fBdmake\fR
- Xto search the library for the member name and to update the library time stamp.
- XThis is only implemented in the UNIX version.
- XMSDOS and other versions may not have librarians that keep file time stamps,
- Xas a result \fBdmake\fR touches the library file itself, and prints a warning.
- X.RE
- X.PP
- X\fBdmake\fP is not compatible with GNU Make. In particular it does not
- Xunderstand GNU Make's macro expansions that query the file system.
- X.PP
- X.B dmake
- Xis fully compatible with SYSV AUGMAKE, and supports the following AUGMAKE
- Xfeatures:
- X.RS
- X.IP 1. .3i
- XThe word \fBinclude\fP appearing at the start of a line can be used instead of
- Xthe ".INCLUDE :" construct understood by \fBdmake\fP.
- X.IP 2. .3i
- XThe macro modifier expression $(macro:str=sub) is understood and is equivalent
- Xto the expression $(macro:s/str/sub), with the restriction that str must match
- Xthe following regular expression:
- X.sp
- X\tstr[ |\\t][ |\\t]*
- X.sp
- X(ie. str only matches at the end of a token where str is a suffix and is
- Xterminated by a space, a tab, or end of line)
- X.IP 3.
- XThe macro % is defined to be $@ (ie. $% expands to the same value as $@).
- X.IP 4.
- XThe AUGMAKE notion of libraries is handled correctly.
- X.IP 5.
- XWhen defining special targets for the inference rules and the AUGMAKE special
- Xtarget mapping is enabled then the special target
- X\&.X is equivalent to the %-rule "% : %.X".
- X.RE
- X.SH "LIMITS"
- XIn some environments the length of an argument string is restricted.
- X(e.g. MSDOS command line arguments cannot be longer than 128 bytes if you are
- Xusing the standard command.com command interpreter as your shell,
- X.B dmake
- Xtext diversions may help in these situations.)
- X.SH "PORTABILITY"
- XTo write makefiles that can be moved from one environment to another requires
- Xsome forethought. In particular you must define as macros all those things
- Xthat may be different in the new environment.
- X.B dmake
- Xhas two facilities that help to support writing portable makefiles, recursive
- Xmacros and conditional expressions. The recursive macros, allow one to define
- Xenvironment configurations that allow different environments for similar types
- Xof operating systems. For example the same make script can be used for SYSV and
- XBSD but with different macro definitions.
- X.PP
- XTo write a makefile that is portable between UNIX and MSDOS requires both
- Xfeatures since in almost all cases you will need to define new recipes for
- Xmaking targets. The recipes will probably be quite different since the
- Xcapabilities of the tools on each machine are different. Different
- Xmacros will be needed to help handle the smaller differences in the two
- Xenvironments.
- X.PP
- XNOTE: Unlike UNIX, MSDOS \fBdoes\fP maintain cd requests
- Xcross single recipe lines.
- XThis is not portable, and your makefiles will not work the same way if you
- Xdepend on it. Use the .IF ... .ELSE ... .END conditionals to supply different
- Xmake scripts as necessary.
- X.SH FILES
- XMakefile, makefile, startup.mk (use dmake -V to tell you where the startup
- Xfile is)
- X.SH "SEE ALSO"
- Xsh(1), csh(1), touch(1), f77(1), pc(1), cc(1)
- X.br
- XS.I. Feldman \fIMake - A Program for Maintaining Computer Programs\fP
- X.SH "AUTHOR"
- XDennis Vadura, CS Dept. University of Waterloo. dvadura@watdragon.uwaterloo.ca
- X.br
- XMany thanks to Carl Seger for his helpful suggestions,
- Xand to Trevor John Thompson for his many excellent ideas and
- Xinformative bug reports.
- X.SH BUGS
- XSome system commands return non-zero status inappropriately.
- XUse
- X.B \-i
- X(`\-' within the makefile) to overcome the difficulty.
- X.PP
- XSome systems do not have easily accessible
- Xtime stamps for library members (MSDOS, AMIGA, etc)
- Xfor these \fBdmake\fR uses the time stamp of the library instead and prints
- Xa warning the first time it does so. This is almost always ok, except when
- Xmultiple makefiles update a single library file. In these instances it is
- Xpossible to miss an update if one is not careful.
- SHAR_EOF
- echo "File man/dmake.tf is complete"
- chmod 0640 man/dmake.tf || echo "restore of man/dmake.tf fails"
- echo "x - extracting man/dmake.p (Text)"
- sed 's/^X//' << 'SHAR_EOF' > man/dmake.p &&
- X
- X
- X
- X
- XDMAKE(p) Unsupported Software DMAKE(p)
- X
- X
- X
- XNNAAMMEE
- X ddmmaakkee - maintain program groups, or interdependent files
- X
- XSSYYNNOOPPSSIISS
- X ddmmaakkee [-AeEhiknpqersStTuvVx] [-P#] [macro[+][:]=_v_a_l_u_e] [-f
- X file] [target ...]
- X
- XDDEESSCCRRIIPPTTIIOONN
- X ddmmaakkee executes commands found in an external file called a
- X _m_a_k_e_f_i_l_e to update one or more target names. Each target
- X may depend on zero or more prerequisite targets. If any of
- X the target's prerequisites is newer than the target or if
- X the target itself does not exist, then ddmmaakkee will attempt to
- X make the target.
- X
- X If no --ff command line option is present then ddmmaakkee searches
- X for an existing _m_a_k_e_f_i_l_e from the list of prerequisites
- X specified for the special target _._M_A_K_E_F_I_L_E_S (see the STARTUP
- X section for more details). If "-" is the name of the file
- X specified to the --ff flag then ddmmaakkee uses standard input as
- X the source of the makefile text.
- X
- X Any macro definitions (arguments with embedded "=" signs)
- X that appear on the command line are processed first and
- X supersede definitions for macros of the same name found
- X within the makefile. It is impossible for definitions found
- X inside the makefile to redefine any macro defined on the
- X command line.
- X
- X If no _t_a_r_g_e_t names are specified on the command line, then
- X ddmmaakkee uses the first non-special target found in the
- X makefile as the default target. See the SSPPEECCIIAALL TTAARRGGEETTSS
- X section for the list of special targets and their function.
- X ddmmaakkee is a re-implementation of the UNIX Make utility with
- X significant enhancements. Makefiles written for most previ-
- X ous versions of _m_a_k_e will be handled correctly by ddmmaakkee..
- X Known differences between ddmmaakkee and other versions of make
- X are discussed in the CCOOMMPPAATTIIBBIILLIITTYY section found at the end
- X of this document.
- X
- XOOPPTTIIOONNSS
- X --AA Enable AUGMAKE special inference rule transformations
- X (see the "PERCENT(%) RULES" section), these are set to
- X off by default.
- X
- X --ee Read the environment and define all strings of the form
- X 'EENNVV--VVAARR=_e_v_a_l_u_e' defined within as macros whose name is
- X EENNVV--VVAARR, and whose value is '_e_v_a_l_u_e'. The environment
- X is processed prior to processing the user specified
- X makefile thereby allowing definitions in the makefile
- X to override definitions in the environment.
- X
- X
- X
- X
- XVersion 3.50 UW 1
- X
- X
- X
- X
- XDMAKE(p) Unsupported Software DMAKE(p)
- X
- X
- X
- X --EE Same as -e, except that the environment is processed
- X after the user specified makefile has been processed
- X (thus definitions in the environment override defini-
- X tions in the makefile). The -e and -E options are
- X mutually exclusive. If both are given the latter one
- X takes effect.
- X
- X --ff ffiillee
- X Use ffiillee as the source for the makefile text. Only one
- X --ff option is allowed.
- X
- X --hh Print the command summary for ddmmaakkee.
- X
- X --ii Tells ddmmaakkee to ignore errors, and continue making other
- X targets. This is equivalent to the .IGNORE attribute
- X or macro.
- X
- X --kk Causes ddmmaakkee to ignore errors caused by command execu-
- X tion and to make all targets not depending on targets
- X that could not be made. Ordinarily ddmmaakkee stops after a
- X command returns a non-zero status, specifying --kk causes
- X ddmmaakkee to ignore the error and continue to make as much
- X as possible.
- X
- X --nn Causes ddmmaakkee to print out what it would have executed,
- X but does not actually execute the commands. A special
- X check is made for the string "$(MAKE)" inside a recipe
- X line, if found, the line is expanded and invoked,
- X thereby enabling recursive makes to give a full
- X description of all that they will do. The check for
- X "$(MAKE)" is disabled inside group recipes.
- X
- X --pp Print out a version of the digested makefile in human
- X readable form. (useful for debugging, but cannot be
- X re-read by ddmmaakkee)
- X
- X --PP## On systems that support multi-processing cause ddmmaakkee to
- X use _# concurrent child processes to make targets. See
- X the "MULTI PROCESSING" section for more information.
- X
- X --qq Check and see if the target is up to date. Exits with
- X code 0 if up to date, 1 otherwise.
- X
- X --rr Tells ddmmaakkee not to read the initial startup makefile,
- X see STARTUP section for more details.
- X
- X --ss Tells ddmmaakkee to do all its work silently and not echo
- X the commands it is executing to stdout (also suppresses
- X warnings). This is equivalent to the .SILENT attri-
- X bute or macro.
- X
- X
- X
- X
- X
- XVersion 3.50 UW 2
- X
- X
- X
- X
- XDMAKE(p) Unsupported Software DMAKE(p)
- X
- X
- X
- X --SS Force sequential execution of recipes on architectures
- X which support concurrent makes. For backward compati-
- X bility with old makefiles that have nasty side-effect
- X prerequisite dependencies.
- X
- X --tt Causes ddmmaakkee to touch the targets and bring them up to
- X date without executing any commands.
- X
- X --TT Tells ddmmaakkee to not perform transitive closure on the
- X inference graph.
- X
- X --uu Force an unconditional update. (ie. do everything that
- X would be done if everything that a target depended on
- X was out of date)
- X
- X --vv Verbose flag, when making targets print to stdout what
- X we are going to make and what we think it's timestamp
- X is.
- X
- X --VV Print the version of ddmmaakkee, and values of builtin mac-
- X ros.
- X
- X --xx Upon processing the user makefile export all non-
- X internally defined macros to the user's environment.
- X This option together with the -e option allows SYSV
- X AUGMAKE recursive makes to function as expected.
- X
- XIINNDDEEXX
- X Here is a list of the sections that follow and a short
- X description of each. Perhaps you won't have to read the
- X whole man page to find what you need.
- X
- X SSTTAARRTTUUPP Describes ddmmaakkee initialization.
- X
- X SSYYNNTTAAXX Describes the syntax of makefile expres-
- X sions.
- X
- X AATTTTRRIIBBUUTTEESS Describes the notion of attributes and
- X how they are used when making targets.
- X
- X MMAACCRROOSS Defining and expanding macros.
- X
- X RRUULLEESS AANNDD TTAARRGGEETTSS How to define targets and their prere-
- X quisites.
- X
- X RREECCIIPPEESS How to tell ddmmaakkee how to make a target.
- X
- X TTEEXXTT DDIIVVEERRSSIIOONNSS How to use text diversions for long argu-
- X ment lists in recipes.
- X
- X SSPPEECCIIAALL TTAARRGGEETTSS Some targets are special.
- X
- X
- X
- X
- XVersion 3.50 UW 3
- X
- X
- X
- X
- XDMAKE(p) Unsupported Software DMAKE(p)
- X
- X
- X
- X SSPPEECCIIAALL MMAACCRROOSS Macros used by ddmmaakkee to alter the pro-
- X cessing of the makefile, and those
- X defined by ddmmaakkee for the user.
- X
- X DDYYNNAAMMIICC PPRREERREEQQUUIISSIITTEESS
- X Processing of prerequisites which contain
- X macro expansions in their name.
- X
- X BBIINNDDIINNGG TTAARRGGEETTSS The rules that ddmmaakkee uses to bind a tar-
- X get to an existing file in the file sys-
- X tem.
- X
- X PPEERRCCEENNTT((%%)) RRUULLEESS Specification of recipes to be used by
- X the inference algorithm.
- X
- X MMAAKKIINNGG IINNFFEERREENNCCEESS The rules that ddmmaakkee uses when inferring
- X how to make a target which had no expli-
- X cit recipe. This and the previous sec-
- X tion are really a single section in the
- X text below.
- X
- X MMAAKKIINNGG TTAARRGGEETTSS How ddmmaakkee makes targets other than
- X libraries.
- X
- X MMAAKKIINNGG LLIIBBRRAARRIIEESS How ddmmaakkee makes libraries.
- X
- X MMUULLTTII PPRROOCCEESSSSIINNGG Discussion of ddmmaakkee''ss parallel make
- X facilities for architectures that support
- X them.
- X
- X CCOONNDDIITTIIOONNAALLSS Conditional expressions which control the
- X processing of the makefile.
- X
- X EEXXAAMMPPLLEESS Some hopefully useful examples.
- X
- X CCOOMMPPAATTIIBBIILLIITTYY How ddmmaakkee compares with previous versions
- X of make.
- X
- X LLIIMMIITTSS Limitations of ddmmaakkee.
- X
- X PPOORRTTAABBIILLIITTYY Comments on writing portable makefiles.
- X
- X FFIILLEESS Files used by ddmmaakkee.
- X
- X SSEEEE AALLSSOO Other related programs, and man pages.
- X
- X AAUUTTHHOORR The guy responsible for this thing.
- X
- X BBUUGGSS Hope not.
- X
- X
- X
- X
- X
- X
- XVersion 3.50 UW 4
- X
- X
- X
- X
- XDMAKE(p) Unsupported Software DMAKE(p)
- X
- X
- X
- XSSTTAARRTTUUPP
- X When ddmmaakkee begins execution it first processes the command
- X line and then it processes an initial startup-makefile.
- X This is followed by an attempt to locate and process a user
- X supplied makefile. The startup file defines the default
- X values of all required control macros and the set of default
- X rules for making inferences. When searching for the startup
- X makefile, ddmmaakkee searches the following locations, in order,
- X until a startup file is located:
- X
- X 1. The location given as the value of the macro MAK-
- X ESTARTUP defined on the command line.
- X
- X 2. The location given as the value of the environment
- X variable MAKESTARTUP defined in the current
- X environment.
- X
- X 3. The location given as the value of the macro MAK-
- X ESTARTUP defined internally within ddmmaakkee.
- X
- X The above search is disabled by specifying the -r option on
- X the command line. An error is issued if a startup makefile
- X cannot be found and the -r option was not specified. A user
- X may substitute a custom startup file by defining the MAKES-
- X TARTUP environment variable or by redefining the MAKESTARTUP
- X macro on the command line. To find out where ddmmaakkee looks
- X for the default startup file, check your environment or
- X issue the command _"_d_m_a_k_e _-_V_" to determine the builtin value
- X of MAKESTARTUP.
- X
- X A similar search is performed to locate a default user
- X makefile when no --ff command line option is specified. The
- X special target .MAKEFILES is internally defined by default.
- X This target's prerequisite list specifies the names of files
- X and the order that ddmmaakkee will use to search for them when
- X attempting to locate the default makefile. A typical defin-
- X ition for this target is:
- X
- X .MAKEFILES : makefile.mk Makefile makefile
- X
- X ddmmaakkee will first look for makefile.mk and then the others.
- X If a prerequisite cannot be found ddmmaakkee will try to make it
- X before going on to the next prerequisite. For example,
- X makefile.mk can be checked out of an RCS file if the proper
- X rules for doing so are defined in the startup file.
- X
- XSSYYNNTTAAXX
- X This section is a summary of the syntax of makefile state-
- X ments. The description is given in a style similar to BNF,
- X where { } enclose items that may appear zero or more times,
- X and [ ] enclose items that are optional. Alternative pro-
- X ductions for a left hand side are indicated by '->', and
- X
- X
- X
- XVersion 3.50 UW 5
- X
- X
- X
- X
- XDMAKE(p) Unsupported Software DMAKE(p)
- X
- X
- X
- X newlines are significant. All symbols in bboolldd type are text
- X or names representing text supplied by the user.
- X
- X
- X
- X Makefile -> { Statement }
- X
- X Statement -> Macro-Definition
- X -> Conditional
- X -> Rule-Definition
- X -> Attribute-Definition
- X
- X Macro-Definition -> MMAACCRROO == LLIINNEE
- X -> MMAACCRROO ::== LLIINNEE
- X -> MMAACCRROO ++== LLIINNEE
- X -> MMAACCRROO ++::== LLIINNEE
- X
- X Conditional -> ..IIFF expression
- X Makefile
- X [ ..EELLSSEE
- X Makefile ]
- X ..EENNDD
- X
- X expression -> LLIINNEE
- X -> SSTTRRIINNGG ==== LLIINNEE
- X -> SSTTRRIINNGG !!== LLIINNEE
- X
- X
- X Rule-Definition -> target-definition
- X [ recipe ]
- X
- X target-definition -> targets [attrs] op { PPRREERREEQQUUIISSIITTEE } [;; rcp-line]
- X
- X targets -> target { targets }
- X -> ""target"" { targets }
- X
- X target -> special-target
- X -> TTAARRGGEETT
- X
- X attrs -> attribute { attrs }
- X -> ""attribute"" { attrs }
- X
- X op -> :: { modifier }
- X
- X modifier -> ::
- X -> ^^
- X -> !!
- X -> --
- X
- X recipe -> { TTAABB rcp-line }
- X -> [@@][--] [[
- X { LLIINNEE }
- X
- X
- X
- XVersion 3.50 UW 6
- X
- X
- X
- X
- XDMAKE(p) Unsupported Software DMAKE(p)
- X
- X
- X
- X ]]
- X
- X rcp-line -> [@@][--] LLIINNEE
- X
- X
- X Attribute-Definition -> attrs :: targets
- X
- X
- X attribute -> ..EEPPIILLOOGG
- X -> ..IIGGNNOORREE
- X -> ..LLIIBBRRAARRYY
- X -> ..NNOOIINNFFEERR
- X -> ..PPRREECCIIOOUUSS
- X -> ..PPRROOLLOOGG
- X -> ..SSEETTDDIIRR==_p_a_t_h
- X -> ..SSIILLEENNTT
- X -> ..SSEEQQUUEENNTTIIAALL
- X -> ..SSYYMMBBOOLL
- X -> ..UUPPDDAATTEEAALLLL
- X
- X special-target -> ..EERRRROORR
- X -> ..EEXXPPOORRTT
- X -> ..GGRROOUUPPEEPPIILLOOGG
- X -> ..GGRROOUUPPPPRROOLLOOGG
- X -> ..IIMMPPOORRTT
- X -> ..IINNCCLLUUDDEE
- X -> ..IINNCCLLUUDDEEDDIIRRSS
- X -> ..MMAAKKEEFFIILLEESS
- X -> ..RREEMMOOVVEE
- X -> ..SSOOUURRCCEE
- X -> ..SSOOUURRCCEE.._s_u_f_f_i_x
- X -> ._s_u_f_f_i_x_1._s_u_f_f_i_x_2
- X
- X
- X Where, TTAABB represents a <tab> character, SSTTRRIINNGG represents
- X an arbitrary sequence of characters, and LLIINNEE represents a
- X possibly empty sequence of characters terminated by a non-
- X escaped (not immediately preceded by a backslash '\') new-
- X line character. MMAACCRROO, PPRREERREEQQUUIISSIITTEE, and TTAARRGGEETT each
- X represent a string of characters not including space or tab
- X which respectively form the name of a macro, prerequisite or
- X target. The name may itself be a macro expansion expres-
- X sion. A LLIINNEE can be continued over several physical lines
- X by terminating it with a single backslash character. Com-
- X ments are initiated by the pound '##' character and extend to
- X the end of line. All comment text is discarded, a '#' may
- X be placed into the makefile text by escaping it with '\'
- X (ie. \# translates to # when it is parsed). A group of con-
- X tinued lines may be commented out by placing a single # at
- X the start of the first line of the group. A continued line
- X may not span more than one makefile.
- X
- X
- X
- X
- XVersion 3.50 UW 7
- X
- X
- X
- X
- XDMAKE(p) Unsupported Software DMAKE(p)
- X
- X
- X
- X wwhhiittee ssppaaccee is defined to be any combination of <space>,
- X <tab>, and the sequence \<nl> when \<nl> is used to ter-
- X minate a LINE. When processing mmaaccrroo definition lines, any
- X amount of white space is allowed on either side of the macro
- X operator (=, :=, += or +:=), and white space is stripped
- X from both before and after the macro value string. The
- X sequence \<nl> is treated as white space during recipe
- X expansion and is deleted from the final recipe string. You
- X must escape the \<nl> with a \ in order to get a \<nl> at
- X the end of a recipe line. The \<nl> sequence is always
- X deleted from macro values.
- X
- X When processing ttaarrggeett definition lines, the recipe for a
- X target must, in general, follow the first definition of the
- X target (See the RULES AND TARGETS section for an exception),
- X and the recipe may not span across multiple makefiles. Any
- X targets and prerequisites found on a target definition line
- X are taken to be white space separated tokens. The rule
- X operator (_o_p in SYNTAX section) is also considered to be a
- X token but does not require white space to precede or follow
- X it. Since the rule operator begins with a `:', traditional
- X versions of make do not allow the `:' character to form a
- X valid target name. ddmmaakkee allows `:' to be present in
- X target/prerequisite names as long as the entire
- X target/prerequisite name is quoted. For example:
- X
- X a:fred : test
- X
- X would be parsed as TARGET = a, PREREQUISITES are fred, :,
- X and test, which is not what was intended. To fix this you
- X must write:
- X
- X "a:fred" : test
- X
- X Which will be parsed as expected. See the EXAMPLES section
- X for how to apply this to a list of targets.
- X
- XAATTTTRRIIBBUUTTEESS
- X ddmmaakkee defines several target attributes. Attributes may be
- X assigned to a single target, a group of targets, or to all
- X targets in the makefile. Attributes are used to modify
- X ddmmaakkee actions during target update. The recognized attri-
- X butes are:
- X
- X
- X ..EEPPIILLOOGG Insert shell epilog code when executing a group
- X recipe associated with any target having this
- X attribute set.
- X
- X ..IIGGNNOORREE Ignore an error when trying to make any target
- X with this attribute set.
- X
- X
- X
- X
- XVersion 3.50 UW 8
- X
- X
- X
- X
- XDMAKE(p) Unsupported Software DMAKE(p)
- X
- X
- X
- X ..LLIIBBRRAARRYY Target is a library.
- X
- X ..NNOOIINNFFEERR Any target with this attribute set will not be
- X subjected to transitive closure if it is
- X inferred as a prerequisite of a target whose
- X recipe and prerequisites are being inferred.
- X (i.e. the inference search will not use any
- X prerequisite with this attribute set, as a tar-
- X get)
- X
- X ..PPRREECCIIOOUUSS Do not remove this target under any cir-
- X cumstances. Set by default for any targets
- X whose corresponding files exist in the file sys-
- X tem prior to the execution of ddmmaakkee.
- X
- X ..PPRROOLLOOGG Insert shell prolog code when executing a group
- X recipe associated with any target having this
- X attribute set.
- X
- X ..SSEEQQUUEENNTTIIAALL Force a sequential make of the associated
- X target's prerequisites.
- X
- X ..SSEETTDDIIRR Change current working directory to specified
- X directory when making associated target. The
- X syntax of this attribute is different from the
- X others. You must specify the directory at the
- X time the attribute is specified. To do this
- X simply give _._S_E_T_D_I_R_=_p_a_t_h as the attribute. _p_a_t_h
- X is expanded and the result is used as the value
- X of the directory to change to. If path is sur-
- X rounded by single quotes then path is not
- X expanded, and is used literally as the directory
- X name. If the _p_a_t_h contains any `:' characters
- X then the entire attribute string must be quoted
- X using ". If a target having this attribute set
- X also has the .IGNORE attribute set then if the
- X change to the specified directory fails it will
- X be ignored, and no error message will be issued.
- X
- X ..SSIILLEENNTT Do not echo the recipe lines when making any
- X target with this attribute set, and do not issue
- X any warnings.
- X
- X ..SSYYMMBBOOLL Target is a library member and is an entry point
- X into a module in the library. This attribute is
- X used only when searching a library for a target.
- X Targets of the form lib((entry)) have this
- X attribute set automatically.
- X
- X ..UUPPDDAATTEEAALLLL Indicates that all the targets listed in this
- X rule are updated by the execution of the accom-
- X panying recipe. A common example is the
- X
- X
- X
- XVersion 3.50 UW 9
- X
- X
- X
- X
- XDMAKE(p) Unsupported Software DMAKE(p)
- X
- X
- X
- X production of the _y_._t_a_b_._c and _y_._t_a_b_._h files by
- X yyaacccc when it is run on a grammar. Specifying
- X .UPDATEALL in such a rule prevents the running
- X of yacc twice, once for the y.tab.c file and
- X once for the y.tab.h file.
- X
- X
- X All attributes are user setable and may be used in one of
- X two forms (except .UPDATEALL, use of this attribute in a
- X rule of the first form is illegal)
- X
- X ATTRIBUTE_LIST : _t_a_r_g_e_t_s
- X
- X assigns the attributes specified by ATTRIBUTE_LIST to each
- X target in _t_a_r_g_e_t_s or
- X
- X _t_a_r_g_e_t_s ATTRIBUTE_LIST : ...
- X
- X assigns the attributes specified by ATTRIBUTE_LIST to each
- X target in _t_a_r_g_e_t_s_. In the first form if _t_a_r_g_e_t_s is empty
- X (ie. a NULL list), then the list of attributes will apply to
- X all targets in the makefile (this is equivalent to the com-
- X mon Make construct of _"_._I_G_N_O_R_E _:_" but has been modified to
- X the notion of an attribute instead of a special target).
- X Not all of the attributes have global meaning. In particu-
- X lar, .LIBRARY, .SYMBOL, and .UPDATEALL have no assigned glo-
- X bal meaning.
- X
- X Any attribute may be used with any target, even with the
- X special targets. Some combinations are useless (e.g.
- X .INCLUDE .PRECIOUS: ... ), while others are useful (e.g.
- X .INCLUDE .IGNORE : "file.mk" will not complain if file.mk
- X cannot be found using the include file search rules, see the
- X section on SPECIAL TARGETS for a description of .INCLUDE).
- X If a specified attribute will not be used with the special
- X target a warning is issued and the attribute is ignored.
- X
- XMMAACCRROOSS
- X ddmmaakkee supports four types of macro assignment. The first
- X and most familiar is the usual assignment:
- X
- X MACRO = LINE
- X
- X which causes LINE to be assigned without expansion, as the
- X value of MACRO. The second form:
- X
- X MACRO := LINE
- X
- X is new and indicates that LINE should be expanded prior to
- X being assigned as the value of MACRO. Future expansions of
- X MACRO do not have the value expanded since it was expanded
- X when the macro was defined. The third form of macro
- SHAR_EOF
- echo "End of part 9"
- echo "File man/dmake.p is continued in part 10"
- echo "10" > s2_seq_.tmp
- exit 0
-
-