home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume14 / dmake / part09 < prev    next >
Encoding:
Text File  |  1990-07-26  |  38.9 KB  |  1,051 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v14i019: dmake version 3.5 part 9/21
  3. From: dvadura@watdragon.waterloo.edu (Dennis Vadura)
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 14, Issue 19
  7. Submitted-by: dvadura@watdragon.waterloo.edu (Dennis Vadura)
  8. Archive-name: dmake/part09
  9.  
  10. #!/bin/sh
  11. # this is part 9 of a multipart archive
  12. # do not concatenate these parts, unpack them in order with /bin/sh
  13. # file man/dmake.tf continued
  14. #
  15. CurArch=9
  16. if test ! -r s2_seq_.tmp
  17. then echo "Please unpack part 1 first!"
  18.      exit 1; fi
  19. ( read Scheck
  20.   if test "$Scheck" != $CurArch
  21.   then echo "Please unpack part $Scheck next!"
  22.        exit 1;
  23.   else exit 0; fi
  24. ) < s2_seq_.tmp || exit 1
  25. echo "x - Continuing file man/dmake.tf"
  26. sed 's/^X//' << 'SHAR_EOF' >> man/dmake.tf
  27. Xcontaining a collection of object files.
  28. XThus to make a library you simply specify it as a target with the .LIBRARY
  29. Xattribute set and specify its list of prerequisites.  The prerequisites should
  30. Xbe the object members that are to go into the library.  When
  31. X.B dmake
  32. Xmakes the library target it uses the .LIBRARY attribute to pass to the
  33. Xprerequisites the .LIBMEMBER attribute and the name of the library.  This
  34. Xenables the file binding mechanism to look for the member in the library if an
  35. Xappropriate object file cannot be found. A small example best illustrates
  36. Xthis.
  37. X.RS
  38. X.nf
  39. X.sp
  40. Xmylib.a .LIBRARY : mem1.o mem2.o mem3.o
  41. X\trules for making library...
  42. X\t# remember to remove .o's when lib is made
  43. X.sp
  44. X# equivalent to:  '%.o : %.c ; ...'
  45. X\&.c.o :; rules for making .o from .c say
  46. X.sp
  47. X.fi
  48. X.RE
  49. X.B dmake
  50. Xwill use the .c.o rule for making the library members if appropriate .c files
  51. Xcan be found using the search rules.  NOTE:  this is not specific in any way
  52. Xto C programs, they are simply used as an example.
  53. X.PP
  54. X.B dmake
  55. Xtries to handle the old library construct format in a sensible way.
  56. XThe construct 
  57. X.I lib(member.o)
  58. Xis separated and the \fIlib\fP portion is declared
  59. Xas a library target.
  60. XThe new target is defined
  61. Xwith the .LIBRARY attribute set and the \fImember.o\fP portion of the
  62. Xconstruct is
  63. Xdeclared as a prerequisite of the lib target.
  64. XIf the construct \fIlib(member.o)\fP
  65. Xappears as a prerequisite of a target in the
  66. Xmakefile, that target has the new name of the lib assigned as it's
  67. Xprerequisite.  Thus the following example:
  68. X.RS
  69. X.sp
  70. X.nf
  71. Xa.out : ml.a(a.o) ml.a(b.o); $(CC) -o $@  $<
  72. X
  73. X\&.c.o :; $(CC) -c $(CFLAGS) -o $@  $<
  74. X%.a:
  75. X\tar rv $@ $<
  76. X\tranlib $@
  77. X\trm -rf $<
  78. X.sp
  79. X.fi
  80. X.RE
  81. Xconstructs the following dependency
  82. Xgraph.
  83. X.RS
  84. X.sp
  85. X.nf
  86. Xa.out : ml.a; $(CC) -o $@  $<
  87. Xml.a .LIBRARY : a.o b.o
  88. X
  89. X%.o : %.c ; $(CC) -c $(CFLAGS) -o $@  $<
  90. X%.a :
  91. X\tar rv $@ $<
  92. X\tranlib $@
  93. X\trm -rf $<
  94. X.sp
  95. X.fi
  96. X.RE
  97. Xand making a.out then works as expected.
  98. X.PP
  99. XThe same thing happens for any target of the form \fIlib((entry))\fP.
  100. XThese targets have an
  101. Xadditional feature in that the \fIentry\fP target has the .SYMBOL attribute
  102. Xset automatically.
  103. X.PP
  104. XNOTE:  If the notion of entry points is supported by the archive and by
  105. X\fBdmake\fP (currently not the case) then
  106. X.B dmake
  107. Xwill search the archive for the entry point and return not only the
  108. Xmodification time of the member which defines the entry but also the name of
  109. Xthe member file.  This name will then replace \fIentry\fP and will be used for
  110. Xmaking the member file.  Once bound to an archive member the .SYMBOL
  111. Xattribute is removed from the target.
  112. XThis feature is presently disabled as there is little standardization
  113. Xamong archive formats, and we have yet to find a makefile utilizing this
  114. Xfeature (possibly due to the fact that it is unimplemented in most versions
  115. Xof UNIX Make).
  116. X.SH "MULTI PROCESSING"
  117. XIf the architecture supports it then \fBdmake\fP is capable of making a target's
  118. Xprerequisites in parallel.  \fBdmake\fP will make as much in parallel as it
  119. Xcan and use a number of child processes up to the maximum specified by
  120. XMAXPROCESS or by the value supplied to the -P command line flag.
  121. XA parallel make is enabled by setting the value of MAXPROCESS (either directly
  122. Xor via -P option) to a value which is > 1.
  123. X\fBdmake\fP guarantees that all dependencies as specified in the makefile are
  124. Xhonored.  A target will not be made until all of its prerequisites have been
  125. Xmade.
  126. XIf a parallel make is being performed then the following restrictions on
  127. Xparallelism are enforced.
  128. X.RS
  129. X.IP 1.
  130. XIndividual recipe lines in a non-group recipe are performed sequentially in
  131. Xthe order in which they are specified within the makefile and in parallel with
  132. Xthe recipes of other targets.
  133. X.IP 2.
  134. XIf a target contains multiple recipe definitions (cf. :: rules) then these are
  135. Xperformed sequentially in the order in which the :: rules are specified within
  136. Xthe makefile and in parallel with the recipes of other targets.
  137. X.IP 3.
  138. XIf a target rule contains the `!' modifier, then the recipe is performed
  139. Xsequentially for the list of outdated prerequisites and in parallel with the
  140. Xrecipes of other targets.
  141. X.IP 4.
  142. XIf a target has the .SEQUENTIAL attribute set then all of its prerequisites
  143. Xare made sequentially relative to one another (as if MAXPROCESS=1), but in
  144. Xparallel with other targets in the makefile.
  145. X.RE
  146. X.PP
  147. XNote:  If you specify a parallel make then
  148. Xthe order of target update and the order in which the associated recipes are
  149. Xinvoked will not correspond to that displayed by the -n flag.
  150. X.SH "CONDITIONALS"
  151. X.B dmake
  152. Xsupports a makefile construct called a \fIconditional\fR.  It allows
  153. Xthe user
  154. Xto conditionally select portions of makefile text for input processing
  155. Xand to discard other portions.  This becomes useful for
  156. Xwriting makefiles that are intended to function for more than one target
  157. Xhost and environment.  The conditional expression is specified as follows:
  158. X.sp
  159. X.RS
  160. X.nf
  161. X\&.IF  \fIexpression\fR
  162. X   ... if text ...
  163. X\&.ELSE
  164. X   ... else text ...
  165. X\&.END
  166. X.RE
  167. X.fi
  168. X.sp
  169. XThe .ELSE portion is optional, and the conditionals may be nested (ie.
  170. Xthe text may contain another conditional).
  171. X\&.IF, .ELSE, and .END
  172. Xmay appear anywhere in the makefile, but a single conditional expression
  173. Xmay not span multiple makefiles.
  174. X.PP
  175. X\fIexpression\fR can be one of the following three forms:
  176. X.sp
  177. X\t<text> | <text> == <text> | <text> != <text>
  178. X.sp
  179. Xwhere \fItext\fR is either text or a macro expression.  In any case,
  180. Xbefore the comparison is made, the expression is expanded.  The text
  181. Xportions are then selected and compared.  White space at the start and
  182. Xend of the text portion is discarded before the comparison.  This means
  183. Xthat a macro that evaluates to nothing but white space is considered a
  184. XNULL value for the purpose of the comparison.
  185. XIn the first case the expression evaluates TRUE if the text is not NULL
  186. Xotherwise it evaluates FALSE.  The remaining two cases both evaluate the
  187. Xexpression on the basis of a string comparison.
  188. XIf a macro expression needs to be equated to a NULL string then compare it to
  189. Xthe value of the macro $(NULL).
  190. X.SH "EXAMPLES"
  191. X.RS
  192. X.nf
  193. X.sp
  194. X# A simple example showing how to use make
  195. X#
  196. Xprgm : a.o b.o
  197. X    cc a.o b.o -o prgm
  198. Xa.o : a.c g.h
  199. X    cc a.c -o $@
  200. Xb.o : b.c g.h
  201. X    cc b.c -o $@
  202. X.fi
  203. X.RE
  204. X.sp
  205. XIn the previous
  206. Xexample prgm is remade only if a.o and/or b.o is out of date with
  207. Xrespect to prgm.
  208. XThese dependencies can be stated more concisely
  209. Xby using the inference rules defined in the standard startup file.
  210. XThe default rule for making .o's from .c's looks something like this:
  211. X.sp
  212. X\&\t%.o : %.c; cc -c $(CFLAGS) -o $@ $<
  213. X.sp
  214. XSince there exists a rule (defined in the startup file)
  215. Xfor making .o's from .c's
  216. X\fBdmake\fR will use that rule
  217. Xfor manufacturing a .o from a .c and we can specify our dependencies
  218. Xmore concisely.
  219. X.sp
  220. X.RS
  221. X.nf
  222. Xprgm : a.o b.o
  223. X    cc -o prgm $<
  224. Xa.o b.o : g.h
  225. X.fi
  226. X.RE
  227. X.sp
  228. XA more general way to say the above using the new macro expansions
  229. Xwould be:
  230. X.sp
  231. X.RS
  232. X.nf
  233. XSRC = a b
  234. XOBJ = {$(SRC)}.o
  235. X.sp
  236. Xprgm : $(OBJ)
  237. X    cc -o $@ $<
  238. X.sp
  239. X$(OBJ) : g.h
  240. X.fi
  241. X.RE
  242. X.sp
  243. XIf we want to keep the objects in a separate directory, called
  244. Xobjdir, then we would write
  245. Xsomething like this.
  246. X.sp
  247. X.RS
  248. X.nf
  249. XSRC = a b
  250. XOBJ = {$(SRC)}.o
  251. X.sp
  252. Xprgm : $(OBJ)
  253. X    cc $< -o $@
  254. X.sp
  255. X$(OBJ) : g.h
  256. X\&%.o : %.c
  257. X    $(CC) -c $(CFLAGS) -o $(@:f) $<
  258. X    mv $(@:f) objdir
  259. X
  260. X\&.SOURCE.o : objdir        # tell make to look here for .o's
  261. X.fi
  262. X.RE
  263. X.sp
  264. XAn example of building library members would go something like this:
  265. X(NOTE:  The same rules as above will be used to produce .o's from .c's)
  266. X.sp
  267. X.RS
  268. X.nf
  269. XSRC\t= a b
  270. XLIB\t= lib
  271. XLIBm\t= { $(SRC) }.o
  272. X.sp
  273. Xprgm: $(LIB)
  274. X    cc -o $@ $(LIB)
  275. X.sp
  276. X$(LIB) .LIBRARY : $(LIBm)
  277. X    ar rv $@ $<
  278. X    rm $<
  279. X.fi
  280. X.RE
  281. X.sp
  282. XFinally, suppose that each of the source files in the previous example had
  283. Xthe `:' character in their target name.  Then we would write the above example
  284. Xas:
  285. X.sp
  286. X.RS
  287. X.nf
  288. XSRC\t= f:a f:b
  289. XLIB\t= lib
  290. XLIBm\t= "{ $(SRC) }.o"        # put quotes around each token
  291. X.sp
  292. Xprgm: $(LIB)
  293. X    cc -o $@ $(LIB)
  294. X.sp
  295. X$(LIB) .LIBRARY : $(LIBm)
  296. X    ar rv $@ $<
  297. X    rm $<
  298. X.fi
  299. X.RE
  300. X.SH "COMPATIBILITY"
  301. XThere are two notable differences between 
  302. X.B \fBdmake\fR
  303. Xand the standard version of BSD UNIX 4.2/4.3 Make.
  304. X.RS
  305. X.IP 1. .3i
  306. XBSD UNIX 4.2/4.3 Make supports wild card filename expansion for
  307. Xprerequisite names.  Thus if a directory contains a.h, b.h and c.h, then a
  308. Xline like
  309. X.sp
  310. X\ttarget: *.h
  311. X.sp
  312. Xwill cause UNIX make to expand the *.h into "a.h b.h c.h".  \fBdmake\fR
  313. Xdoes not support this type of filename expansion.
  314. X.IP 2. .3i
  315. XUnlike UNIX make, touching a library member causes \fBdmake\fR
  316. Xto search the library for the member name and to update the library time stamp.
  317. XThis is only implemented in the UNIX version.
  318. XMSDOS and other versions may not have librarians that keep file time stamps,
  319. Xas a result \fBdmake\fR touches the library file itself, and prints a warning.
  320. X.RE
  321. X.PP
  322. X\fBdmake\fP is not compatible with GNU Make.  In particular it does not
  323. Xunderstand GNU Make's macro expansions that query the file system.
  324. X.PP
  325. X.B dmake
  326. Xis fully compatible with SYSV AUGMAKE, and supports the following AUGMAKE
  327. Xfeatures:
  328. X.RS
  329. X.IP 1. .3i
  330. XThe word \fBinclude\fP appearing at the start of a line can be used instead of
  331. Xthe ".INCLUDE :" construct understood by \fBdmake\fP.
  332. X.IP 2. .3i
  333. XThe macro modifier expression $(macro:str=sub) is understood and is equivalent
  334. Xto the expression $(macro:s/str/sub), with the restriction that str must match
  335. Xthe following regular expression:
  336. X.sp
  337. X\tstr[ |\\t][ |\\t]*
  338. X.sp
  339. X(ie. str only matches at the end of a token where str is a suffix and is
  340. Xterminated by a space, a tab, or end of line)
  341. X.IP 3.
  342. XThe macro % is defined to be $@ (ie. $% expands to the same value as $@).
  343. X.IP 4.
  344. XThe AUGMAKE notion of libraries is handled correctly.
  345. X.IP 5.
  346. XWhen defining special targets for the inference rules and the AUGMAKE special
  347. Xtarget mapping is enabled then the special target
  348. X\&.X is equivalent to the %-rule "% : %.X".
  349. X.RE
  350. X.SH "LIMITS"
  351. XIn some environments the length of an argument string is restricted.
  352. X(e.g. MSDOS command line arguments cannot be longer than 128 bytes if you are
  353. Xusing the standard command.com command interpreter as your shell,
  354. X.B dmake
  355. Xtext diversions may help in these situations.)
  356. X.SH "PORTABILITY"
  357. XTo write makefiles that can be moved from one environment to another requires
  358. Xsome forethought.  In particular you must define as macros all those things
  359. Xthat may be different in the new environment.
  360. X.B dmake
  361. Xhas two facilities that help to support writing portable makefiles, recursive
  362. Xmacros and conditional expressions.  The recursive macros, allow one to define
  363. Xenvironment configurations that allow different environments for similar types
  364. Xof operating systems.  For example the same make script can be used for SYSV and
  365. XBSD but with different macro definitions.
  366. X.PP
  367. XTo write a makefile that is portable between UNIX and MSDOS requires both
  368. Xfeatures since in almost all cases you will need to define new recipes for
  369. Xmaking targets.  The recipes will probably be quite different since the
  370. Xcapabilities of the tools on each machine are different.  Different
  371. Xmacros will be needed to help handle the smaller differences in the two
  372. Xenvironments.
  373. X.PP
  374. XNOTE:  Unlike UNIX, MSDOS \fBdoes\fP maintain cd requests
  375. Xcross single recipe lines.
  376. XThis is not portable, and your makefiles will not work the same way if you
  377. Xdepend on it.  Use the .IF ... .ELSE ... .END conditionals to supply different
  378. Xmake scripts as necessary.
  379. X.SH FILES
  380. XMakefile, makefile, startup.mk (use dmake -V to tell you where the startup
  381. Xfile is)
  382. X.SH "SEE ALSO"
  383. Xsh(1), csh(1), touch(1), f77(1), pc(1), cc(1)
  384. X.br
  385. XS.I. Feldman  \fIMake - A Program for Maintaining Computer Programs\fP
  386. X.SH "AUTHOR"
  387. XDennis Vadura, CS Dept. University of Waterloo. dvadura@watdragon.uwaterloo.ca
  388. X.br
  389. XMany thanks to Carl Seger for his helpful suggestions,
  390. Xand to Trevor John Thompson for his many excellent ideas and
  391. Xinformative bug reports.
  392. X.SH BUGS
  393. XSome system commands return non-zero status inappropriately.
  394. XUse
  395. X.B \-i
  396. X(`\-' within the makefile) to overcome the difficulty.
  397. X.PP
  398. XSome systems do not have easily accessible
  399. Xtime stamps for library members (MSDOS, AMIGA, etc)
  400. Xfor these \fBdmake\fR uses the time stamp of the library instead and prints
  401. Xa warning the first time it does so.  This is almost always ok, except when
  402. Xmultiple makefiles update a single library file.  In these instances it is
  403. Xpossible to miss an update if one is not careful.
  404. SHAR_EOF
  405. echo "File man/dmake.tf is complete"
  406. chmod 0640 man/dmake.tf || echo "restore of man/dmake.tf fails"
  407. echo "x - extracting man/dmake.p (Text)"
  408. sed 's/^X//' << 'SHAR_EOF' > man/dmake.p &&
  409. X
  410. X
  411. X
  412. X
  413. XDMAKE(p)               Unsupported Software               DMAKE(p)
  414. X
  415. X
  416. X
  417. XNNAAMMEE
  418. X     ddmmaakkee - maintain program groups, or interdependent files
  419. X
  420. XSSYYNNOOPPSSIISS
  421. X     ddmmaakkee [-AeEhiknpqersStTuvVx] [-P#] [macro[+][:]=_v_a_l_u_e] [-f
  422. X     file] [target ...]
  423. X
  424. XDDEESSCCRRIIPPTTIIOONN
  425. X     ddmmaakkee executes commands found in an external file called a
  426. X     _m_a_k_e_f_i_l_e to update one or more target names.  Each target
  427. X     may depend on zero or more prerequisite targets.  If any of
  428. X     the target's prerequisites is newer than the target or if
  429. X     the target itself does not exist, then ddmmaakkee will attempt to
  430. X     make the target.
  431. X
  432. X     If no --ff command line option is present then ddmmaakkee searches
  433. X     for an existing _m_a_k_e_f_i_l_e from the list of prerequisites
  434. X     specified for the special target _._M_A_K_E_F_I_L_E_S (see the STARTUP
  435. X     section for more details).  If "-" is the name of the file
  436. X     specified to the --ff flag then ddmmaakkee uses standard input as
  437. X     the source of the makefile text.
  438. X
  439. X     Any macro definitions (arguments with embedded "=" signs)
  440. X     that appear on the command line are processed first and
  441. X     supersede definitions for macros of the same name found
  442. X     within the makefile.  It is impossible for definitions found
  443. X     inside the makefile to redefine any macro defined on the
  444. X     command line.
  445. X
  446. X     If no _t_a_r_g_e_t names are specified on the command line, then
  447. X     ddmmaakkee uses the first non-special target found in the
  448. X     makefile as the default target.  See the SSPPEECCIIAALL TTAARRGGEETTSS
  449. X     section for the list of special targets and their function.
  450. X     ddmmaakkee is a re-implementation of the UNIX Make utility with
  451. X     significant enhancements.  Makefiles written for most previ-
  452. X     ous versions of _m_a_k_e will be handled correctly by ddmmaakkee..
  453. X     Known differences between ddmmaakkee and other versions of make
  454. X     are discussed in the CCOOMMPPAATTIIBBIILLIITTYY section found at the end
  455. X     of this document.
  456. X
  457. XOOPPTTIIOONNSS
  458. X     --AA   Enable AUGMAKE special inference rule transformations
  459. X          (see the "PERCENT(%) RULES" section), these are set to
  460. X          off by default.
  461. X
  462. X     --ee   Read the environment and define all strings of the form
  463. X          'EENNVV--VVAARR=_e_v_a_l_u_e' defined within as macros whose name is
  464. X          EENNVV--VVAARR, and whose value is '_e_v_a_l_u_e'.  The environment
  465. X          is processed prior to processing the user specified
  466. X          makefile thereby allowing definitions in the makefile
  467. X          to override definitions in the environment.
  468. X
  469. X
  470. X
  471. X
  472. XVersion 3.50                    UW                              1
  473. X
  474. X
  475. X
  476. X
  477. XDMAKE(p)               Unsupported Software               DMAKE(p)
  478. X
  479. X
  480. X
  481. X     --EE   Same as -e, except that the environment is processed
  482. X          after the user specified makefile has been processed
  483. X          (thus definitions in the environment override defini-
  484. X          tions in the makefile).  The -e and -E options are
  485. X          mutually exclusive.  If both are given the latter one
  486. X          takes effect.
  487. X
  488. X     --ff ffiillee
  489. X          Use ffiillee as the source for the makefile text.  Only one
  490. X          --ff option is allowed.
  491. X
  492. X     --hh   Print the command summary for ddmmaakkee.
  493. X
  494. X     --ii   Tells ddmmaakkee to ignore errors, and continue making other
  495. X          targets.  This is equivalent to the .IGNORE attribute
  496. X          or macro.
  497. X
  498. X     --kk   Causes ddmmaakkee to ignore errors caused by command execu-
  499. X          tion and to make all targets not depending on targets
  500. X          that could not be made. Ordinarily ddmmaakkee stops after a
  501. X          command returns a non-zero status, specifying --kk causes
  502. X          ddmmaakkee to ignore the error and continue to make as much
  503. X          as possible.
  504. X
  505. X     --nn   Causes ddmmaakkee to print out what it would have executed,
  506. X          but does not actually execute the commands.  A special
  507. X          check is made for the string "$(MAKE)" inside a recipe
  508. X          line, if found, the line is expanded and invoked,
  509. X          thereby enabling recursive makes to give a full
  510. X          description of all that they will do.  The check for
  511. X          "$(MAKE)" is disabled inside group recipes.
  512. X
  513. X     --pp   Print out a version of the digested makefile in human
  514. X          readable form.  (useful for debugging, but cannot be
  515. X          re-read by ddmmaakkee)
  516. X
  517. X     --PP##  On systems that support multi-processing cause ddmmaakkee to
  518. X          use _# concurrent child processes to make targets.  See
  519. X          the "MULTI PROCESSING" section for more information.
  520. X
  521. X     --qq   Check and see if the target is up to date.  Exits with
  522. X          code 0 if up to date, 1 otherwise.
  523. X
  524. X     --rr   Tells ddmmaakkee not to read the initial startup makefile,
  525. X          see STARTUP section for more details.
  526. X
  527. X     --ss   Tells ddmmaakkee to do all its work silently and not echo
  528. X          the commands it is executing to stdout (also suppresses
  529. X          warnings).  This  is equivalent to the .SILENT attri-
  530. X          bute or macro.
  531. X
  532. X
  533. X
  534. X
  535. X
  536. XVersion 3.50                    UW                              2
  537. X
  538. X
  539. X
  540. X
  541. XDMAKE(p)               Unsupported Software               DMAKE(p)
  542. X
  543. X
  544. X
  545. X     --SS   Force sequential execution of recipes on architectures
  546. X          which support concurrent makes.  For backward compati-
  547. X          bility with old makefiles that have nasty side-effect
  548. X          prerequisite dependencies.
  549. X
  550. X     --tt   Causes ddmmaakkee to touch the targets and bring them up to
  551. X          date without executing any commands.
  552. X
  553. X     --TT   Tells ddmmaakkee to not perform transitive closure on the
  554. X          inference graph.
  555. X
  556. X     --uu   Force an unconditional update.  (ie. do everything that
  557. X          would be done if everything that a target depended on
  558. X          was out of date)
  559. X
  560. X     --vv   Verbose flag, when making targets print to stdout what
  561. X          we are going to make and what we think it's timestamp
  562. X          is.
  563. X
  564. X     --VV   Print the version of ddmmaakkee, and values of builtin mac-
  565. X          ros.
  566. X
  567. X     --xx   Upon processing the user makefile export all non-
  568. X          internally defined macros to the user's environment.
  569. X          This option together with the -e option allows SYSV
  570. X          AUGMAKE recursive makes to function as expected.
  571. X
  572. XIINNDDEEXX
  573. X     Here is a list of the sections that follow and a short
  574. X     description of each.  Perhaps you won't have to read the
  575. X     whole man page to find what you need.
  576. X
  577. X     SSTTAARRTTUUPP            Describes ddmmaakkee initialization.
  578. X
  579. X     SSYYNNTTAAXX             Describes the syntax of makefile expres-
  580. X                        sions.
  581. X
  582. X     AATTTTRRIIBBUUTTEESS         Describes the notion of attributes and
  583. X                        how they are used when making targets.
  584. X
  585. X     MMAACCRROOSS             Defining and expanding macros.
  586. X
  587. X     RRUULLEESS AANNDD TTAARRGGEETTSS  How to define targets and their prere-
  588. X                        quisites.
  589. X
  590. X     RREECCIIPPEESS            How to tell ddmmaakkee how to make a target.
  591. X
  592. X     TTEEXXTT DDIIVVEERRSSIIOONNSS    How to use text diversions for long argu-
  593. X                        ment lists in recipes.
  594. X
  595. X     SSPPEECCIIAALL TTAARRGGEETTSS    Some targets are special.
  596. X
  597. X
  598. X
  599. X
  600. XVersion 3.50                    UW                              3
  601. X
  602. X
  603. X
  604. X
  605. XDMAKE(p)               Unsupported Software               DMAKE(p)
  606. X
  607. X
  608. X
  609. X     SSPPEECCIIAALL MMAACCRROOSS     Macros used by ddmmaakkee to alter the pro-
  610. X                        cessing of the makefile, and those
  611. X                        defined by ddmmaakkee for the user.
  612. X
  613. X     DDYYNNAAMMIICC PPRREERREEQQUUIISSIITTEESS
  614. X                        Processing of prerequisites which contain
  615. X                        macro expansions in their name.
  616. X
  617. X     BBIINNDDIINNGG TTAARRGGEETTSS    The rules that ddmmaakkee uses to bind a tar-
  618. X                        get to an existing file in the file sys-
  619. X                        tem.
  620. X
  621. X     PPEERRCCEENNTT((%%)) RRUULLEESS   Specification of recipes to be used by
  622. X                        the inference algorithm.
  623. X
  624. X     MMAAKKIINNGG IINNFFEERREENNCCEESS  The rules that ddmmaakkee uses when inferring
  625. X                        how to make a target which had no expli-
  626. X                        cit recipe.  This and the previous sec-
  627. X                        tion are really a single section in the
  628. X                        text below.
  629. X
  630. X     MMAAKKIINNGG TTAARRGGEETTSS     How ddmmaakkee makes targets other than
  631. X                        libraries.
  632. X
  633. X     MMAAKKIINNGG LLIIBBRRAARRIIEESS   How ddmmaakkee makes libraries.
  634. X
  635. X     MMUULLTTII PPRROOCCEESSSSIINNGG   Discussion of ddmmaakkee''ss parallel make
  636. X                        facilities for architectures that support
  637. X                        them.
  638. X
  639. X     CCOONNDDIITTIIOONNAALLSS       Conditional expressions which control the
  640. X                        processing of the makefile.
  641. X
  642. X     EEXXAAMMPPLLEESS           Some hopefully useful examples.
  643. X
  644. X     CCOOMMPPAATTIIBBIILLIITTYY      How ddmmaakkee compares with previous versions
  645. X                        of make.
  646. X
  647. X     LLIIMMIITTSS             Limitations of ddmmaakkee.
  648. X
  649. X     PPOORRTTAABBIILLIITTYY        Comments on writing portable makefiles.
  650. X
  651. X     FFIILLEESS              Files used by ddmmaakkee.
  652. X
  653. X     SSEEEE AALLSSOO           Other related programs, and man pages.
  654. X
  655. X     AAUUTTHHOORR             The guy responsible for this thing.
  656. X
  657. X     BBUUGGSS               Hope not.
  658. X
  659. X
  660. X
  661. X
  662. X
  663. X
  664. XVersion 3.50                    UW                              4
  665. X
  666. X
  667. X
  668. X
  669. XDMAKE(p)               Unsupported Software               DMAKE(p)
  670. X
  671. X
  672. X
  673. XSSTTAARRTTUUPP
  674. X     When ddmmaakkee begins execution it first processes the command
  675. X     line and then it processes an initial startup-makefile.
  676. X     This is followed by an attempt to locate and process a user
  677. X     supplied makefile.  The startup file defines the default
  678. X     values of all required control macros and the set of default
  679. X     rules for making inferences.  When searching for the startup
  680. X     makefile, ddmmaakkee searches the following locations, in order,
  681. X     until a startup file is located:
  682. X
  683. X          1.   The location given as the value of the macro MAK-
  684. X               ESTARTUP defined on the command line.
  685. X
  686. X          2.   The location given as the value of the environment
  687. X               variable MAKESTARTUP defined in the current
  688. X               environment.
  689. X
  690. X          3.   The location given as the value of the macro MAK-
  691. X               ESTARTUP defined internally within ddmmaakkee.
  692. X
  693. X     The above search is disabled by specifying the -r option on
  694. X     the command line.  An error is issued if a startup makefile
  695. X     cannot be found and the -r option was not specified.  A user
  696. X     may substitute a custom startup file by defining the MAKES-
  697. X     TARTUP environment variable or by redefining the MAKESTARTUP
  698. X     macro on the command line.  To find out where ddmmaakkee looks
  699. X     for the default startup file, check your environment or
  700. X     issue the command _"_d_m_a_k_e _-_V_" to determine the builtin value
  701. X     of MAKESTARTUP.
  702. X
  703. X     A similar search is performed to locate a default user
  704. X     makefile when no --ff command line option is specified.  The
  705. X     special target .MAKEFILES is internally defined by default.
  706. X     This target's prerequisite list specifies the names of files
  707. X     and the order that ddmmaakkee will use to search for them when
  708. X     attempting to locate the default makefile.  A typical defin-
  709. X     ition for this target is:
  710. X
  711. X          .MAKEFILES : makefile.mk Makefile makefile
  712. X
  713. X     ddmmaakkee will first look for makefile.mk and then the others.
  714. X     If a prerequisite cannot be found ddmmaakkee will try to make it
  715. X     before going on to the next prerequisite.  For example,
  716. X     makefile.mk can be checked out of an RCS file if the proper
  717. X     rules for doing so are defined in the startup file.
  718. X
  719. XSSYYNNTTAAXX
  720. X     This section is a summary of the syntax of makefile state-
  721. X     ments.  The description is given in a style similar to BNF,
  722. X     where { } enclose items that may appear zero or more times,
  723. X     and [ ] enclose items that are optional.  Alternative pro-
  724. X     ductions for a left hand side are indicated by '->', and
  725. X
  726. X
  727. X
  728. XVersion 3.50                    UW                              5
  729. X
  730. X
  731. X
  732. X
  733. XDMAKE(p)               Unsupported Software               DMAKE(p)
  734. X
  735. X
  736. X
  737. X     newlines are significant.  All symbols in bboolldd type are text
  738. X     or names representing text supplied by the user.
  739. X
  740. X
  741. X
  742. X          Makefile -> { Statement }
  743. X
  744. X          Statement -> Macro-Definition
  745. X                    -> Conditional
  746. X                    -> Rule-Definition
  747. X                    -> Attribute-Definition
  748. X
  749. X          Macro-Definition -> MMAACCRROO == LLIINNEE
  750. X                           -> MMAACCRROO ::== LLIINNEE
  751. X                           -> MMAACCRROO ++== LLIINNEE
  752. X                           -> MMAACCRROO ++::== LLIINNEE
  753. X
  754. X          Conditional ->  ..IIFF expression
  755. X                             Makefile
  756. X                          [ ..EELLSSEE
  757. X                             Makefile ]
  758. X                          ..EENNDD
  759. X
  760. X          expression -> LLIINNEE
  761. X                     -> SSTTRRIINNGG ==== LLIINNEE
  762. X                     -> SSTTRRIINNGG !!== LLIINNEE
  763. X
  764. X
  765. X          Rule-Definition ->  target-definition
  766. X                                 [ recipe ]
  767. X
  768. X          target-definition -> targets [attrs] op { PPRREERREEQQUUIISSIITTEE } [;; rcp-line]
  769. X
  770. X          targets -> target { targets }
  771. X                  -> ""target"" { targets }
  772. X
  773. X          target -> special-target
  774. X                 -> TTAARRGGEETT
  775. X
  776. X          attrs -> attribute { attrs }
  777. X                -> ""attribute"" { attrs }
  778. X
  779. X          op -> :: { modifier }
  780. X
  781. X          modifier -> ::
  782. X                   -> ^^
  783. X                   -> !!
  784. X                   -> --
  785. X
  786. X          recipe -> { TTAABB rcp-line }
  787. X                 -> [@@][--] [[
  788. X                       { LLIINNEE }
  789. X
  790. X
  791. X
  792. XVersion 3.50                    UW                              6
  793. X
  794. X
  795. X
  796. X
  797. XDMAKE(p)               Unsupported Software               DMAKE(p)
  798. X
  799. X
  800. X
  801. X                    ]]
  802. X
  803. X          rcp-line -> [@@][--] LLIINNEE
  804. X
  805. X
  806. X          Attribute-Definition -> attrs :: targets
  807. X
  808. X
  809. X          attribute -> ..EEPPIILLOOGG
  810. X                    -> ..IIGGNNOORREE
  811. X                    -> ..LLIIBBRRAARRYY
  812. X                    -> ..NNOOIINNFFEERR
  813. X                    -> ..PPRREECCIIOOUUSS
  814. X                    -> ..PPRROOLLOOGG
  815. X                    -> ..SSEETTDDIIRR==_p_a_t_h
  816. X                    -> ..SSIILLEENNTT
  817. X                    -> ..SSEEQQUUEENNTTIIAALL
  818. X                    -> ..SSYYMMBBOOLL
  819. X                    -> ..UUPPDDAATTEEAALLLL
  820. X
  821. X          special-target -> ..EERRRROORR
  822. X                         -> ..EEXXPPOORRTT
  823. X                         -> ..GGRROOUUPPEEPPIILLOOGG
  824. X                         -> ..GGRROOUUPPPPRROOLLOOGG
  825. X                         -> ..IIMMPPOORRTT
  826. X                         -> ..IINNCCLLUUDDEE
  827. X                         -> ..IINNCCLLUUDDEEDDIIRRSS
  828. X                         -> ..MMAAKKEEFFIILLEESS
  829. X                         -> ..RREEMMOOVVEE
  830. X                         -> ..SSOOUURRCCEE
  831. X                         -> ..SSOOUURRCCEE.._s_u_f_f_i_x
  832. X                         -> ._s_u_f_f_i_x_1._s_u_f_f_i_x_2
  833. X
  834. X
  835. X     Where, TTAABB represents a <tab> character, SSTTRRIINNGG represents
  836. X     an arbitrary sequence of characters, and LLIINNEE represents a
  837. X     possibly empty sequence of characters terminated by a non-
  838. X     escaped (not immediately preceded by a backslash '\') new-
  839. X     line character.  MMAACCRROO, PPRREERREEQQUUIISSIITTEE, and TTAARRGGEETT each
  840. X     represent a string of characters not including space or tab
  841. X     which respectively form the name of a macro, prerequisite or
  842. X     target.  The name may itself be a macro expansion expres-
  843. X     sion.  A LLIINNEE can be continued over several physical lines
  844. X     by terminating it with a single backslash character.  Com-
  845. X     ments are initiated by the pound '##' character and extend to
  846. X     the end of line.  All comment text is discarded, a '#' may
  847. X     be placed into the makefile text by escaping it with '\'
  848. X     (ie. \# translates to # when it is parsed).  A group of con-
  849. X     tinued lines may be commented out by placing a single # at
  850. X     the start of the first line of the group.  A continued line
  851. X     may not span more than one makefile.
  852. X
  853. X
  854. X
  855. X
  856. XVersion 3.50                    UW                              7
  857. X
  858. X
  859. X
  860. X
  861. XDMAKE(p)               Unsupported Software               DMAKE(p)
  862. X
  863. X
  864. X
  865. X     wwhhiittee ssppaaccee is defined to be any combination of <space>,
  866. X     <tab>, and the sequence \<nl> when \<nl> is used to ter-
  867. X     minate a LINE.  When processing mmaaccrroo definition lines, any
  868. X     amount of white space is allowed on either side of the macro
  869. X     operator (=, :=, += or +:=), and white space is stripped
  870. X     from both before and after the macro value string.  The
  871. X     sequence \<nl> is treated as white space during recipe
  872. X     expansion and is deleted from the final recipe string.  You
  873. X     must escape the \<nl> with a \ in order to get a \<nl> at
  874. X     the end of a recipe line.  The \<nl> sequence is always
  875. X     deleted from macro values.
  876. X
  877. X     When processing ttaarrggeett definition lines, the recipe for a
  878. X     target must, in general, follow the first definition of the
  879. X     target (See the RULES AND TARGETS section for an exception),
  880. X     and the recipe may not span across multiple makefiles.  Any
  881. X     targets and prerequisites found on a target definition line
  882. X     are taken to be white space separated tokens.  The rule
  883. X     operator (_o_p in SYNTAX section) is also considered to be a
  884. X     token but does not require white space to precede or follow
  885. X     it.  Since the rule operator begins with a `:', traditional
  886. X     versions of make do not allow the `:' character to form a
  887. X     valid target name.  ddmmaakkee allows `:' to be present in
  888. X     target/prerequisite names as long as the entire
  889. X     target/prerequisite name is quoted.  For example:
  890. X
  891. X          a:fred : test
  892. X
  893. X     would be parsed as TARGET = a, PREREQUISITES are fred, :,
  894. X     and test, which is not what was intended.  To fix this you
  895. X     must write:
  896. X
  897. X          "a:fred" : test
  898. X
  899. X     Which will be parsed as expected.  See the EXAMPLES section
  900. X     for how to apply this to a list of targets.
  901. X
  902. XAATTTTRRIIBBUUTTEESS
  903. X     ddmmaakkee defines several target attributes.  Attributes may be
  904. X     assigned to a single target, a group of targets, or to all
  905. X     targets in the makefile.  Attributes are used to modify
  906. X     ddmmaakkee actions during target update.  The recognized attri-
  907. X     butes are:
  908. X
  909. X
  910. X     ..EEPPIILLOOGG     Insert shell epilog code when executing a group
  911. X                 recipe associated with any target having this
  912. X                 attribute set.
  913. X
  914. X     ..IIGGNNOORREE     Ignore an error when trying to make any target
  915. X                 with this attribute set.
  916. X
  917. X
  918. X
  919. X
  920. XVersion 3.50                    UW                              8
  921. X
  922. X
  923. X
  924. X
  925. XDMAKE(p)               Unsupported Software               DMAKE(p)
  926. X
  927. X
  928. X
  929. X     ..LLIIBBRRAARRYY    Target is a library.
  930. X
  931. X     ..NNOOIINNFFEERR    Any target with this attribute set will not be
  932. X                 subjected to transitive closure if it is
  933. X                 inferred as a prerequisite of a target whose
  934. X                 recipe and prerequisites are being inferred.
  935. X                 (i.e. the inference search will not use any
  936. X                 prerequisite with this attribute set, as a tar-
  937. X                 get)
  938. X
  939. X     ..PPRREECCIIOOUUSS   Do not remove this target under any cir-
  940. X                 cumstances.  Set by default for any targets
  941. X                 whose corresponding files exist in the file sys-
  942. X                 tem prior to the execution of ddmmaakkee.
  943. X
  944. X     ..PPRROOLLOOGG     Insert shell prolog code when executing a group
  945. X                 recipe associated with any target having this
  946. X                 attribute set.
  947. X
  948. X     ..SSEEQQUUEENNTTIIAALL Force a sequential make of the associated
  949. X                 target's prerequisites.
  950. X
  951. X     ..SSEETTDDIIRR     Change current working directory to specified
  952. X                 directory when making associated target.  The
  953. X                 syntax of this attribute is different from the
  954. X                 others.  You must specify the directory at the
  955. X                 time the attribute is specified.  To do this
  956. X                 simply give _._S_E_T_D_I_R_=_p_a_t_h as the attribute.  _p_a_t_h
  957. X                 is expanded and the result is used as the value
  958. X                 of the directory to change to.  If path is sur-
  959. X                 rounded by single quotes then path is not
  960. X                 expanded, and is used literally as the directory
  961. X                 name.  If the _p_a_t_h contains any `:' characters
  962. X                 then the entire attribute string must be quoted
  963. X                 using ".  If a target having this attribute set
  964. X                 also has the .IGNORE attribute set then if the
  965. X                 change to the specified directory fails it will
  966. X                 be ignored, and no error message will be issued.
  967. X
  968. X     ..SSIILLEENNTT     Do not echo the recipe lines when making any
  969. X                 target with this attribute set, and do not issue
  970. X                 any warnings.
  971. X
  972. X     ..SSYYMMBBOOLL     Target is a library member and is an entry point
  973. X                 into a module in the library.  This attribute is
  974. X                 used only when searching a library for a target.
  975. X                 Targets of the form lib((entry)) have this
  976. X                 attribute set automatically.
  977. X
  978. X     ..UUPPDDAATTEEAALLLL  Indicates that all the targets listed in this
  979. X                 rule are updated by the execution of the accom-
  980. X                 panying recipe.  A common example is the
  981. X
  982. X
  983. X
  984. XVersion 3.50                    UW                              9
  985. X
  986. X
  987. X
  988. X
  989. XDMAKE(p)               Unsupported Software               DMAKE(p)
  990. X
  991. X
  992. X
  993. X                 production of the _y_._t_a_b_._c and _y_._t_a_b_._h files by
  994. X                 yyaacccc when it is run on a grammar.  Specifying
  995. X                 .UPDATEALL in such a rule prevents the running
  996. X                 of yacc twice, once for the y.tab.c file and
  997. X                 once for the y.tab.h file.
  998. X
  999. X
  1000. X     All attributes are user setable and may be used in one of
  1001. X     two forms (except .UPDATEALL, use of this attribute in a
  1002. X     rule of the first form is illegal)
  1003. X
  1004. X          ATTRIBUTE_LIST : _t_a_r_g_e_t_s
  1005. X
  1006. X     assigns the attributes specified by ATTRIBUTE_LIST to each
  1007. X     target in _t_a_r_g_e_t_s or
  1008. X
  1009. X          _t_a_r_g_e_t_s ATTRIBUTE_LIST : ...
  1010. X
  1011. X     assigns the attributes specified by ATTRIBUTE_LIST to each
  1012. X     target in _t_a_r_g_e_t_s_. In the first form if _t_a_r_g_e_t_s is empty
  1013. X     (ie. a NULL list), then the list of attributes will apply to
  1014. X     all targets in the makefile (this is equivalent to the com-
  1015. X     mon Make construct of _"_._I_G_N_O_R_E _:_" but has been modified to
  1016. X     the notion of an attribute instead of a special target).
  1017. X     Not all of the attributes have global meaning.  In particu-
  1018. X     lar, .LIBRARY, .SYMBOL, and .UPDATEALL have no assigned glo-
  1019. X     bal meaning.
  1020. X
  1021. X     Any attribute may be used with any target, even with the
  1022. X     special targets.  Some combinations are useless (e.g.
  1023. X     .INCLUDE .PRECIOUS: ... ), while others are useful (e.g.
  1024. X     .INCLUDE .IGNORE : "file.mk" will not complain if file.mk
  1025. X     cannot be found using the include file search rules, see the
  1026. X     section on SPECIAL TARGETS for a description of .INCLUDE).
  1027. X     If a specified attribute will not be used with the special
  1028. X     target a warning is issued and the attribute is ignored.
  1029. X
  1030. XMMAACCRROOSS
  1031. X     ddmmaakkee supports four types of macro assignment.  The first
  1032. X     and most familiar is the usual assignment:
  1033. X
  1034. X          MACRO = LINE
  1035. X
  1036. X     which causes LINE to be assigned without expansion, as the
  1037. X     value of MACRO.  The second form:
  1038. X
  1039. X          MACRO := LINE
  1040. X
  1041. X     is new and indicates that LINE should be expanded prior to
  1042. X     being assigned as the value of MACRO.  Future expansions of
  1043. X     MACRO do not have the value expanded since it was expanded
  1044. X     when the macro was defined.  The third form of macro
  1045. SHAR_EOF
  1046. echo "End of part 9"
  1047. echo "File man/dmake.p is continued in part 10"
  1048. echo "10" > s2_seq_.tmp
  1049. exit 0
  1050.  
  1051.