home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume19 / dmake / part15 < prev    next >
Encoding:
Text File  |  1991-05-11  |  40.2 KB  |  1,117 lines

  1. Newsgroups: comp.sources.misc
  2. From: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  3. Subject:  v19i036:  dmake - dmake version 3.7, Part15/37
  4. Message-ID: <1991May12.001827.9186@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: 3e9c22ff0ed047ff36ef5affe85d8ee4
  6. Date: Sun, 12 May 1991 00:18:27 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  10. Posting-number: Volume 19, Issue 36
  11. Archive-name: dmake/part15
  12. Supersedes: dmake-3.6: Volume 15, Issue 52-77
  13.  
  14. ---- Cut Here and feed the following to sh ----
  15. #!/bin/sh
  16. # this is dmake.shar.15 (part 15 of a multipart archive)
  17. # do not concatenate these parts, unpack them in order with /bin/sh
  18. # file dmake/man/dmake.nc continued
  19. #
  20. if test ! -r _shar_seq_.tmp; then
  21.     echo 'Please unpack part 1 first!'
  22.     exit 1
  23. fi
  24. (read Scheck
  25.  if test "$Scheck" != 15; then
  26.     echo Please unpack part "$Scheck" next!
  27.     exit 1
  28.  else
  29.     exit 0
  30.  fi
  31. ) < _shar_seq_.tmp || exit 1
  32. if test -f _shar_wnt_.tmp; then
  33. sed 's/^X//' << 'SHAR_EOF' >> 'dmake/man/dmake.nc' &&
  34. X
  35. X
  36. X
  37. Version 3.70                    UW                             42
  38. X
  39. X
  40. X
  41. X
  42. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  43. X
  44. X
  45. X
  46. X     .NOSTATE attribute will have a record written into the state
  47. X     file indicating the target's name, the current directory,
  48. X     the command used to update the target, and which, if any, ::
  49. X     rule is being used.  When you make this target again if any
  50. X     of this information does not match the previous settings and
  51. X     the target is not out dated it will still be re-made.  The
  52. X     assumption is that one of the conditions above has changed
  53. X     and that we wish to remake the target.  For example, state
  54. X     keeping is used in the maintenance of dmake to test compile
  55. X     different versions of the source using different compilers.
  56. X     Changing the compiler causes the compilation flags to be
  57. X     modified and hence all sources to be recompiled.
  58. X
  59. X     The state file is an ascii file and is portable, however it
  60. X     is not in human readable form as the entries represent hash
  61. X     keys of the above information.
  62. X
  63. X     The Sun Microsystem's Make construct
  64. X
  65. X          .KEEP_STATE :
  66. X
  67. X     is recognized and is mapped to .KEEP_STATE:=_state.mk.  The
  68. X     dmake version of state keeping does not include scanning C
  69. X     source files for dependencies like Sun Make.  This is
  70. X     specific to C programs and it was felt that it does not
  71. X     belong in make.  dmake instead provides the tool, cdepend,
  72. X     to scan C source files and to produce depedency information.
  73. X     Users are free to modify cdepend to produce other dependency
  74. X     files.  (NOTE: cdepend does not come with the distribution
  75. X     at this time, but will be available in a patch in the near
  76. X     future)
  77. X
  78. MULTI PROCESSING
  79. X     If the architecture supports it then dmake is capable of
  80. X     making a target's prerequisites in parallel.  dmake will
  81. X     make as much in parallel as it can and use a number of child
  82. X     processes up to the maximum specified by MAXPROCESS or by
  83. X     the value supplied to the -P command line flag.  A parallel
  84. X     make is enabled by setting the value of MAXPROCESS (either
  85. X     directly or via -P option) to a value which is > 1.  dmake
  86. X     guarantees that all dependencies as specified in the
  87. X     makefile are honored.  A target will not be made until all
  88. X     of its prerequisites have been made.  If a parallel make is
  89. X     being performed then the following restrictions on parallel-
  90. X     ism are enforced.
  91. X
  92. X          1.   Individual recipe lines in a non-group recipe are
  93. X               performed sequentially in the order in which they
  94. X               are specified within the makefile and in parallel
  95. X               with the recipes of other targets.
  96. X
  97. X
  98. X
  99. X
  100. X
  101. Version 3.70                    UW                             43
  102. X
  103. X
  104. X
  105. X
  106. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  107. X
  108. X
  109. X
  110. X          2.   If a target contains multiple recipe definitions
  111. X               (cf. :: rules) then these are performed sequen-
  112. X               tially in the order in which the :: rules are
  113. X               specified within the makefile and in parallel with
  114. X               the recipes of other targets.
  115. X
  116. X          3.   If a target rule contains the `!' modifier, then
  117. X               the recipe is performed sequentially for the list
  118. X               of outdated prerequisites and in parallel with the
  119. X               recipes of other targets.
  120. X
  121. X          4.   If a target has the .SEQUENTIAL attribute set then
  122. X               all of its prerequisites are made sequentially
  123. X               relative to one another (as if MAXPROCESS=1), but
  124. X               in parallel with other targets in the makefile.
  125. X
  126. X     Note:  If you specify a parallel make then the order of tar-
  127. X     get update and the order in which the associated recipes are
  128. X     invoked will not correspond to that displayed by the -n
  129. X     flag.
  130. X
  131. CONDITIONALS
  132. X     dmake supports a makefile construct called a conditional.
  133. X     It allows the user to conditionally select portions of
  134. X     makefile text for input processing and to discard other por-
  135. X     tions.  This becomes useful for writing makefiles that are
  136. X     intended to function for more than one target host and
  137. X     environment.  The conditional expression is specified as
  138. X     follows:
  139. X
  140. X          .IF  expression
  141. X             ... if text ...
  142. X          .ELIF  expression
  143. X             ... if text ...
  144. X          .ELSE
  145. X             ... else text ...
  146. X          .END
  147. X
  148. X     The .ELSE and .ELIF portions are optional, and the condi-
  149. X     tionals may be nested (ie.  the text may contain another
  150. X     conditional).  .IF, .ELSE, and .END may appear anywhere in
  151. X     the makefile, but a single conditional expression may not
  152. X     span multiple makefiles.
  153. X
  154. X     expression can be one of the following three forms:
  155. X
  156. X          <text> | <text> == <text> | <text> != <text>
  157. X
  158. X     where text is either text or a macro expression.  In any
  159. X     case, before the comparison is made, the expression is
  160. X     expanded.  The text portions are then selected and compared.
  161. X     White space at the start and end of the text portion is
  162. X
  163. X
  164. X
  165. Version 3.70                    UW                             44
  166. X
  167. X
  168. X
  169. X
  170. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  171. X
  172. X
  173. X
  174. X     discarded before the comparison.  This means that a macro
  175. X     that evaluates to nothing but white space is considered a
  176. X     NULL value for the purpose of the comparison.  In the first
  177. X     case the expression evaluates TRUE if the text is not NULL
  178. X     otherwise it evaluates FALSE.  The remaining two cases both
  179. X     evaluate the expression on the basis of a string comparison.
  180. X     If a macro expression needs to be equated to a NULL string
  181. X     then compare it to the value of the macro $(NULL).  You can
  182. X     use the $(shell ...) macro to construct more complex test
  183. X     expressions.
  184. X
  185. EXAMPLES
  186. X          # A simple example showing how to use make
  187. X          #
  188. X          prgm : a.o b.o
  189. X               cc a.o b.o -o prgm
  190. X          a.o : a.c g.h
  191. X               cc a.c -o $@
  192. X          b.o : b.c g.h
  193. X               cc b.c -o $@
  194. X
  195. X     In the previous example prgm is remade only if a.o and/or
  196. X     b.o is out of date with respect to prgm.  These dependencies
  197. X     can be stated more concisely by using the inference rules
  198. X     defined in the standard startup file.  The default rule for
  199. X     making .o's from .c's looks something like this:
  200. X
  201. X          %.o : %.c; cc -c $(CFLAGS) -o $@ $<
  202. X
  203. X     Since there exists a rule (defined in the startup file) for
  204. X     making .o's from .c's dmake will use that rule for manufac-
  205. X     turing a .o from a .c and we can specify our dependencies
  206. X     more concisely.
  207. X
  208. X          prgm : a.o b.o
  209. X               cc -o prgm $<
  210. X          a.o b.o : g.h
  211. X
  212. X     A more general way to say the above using the new macro
  213. X     expansions would be:
  214. X
  215. X          SRC = a b
  216. X          OBJ = {$(SRC)}.o
  217. X
  218. X          prgm : $(OBJ)
  219. X               cc -o $@ $<
  220. X
  221. X          $(OBJ) : g.h
  222. X
  223. X     If we want to keep the objects in a separate directory,
  224. X     called objdir, then we would write something like this.
  225. X
  226. X
  227. X
  228. X
  229. Version 3.70                    UW                             45
  230. X
  231. X
  232. X
  233. X
  234. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  235. X
  236. X
  237. X
  238. X          SRC = a b
  239. X          OBJ = {$(SRC)}.o
  240. X
  241. X          prgm : $(OBJ)
  242. X               cc $< -o $@
  243. X
  244. X          $(OBJ) : g.h
  245. X          %.o : %.c
  246. X               $(CC) -c $(CFLAGS) -o $(@:f) $<
  247. X               mv $(@:f) objdir
  248. X
  249. X          .SOURCE.o : objdir       # tell make to look here for .o's
  250. X
  251. X     An example of building library members would go something
  252. X     like this: (NOTE:  The same rules as above will be used to
  253. X     produce .o's from .c's)
  254. X
  255. X          SRC  = a b
  256. X          LIB  = lib
  257. X          LIBm = { $(SRC) }.o
  258. X
  259. X          prgm: $(LIB)
  260. X               cc -o $@ $(LIB)
  261. X
  262. X          $(LIB) .LIBRARY : $(LIBm)
  263. X               ar rv $@ $<
  264. X               rm $<
  265. X
  266. X     Finally, suppose that each of the source files in the previ-
  267. X     ous example had the `:' character in their target name.
  268. X     Then we would write the above example as:
  269. X
  270. X          SRC  = f:a f:b
  271. X          LIB  = lib
  272. X          LIBm = "{ $(SRC) }.o"         # put quotes around each token
  273. X
  274. X          prgm: $(LIB)
  275. X               cc -o $@ $(LIB)
  276. X
  277. X          $(LIB) .LIBRARY : $(LIBm)
  278. X               ar rv $@ $<
  279. X               rm $<
  280. X
  281. COMPATIBILITY
  282. X     There are two notable differences between dmake and the
  283. X     standard version of BSD UNIX 4.2/4.3 Make.
  284. X
  285. X          1. BSD UNIX 4.2/4.3 Make supports wild card filename
  286. X             expansion for prerequisite names.  Thus if a direc-
  287. X             tory contains a.h, b.h and c.h, then a line like
  288. X
  289. X                  target: *.h
  290. X
  291. X
  292. X
  293. Version 3.70                    UW                             46
  294. X
  295. X
  296. X
  297. X
  298. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  299. X
  300. X
  301. X
  302. X             will cause UNIX make to expand the *.h into "a.h b.h
  303. X             c.h".  dmake does not support this type of filename
  304. X             expansion.
  305. X
  306. X          2. Unlike UNIX make, touching a library member causes
  307. X             dmake to search the library for the member name and
  308. X             to update the library time stamp.  This is only
  309. X             implemented in the UNIX version.  MSDOS and other
  310. X             versions may not have librarians that keep file time
  311. X             stamps, as a result dmake touches the library file
  312. X             itself, and prints a warning.
  313. X
  314. X     dmake is not compatible with GNU Make.  In particular it
  315. X     does not understand GNU Make's macro expansions that query
  316. X     the file system.
  317. X
  318. X     dmake is fully compatible with SYSV AUGMAKE, and supports
  319. X     the following AUGMAKE features:
  320. X
  321. X          1. The word include appearing at the start of a line
  322. X             can be used instead of the ".INCLUDE :" construct
  323. X             understood by dmake.
  324. X
  325. X          2. The macro modifier expression $(macro:str=sub) is
  326. X             understood and is equivalent to the expression
  327. X             $(macro:s/str/sub), with the restriction that str
  328. X             must match the following regular expression:
  329. X
  330. X                  str[ |\t][ |\t]*
  331. X
  332. X             (ie. str only matches at the end of a token where
  333. X             str is a suffix and is terminated by a space, a tab,
  334. X             or end of line)
  335. X
  336. X          3. The macro % is defined to be $@ (ie. $% expands to
  337. X             the same value as $@).
  338. X
  339. X          4. The AUGMAKE notion of libraries is handled
  340. X             correctly.
  341. X
  342. X          5. When defining special targets for the inference
  343. X             rules and the AUGMAKE special target handling is
  344. X             enabled then the special target .X is equivalent to
  345. X             the %-rule "% : %.X".
  346. X
  347. X          6. Directories are always made if you specify -A.  This
  348. X             is consistent with other UNIX versions of Make.
  349. X
  350. X          7. Makefiles that utilize virtual targets to force mak-
  351. X             ing of other targets work as expected if AUGMAKE
  352. X             special target handling is enabled.  For example:
  353. X
  354. X
  355. X
  356. X
  357. Version 3.70                    UW                             47
  358. X
  359. X
  360. X
  361. X
  362. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  363. X
  364. X
  365. X
  366. X                  FRC:
  367. X                  myprog.o : myprog.c $(FRC) ; ...
  368. X
  369. X             Works as expected if you issue the command
  370. X
  371. X                  'dmake -A FRC=FRC'
  372. X
  373. X             but fails with a 'don't know how to make FRC' error
  374. X             message if you do not specify AUGMAKE special target
  375. X             handling via the -A flag (or by setting AUGMAKE:=yes
  376. X             internally).
  377. X
  378. LIMITS
  379. X     In some environments the length of an argument string is
  380. X     restricted.  (e.g. MSDOS command line arguments cannot be
  381. X     longer than 128 bytes if you are using the standard
  382. X     command.com command interpreter as your shell, dmake text
  383. X     diversions may help in these situations.)
  384. X
  385. PORTABILITY
  386. X     To write makefiles that can be moved from one environment to
  387. X     another requires some forethought.  In particular you must
  388. X     define as macros all those things that may be different in
  389. X     the new environment.  dmake has two facilities that help to
  390. X     support writing portable makefiles, recursive macros and
  391. X     conditional expressions.  The recursive macros, allow one to
  392. X     define environment configurations that allow different
  393. X     environments for similar types of operating systems.  For
  394. X     example the same make script can be used for SYSV and BSD
  395. X     but with different macro definitions.
  396. X
  397. X     To write a makefile that is portable between UNIX and MSDOS
  398. X     requires both features since in almost all cases you will
  399. X     need to define new recipes for making targets.  The recipes
  400. X     will probably be quite different since the capabilities of
  401. X     the tools on each machine are different.  Different macros
  402. X     will be needed to help handle the smaller differences in the
  403. X     two environments.
  404. X
  405. X     NOTE:  Unlike UNIX, MSDOS does maintain cd requests cross
  406. X     single recipe lines.  This is not portable, and your
  407. X     makefiles will not work the same way if you depend on it.
  408. X     Use the .IF ... .ELSE ... .END conditionals to supply dif-
  409. X     ferent make scripts as necessary.
  410. X
  411. FILES
  412. X     Makefile, makefile, startup.mk (use dmake -V to tell you
  413. X     where the startup file is)
  414. X
  415. SEE ALSO
  416. X     sh(1), csh(1), touch(1), f77(1), pc(1), cc(1)
  417. X     S.I. Feldman  Make - A Program for Maintaining Computer
  418. X
  419. X
  420. X
  421. Version 3.70                    UW                             48
  422. X
  423. X
  424. X
  425. X
  426. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  427. X
  428. X
  429. X
  430. X     Programs
  431. X
  432. AUTHOR
  433. X     Dennis Vadura, CS Dept. University of Waterloo.
  434. X     dvadura@watdragon.uwaterloo.ca
  435. X     Many thanks to Carl Seger for his helpful suggestions, and
  436. X     to Trevor John Thompson for his many excellent ideas and
  437. X     informative bug reports.
  438. X
  439. BUGS
  440. X     Some system commands return non-zero status inappropriately.
  441. X     Use -i (`-' within the makefile) to overcome the difficulty.
  442. X
  443. X     Some systems do not have easily accessible time stamps for
  444. X     library members (MSDOS, AMIGA, etc) for these dmake uses the
  445. X     time stamp of the library instead and prints a warning the
  446. X     first time it does so.  This is almost always ok, except
  447. X     when multiple makefiles update a single library file.  In
  448. X     these instances it is possible to miss an update if one is
  449. X     not careful.
  450. X
  451. X     This man page is way too long.
  452. X
  453. X
  454. X
  455. X
  456. X
  457. X
  458. X
  459. X
  460. X
  461. X
  462. X
  463. X
  464. X
  465. X
  466. X
  467. X
  468. X
  469. X
  470. X
  471. X
  472. X
  473. X
  474. X
  475. X
  476. X
  477. X
  478. X
  479. X
  480. X
  481. X
  482. X
  483. X
  484. X
  485. Version 3.70                    UW                             49
  486. SHAR_EOF
  487. chmod 0640 dmake/man/dmake.nc ||
  488. echo 'restore of dmake/man/dmake.nc failed'
  489. Wc_c="`wc -c < 'dmake/man/dmake.nc'`"
  490. test 117216 -eq "$Wc_c" ||
  491.     echo 'dmake/man/dmake.nc: original size 117216, current size' "$Wc_c"
  492. rm -f _shar_wnt_.tmp
  493. fi
  494. # ============= dmake/man/dmake.p ==============
  495. if test -f 'dmake/man/dmake.p' -a X"$1" != X"-c"; then
  496.     echo 'x - skipping dmake/man/dmake.p (File already exists)'
  497.     rm -f _shar_wnt_.tmp
  498. else
  499. > _shar_wnt_.tmp
  500. sed 's/^X//' << 'SHAR_EOF' > 'dmake/man/dmake.p' &&
  501. X
  502. X
  503. X
  504. X
  505. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  506. X
  507. X
  508. X
  509. NNAAMMEE
  510. X     ddmmaakkee - maintain program groups, or interdependent files
  511. X
  512. SSYYNNOOPPSSIISS
  513. X     ddmmaakkee [-AceEhiknpqrsStTuVx] [-v{dfimt}] [-P#] [-{f|C|K}
  514. X     file] [macro[*][+][:]=_v_a_l_u_e ...] [target ...]
  515. X
  516. DDEESSCCRRIIPPTTIIOONN
  517. X     ddmmaakkee executes commands found in an external file called a
  518. X     _m_a_k_e_f_i_l_e to update one or more target names.  Each target
  519. X     may depend on zero or more prerequisite targets.  If any of
  520. X     the target's prerequisites is newer than the target or if
  521. X     the target itself does not exist, then ddmmaakkee will attempt to
  522. X     make the target.
  523. X
  524. X     If no --ff command line option is present then ddmmaakkee searches
  525. X     for an existing _m_a_k_e_f_i_l_e from the list of prerequisites
  526. X     specified for the special target _._M_A_K_E_F_I_L_E_S (see the STARTUP
  527. X     section for more details).  If "-" is the name of the file
  528. X     specified to the --ff flag then ddmmaakkee uses standard input as
  529. X     the source of the makefile text.
  530. X
  531. X     Any macro definitions (arguments with embedded "=" signs)
  532. X     that appear on the command line are processed first and
  533. X     supersede definitions for macros of the same name found
  534. X     within the makefile.  In general it is impossible for defin-
  535. X     itions found inside the makefile to redefine a macro defined
  536. X     on the command line, see the MACROS section for an excep-
  537. X     tion.
  538. X
  539. X     If no _t_a_r_g_e_t names are specified on the command line, then
  540. X     ddmmaakkee uses the first non-special target found in the
  541. X     makefile as the default target.  See the SSPPEECCIIAALL TTAARRGGEETTSS
  542. X     section for the list of special targets and their function.
  543. X     ddmmaakkee is a re-implementation of the UNIX Make utility with
  544. X     significant enhancements.  Makefiles written for most previ-
  545. X     ous versions of _M_a_k_e will be handled correctly by ddmmaakkee..
  546. X     Known differences between ddmmaakkee and other versions of make
  547. X     are discussed in the CCOOMMPPAATTIIBBIILLIITTYY section found at the end
  548. X     of this document.
  549. X
  550. OOPPTTIIOONNSS
  551. X     --AA   Enable AUGMAKE special inference rule transformations
  552. X          (see the "PERCENT(%) RULES" section), these are set to
  553. X          off by default.
  554. X
  555. X     --cc   Use non-standard comment stripping.  If you specify --cc
  556. X          then ddmmaakkee will treat any ## character as a start of
  557. X          comment character wherever it may appear unless it is
  558. X          escaped by a \.
  559. X
  560. X
  561. X
  562. X
  563. X
  564. Version 3.70                    UW                              1
  565. X
  566. X
  567. X
  568. X
  569. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  570. X
  571. X
  572. X
  573. X     --CC [[++]]ffiillee
  574. X          This option writes to _f_i_l_e a copy of standard output
  575. X          and standard error from any child processes and from
  576. X          the ddmmaakkee process itself.  If you specify a ++ prior to
  577. X          the file name then the text is appended to the previous
  578. X          contents of _f_i_l_e.  This option is active in the MSDOS
  579. X          implementation only and is ignored by non-MSDOS ver-
  580. X          sions of ddmmaakkee..
  581. X
  582. X     --ee   Read the environment and define all strings of the form
  583. X          'EENNVV--VVAARR=_e_v_a_l_u_e' defined within as macros whose name is
  584. X          EENNVV--VVAARR, and whose value is '_e_v_a_l_u_e'.  The environment
  585. X          is processed prior to processing the user specified
  586. X          makefile thereby allowing definitions in the makefile
  587. X          to override definitions in the environment.
  588. X
  589. X     --EE   Same as -e, except that the environment is processed
  590. X          after the user specified makefile has been processed
  591. X          (thus definitions in the environment override defini-
  592. X          tions in the makefile).  The -e and -E options are
  593. X          mutually exclusive.  If both are given the latter takes
  594. X          effect.
  595. X
  596. X     --ff ffiillee
  597. X          Use ffiillee as the source for the makefile text.  Only one
  598. X          --ff option is allowed.
  599. X
  600. X     --hh   Print the command summary for ddmmaakkee.
  601. X
  602. X     --ii   Tells ddmmaakkee to ignore errors, and continue making other
  603. X          targets.  This is equivalent to the .IGNORE attribute
  604. X          or macro.
  605. X
  606. X     --KK ffiillee
  607. X          Turns on ..KKEEEEPP__SSTTAATTEE state tracking and tells ddmmaakkee to
  608. X          use _f_i_l_e as the state file.
  609. X
  610. X     --kk   Causes ddmmaakkee to ignore errors caused by command execu-
  611. X          tion and to make all targets not depending on targets
  612. X          that could not be made. Ordinarily ddmmaakkee stops after a
  613. X          command returns a non-zero status, specifying --kk causes
  614. X          ddmmaakkee to ignore the error and continue to make as much
  615. X          as possible.
  616. X
  617. X     --nn   Causes ddmmaakkee to print out what it would have executed,
  618. X          but does not actually execute the commands.  A special
  619. X          check is made for the string "$(MAKE)" inside a recipe
  620. X          line, if found, the line is expanded and invoked,
  621. X          thereby enabling recursive makes to give a full
  622. X          description of all that they will do.  The check for
  623. X          "$(MAKE)" is disabled inside group recipes.
  624. X
  625. X
  626. X
  627. X
  628. Version 3.70                    UW                              2
  629. X
  630. X
  631. X
  632. X
  633. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  634. X
  635. X
  636. X
  637. X     --pp   Print out a version of the digested makefile in human
  638. X          readable form.  (useful for debugging, but cannot be
  639. X          re-read by ddmmaakkee)
  640. X
  641. X     --PP##  On systems that support multi-processing cause ddmmaakkee to
  642. X          use _# concurrent child processes to make targets.  See
  643. X          the "MULTI PROCESSING" section for more information.
  644. X
  645. X     --qq   Check and see if the target is up to date.  Exits with
  646. X          code 0 if up to date, 1 otherwise.
  647. X
  648. X     --rr   Tells ddmmaakkee not to read the initial startup makefile,
  649. X          see STARTUP section for more details.
  650. X
  651. X     --ss   Tells ddmmaakkee to do all its work silently and not echo
  652. X          the commands it is executing to stdout (also suppresses
  653. X          warnings).  This  is equivalent to the .SILENT attri-
  654. X          bute or macro.
  655. X
  656. X     --SS   Force sequential execution of recipes on architectures
  657. X          which support concurrent makes.  For backward compati-
  658. X          bility with old makefiles that have nasty side-effect
  659. X          prerequisite dependencies.
  660. X
  661. X     --tt   Causes ddmmaakkee to touch the targets and bring them up to
  662. X          date without executing any commands.
  663. X
  664. X     --TT   Tells ddmmaakkee to not perform transitive closure on the
  665. X          inference graph.
  666. X
  667. X     --uu   Force an unconditional update.  (ie. do everything that
  668. X          would be done if everything that a target depended on
  669. X          was out of date)
  670. X
  671. X     --vv[[ddffiimmtt]]
  672. X          Verbose flag, when making targets print to stdout what
  673. X          we are going to make and what we think its time stamp
  674. X          is.  The optional flags [[ddffiimmtt]] can be used to restrict
  675. X          the information that is displayed.  In the absence of
  676. X          any optional flags all are assumed to be given (ie. --vv
  677. X          is equivalent to --vvddffiimmtt).  The meanings of the
  678. X          optional flags are:
  679. X
  680. X          dd    Notify of change directory operations only.
  681. X
  682. X          ff    Notify of file I/O operations only.
  683. X
  684. X          ii    Notify of inference algorithm operation only.
  685. X
  686. X          mm    Notify of target update operations only.
  687. X
  688. X
  689. X
  690. X
  691. X
  692. Version 3.70                    UW                              3
  693. X
  694. X
  695. X
  696. X
  697. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  698. X
  699. X
  700. X
  701. X          tt    Keep any temporary files created; normally they
  702. X               are automatically deleted.
  703. X
  704. X     --VV   Print the version of ddmmaakkee, and values of builtin mac-
  705. X          ros.
  706. X
  707. X     --xx   Upon processing the user makefile export all non-
  708. X          internally defined macros to the user's environment.
  709. X          This option together with the -e option allows SYSV
  710. X          AUGMAKE recursive makes to function as expected.
  711. X
  712. IINNDDEEXX
  713. X     Here is a list of the sections that follow and a short
  714. X     description of each.  Perhaps you won't have to read the
  715. X     whole man page to find what you need.
  716. X
  717. X     SSTTAARRTTUUPP            Describes ddmmaakkee initialization.
  718. X
  719. X     SSYYNNTTAAXX             Describes the syntax of makefile expres-
  720. X                        sions.
  721. X
  722. X     AATTTTRRIIBBUUTTEESS         Describes the notion of attributes and
  723. X                        how they are used when making targets.
  724. X
  725. X     MMAACCRROOSS             Defining and expanding macros.
  726. X
  727. X     RRUULLEESS AANNDD TTAARRGGEETTSS  How to define targets and their prere-
  728. X                        quisites.
  729. X
  730. X     RREECCIIPPEESS            How to tell ddmmaakkee how to make a target.
  731. X
  732. X     TTEEXXTT DDIIVVEERRSSIIOONNSS    How to use text diversions in recipes and
  733. X                        macro expansions.
  734. X
  735. X     SSPPEECCIIAALL TTAARRGGEETTSS    Some targets are special.
  736. X
  737. X     SSPPEECCIIAALL MMAACCRROOSS     Macros used by ddmmaakkee to alter the pro-
  738. X                        cessing of the makefile, and those
  739. X                        defined by ddmmaakkee for the user.
  740. X
  741. X     CCOONNTTRROOLL MMAACCRROOSS     Itemized list of special control macros.
  742. X
  743. X     RRUUNN--TTIIMMEE MMAACCRROOSS    Discussion of special run-time macros
  744. X                        such as $@ and $<.
  745. X
  746. X     FFUUNNCCTTIIOONN MMAACCRROOSS    GNU style function macros, only $(mktmp
  747. X                        ...) for now.
  748. X
  749. X     DDYYNNAAMMIICC PPRREERREEQQUUIISSIITTEESS
  750. X                        Processing of prerequisites which contain
  751. X                        macro expansions in their name.
  752. X
  753. X
  754. X
  755. X
  756. Version 3.70                    UW                              4
  757. X
  758. X
  759. X
  760. X
  761. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  762. X
  763. X
  764. X
  765. X     BBIINNDDIINNGG TTAARRGGEETTSS    The rules that ddmmaakkee uses to bind a tar-
  766. X                        get to an existing file in the file sys-
  767. X                        tem.
  768. X
  769. X     PPEERRCCEENNTT((%%)) RRUULLEESS   Specification of recipes to be used by
  770. X                        the inference algorithm.
  771. X
  772. X     MMAAKKIINNGG IINNFFEERREENNCCEESS  The rules that ddmmaakkee uses when inferring
  773. X                        how to make a target which has no expli-
  774. X                        cit recipe.  This and the previous sec-
  775. X                        tion are really a single section in the
  776. X                        text.
  777. X
  778. X     MMAAKKIINNGG TTAARRGGEETTSS     How ddmmaakkee makes targets other than
  779. X                        libraries.
  780. X
  781. X     MMAAKKIINNGG LLIIBBRRAARRIIEESS   How ddmmaakkee makes libraries.
  782. X
  783. X     KKEEEEPP SSTTAATTEE         A discussion of how .KEEP_STATE works.
  784. X
  785. X     MMUULLTTII PPRROOCCEESSSSIINNGG   Discussion of ddmmaakkee''ss parallel make
  786. X                        facilities for architectures that support
  787. X                        them.
  788. X
  789. X     CCOONNDDIITTIIOONNAALLSS       Conditional expressions which control the
  790. X                        processing of the makefile.
  791. X
  792. X     EEXXAAMMPPLLEESS           Some hopefully useful examples.
  793. X
  794. X     CCOOMMPPAATTIIBBIILLIITTYY      How ddmmaakkee compares with previous versions
  795. X                        of make.
  796. X
  797. X     LLIIMMIITTSS             Limitations of ddmmaakkee.
  798. X
  799. X     PPOORRTTAABBIILLIITTYY        Comments on writing portable makefiles.
  800. X
  801. X     FFIILLEESS              Files used by ddmmaakkee.
  802. X
  803. X     SSEEEE AALLSSOO           Other related programs, and man pages.
  804. X
  805. X     AAUUTTHHOORR             The guy responsible for this thing.
  806. X
  807. X     BBUUGGSS               Hope not.
  808. X
  809. SSTTAARRTTUUPP
  810. X     When ddmmaakkee begins execution it first processes the command
  811. X     line and then processes an initial startup-makefile.  This
  812. X     is followed by an attempt to locate and process a user sup-
  813. X     plied makefile.  The startup file defines the default values
  814. X     of all required control macros and the set of default rules
  815. X     for making targets and inferences.  When searching for the
  816. X     startup makefile, ddmmaakkee searches the following locations, in
  817. X
  818. X
  819. X
  820. Version 3.70                    UW                              5
  821. X
  822. X
  823. X
  824. X
  825. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  826. X
  827. X
  828. X
  829. X     the order specified, until a startup file is located:
  830. X
  831. X          1.   The location given as the value of the macro MAK-
  832. X               ESTARTUP defined on the command line.
  833. X
  834. X          2.   The location given as the value of the environment
  835. X               variable MAKESTARTUP defined in the current
  836. X               environment.
  837. X
  838. X          3.   The location given as the value of the macro MAK-
  839. X               ESTARTUP defined internally within ddmmaakkee.
  840. X
  841. X     The above search is disabled by specifying the -r option on
  842. X     the command line.  An error is issued if a startup makefile
  843. X     cannot be found and the -r option was not specified.  A user
  844. X     may substitute a custom startup file by defining the MAKES-
  845. X     TARTUP environment variable or by redefining the MAKESTARTUP
  846. X     macro on the command line.  To determine where ddmmaakkee looks
  847. X     for the default startup file, check your environment or
  848. X     issue the command _"_d_m_a_k_e _-_V_".
  849. X
  850. X     A similar search is performed to locate a default user
  851. X     makefile when no --ff command line option is specified.  By
  852. X     default, the prerequisite list of the special target
  853. X     .MAKEFILES specifies the names of possible makefiles and the
  854. X     search order that ddmmaakkee should use to determine if one
  855. X     exists.  A typical definition for this target is:
  856. X
  857. X          .MAKEFILES : makefile.mk Makefile makefile
  858. X
  859. X     ddmmaakkee will first look for makefile.mk and then the others.
  860. X     If a prerequisite cannot be found ddmmaakkee will try to make it
  861. X     before going on to the next prerequisite.  For example,
  862. X     makefile.mk can be checked out of an RCS file if the proper
  863. X     rules for doing so are defined in the startup file.
  864. X
  865. SSYYNNTTAAXX
  866. X     This section is a summary of the syntax of makefile state-
  867. X     ments.  The description is given in a style similar to BNF,
  868. X     where { } enclose items that may appear zero or more times,
  869. X     and [ ] enclose items that are optional.  Alternative pro-
  870. X     ductions for a left hand side are indicated by '->', and
  871. X     newlines are significant.  All symbols in bboolldd type are text
  872. X     or names representing text supplied by the user.
  873. X
  874. X
  875. X
  876. X          Makefile -> { Statement }
  877. X
  878. X          Statement -> Macro-Definition
  879. X                    -> Conditional
  880. X                    -> Rule-Definition
  881. X
  882. X
  883. X
  884. Version 3.70                    UW                              6
  885. X
  886. X
  887. X
  888. X
  889. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  890. X
  891. X
  892. X
  893. X                    -> Attribute-Definition
  894. X
  895. X          Macro-Definition -> MMAACCRROO == LLIINNEE
  896. X                           -> MMAACCRROO **== LLIINNEE
  897. X                           -> MMAACCRROO ::== LLIINNEE
  898. X                           -> MMAACCRROO **::== LLIINNEE
  899. X                           -> MMAACCRROO ++== LLIINNEE
  900. X                           -> MMAACCRROO ++::== LLIINNEE
  901. X
  902. X          Conditional ->  ..IIFF expression
  903. X                             Makefile
  904. X                          [ ..EELLIIFF expression
  905. X                             Makefile ]
  906. X                          [ ..EELLSSEE
  907. X                             Makefile ]
  908. X                          ..EENNDD
  909. X
  910. X          expression -> LLIINNEE
  911. X                     -> SSTTRRIINNGG ==== LLIINNEE
  912. X                     -> SSTTRRIINNGG !!== LLIINNEE
  913. X
  914. X
  915. X          Rule-Definition ->  target-definition
  916. X                                 [ recipe ]
  917. X
  918. X          target-definition -> targets [attrs] op { PPRREERREEQQUUIISSIITTEE } [;; rcp-line]
  919. X
  920. X          targets -> target { targets }
  921. X                  -> ""target"" { targets }
  922. X
  923. X          target -> special-target
  924. X                 -> TTAARRGGEETT
  925. X
  926. X          attrs -> attribute { attrs }
  927. X                -> ""attribute"" { attrs }
  928. X
  929. X          op -> :: { modifier }
  930. X
  931. X          modifier -> ::
  932. X                   -> ^^
  933. X                   -> !!
  934. X                   -> --
  935. X
  936. X          recipe -> { TTAABB rcp-line }
  937. X                 -> [@@][%%][--] [[
  938. X                       { LLIINNEE }
  939. X                    ]]
  940. X
  941. X          rcp-line -> [@@][%%][--][++] LLIINNEE
  942. X
  943. X
  944. X
  945. X
  946. X
  947. X
  948. Version 3.70                    UW                              7
  949. X
  950. X
  951. X
  952. X
  953. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  954. X
  955. X
  956. X
  957. X          Attribute-Definition -> attrs :: targets
  958. X
  959. X
  960. X          attribute -> ..EEPPIILLOOGG
  961. X                    -> ..IIGGNNOORREE
  962. X                    -> ..LLIIBBRRAARRYY
  963. X                    -> ..MMKKSSAARRGGSS
  964. X                    -> ..NNOOIINNFFEERR
  965. X                    -> ..NNOOSSTTAATTEE
  966. X                    -> ..PPHHOONNYY
  967. X                    -> ..PPRREECCIIOOUUSS
  968. X                    -> ..PPRROOLLOOGG
  969. X                    -> ..SSEETTDDIIRR==_p_a_t_h
  970. X                    -> ..SSIILLEENNTT
  971. X                    -> ..SSEEQQUUEENNTTIIAALL
  972. X                    -> ..SSWWAAPP
  973. X                    -> ..UUSSEESSHHEELLLL
  974. X                    -> ..SSYYMMBBOOLL
  975. X                    -> ..UUPPDDAATTEEAALLLL
  976. X
  977. X          special-target -> ..EERRRROORR
  978. X                         -> ..EEXXPPOORRTT
  979. X                         -> ..GGRROOUUPPEEPPIILLOOGG
  980. X                         -> ..GGRROOUUPPPPRROOLLOOGG
  981. X                         -> ..IIMMPPOORRTT
  982. X                         -> ..IINNCCLLUUDDEE
  983. X                         -> ..IINNCCLLUUDDEEDDIIRRSS
  984. X                         -> ..MMAAKKEEFFIILLEESS
  985. X                         -> ..RREEMMOOVVEE
  986. X                         -> ..SSOOUURRCCEE
  987. X                         -> ..SSOOUURRCCEE.._s_u_f_f_i_x
  988. X                         -> ._s_u_f_f_i_x_1._s_u_f_f_i_x_2
  989. X
  990. X
  991. X     Where, TTAABB represents a <tab> character, SSTTRRIINNGG represents
  992. X     an arbitrary sequence of characters, and LLIINNEE represents a
  993. X     possibly empty sequence of characters terminated by a non-
  994. X     escaped (not immediately preceded by a backslash '\') new-
  995. X     line character.  MMAACCRROO, PPRREERREEQQUUIISSIITTEE, and TTAARRGGEETT each
  996. X     represent a string of characters not including space or tab
  997. X     which respectively form the name of a macro, prerequisite or
  998. X     target.  The name may itself be a macro expansion expres-
  999. X     sion.  A LLIINNEE can be continued over several physical lines
  1000. X     by terminating it with a single backslash character.  Com-
  1001. X     ments are initiated by the pound ## character and extend to
  1002. X     the end of line.  All comment text is discarded, a '#' may
  1003. X     be placed into the makefile text by escaping it with '\'
  1004. X     (ie. \# translates to # when it is parsed).  An exception to
  1005. X     this occurs when a # is seen inside a recipe line that
  1006. X     begins with a <tab> or is inside a group recipe.  If you
  1007. X     specify the --cc command line switch then this behavior is
  1008. X     disabled and ddmmaakkee will treat all # characters as start of
  1009. X
  1010. X
  1011. X
  1012. Version 3.70                    UW                              8
  1013. X
  1014. X
  1015. X
  1016. X
  1017. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1018. X
  1019. X
  1020. X
  1021. X     comment indicators unless they are escaped by \.  A set of
  1022. X     continued lines may be commented out by placing a single #
  1023. X     at the start of the first line.  A continued line cannot
  1024. X     span more than one makefile.
  1025. X
  1026. X     wwhhiittee ssppaaccee is defined to be any combination of <space>,
  1027. X     <tab>, and the sequence \<nl> when \<nl> is used to ter-
  1028. X     minate a LINE.  When processing mmaaccrroo definition lines, any
  1029. X     amount of white space is allowed on either side of the macro
  1030. X     operator (=, *=, :=, *:=, += or +:=), and white space is
  1031. X     stripped from both before and after the macro value string.
  1032. X     The sequence \<nl> is treated as white space during recipe
  1033. X     expansion and is deleted from the final recipe string.  You
  1034. X     must escape the \<nl> with another \ in order to get a \ at
  1035. X     the end of a recipe line.  The \<nl> sequence is deleted
  1036. X     from macro values when they are expanded.
  1037. X
  1038. X     When processing ttaarrggeett definition lines, the recipe for a
  1039. X     target must, in general, follow the first definition of the
  1040. X     target (See the RULES AND TARGETS section for an exception),
  1041. X     and the recipe may not span across multiple makefiles.  Any
  1042. X     targets and prerequisites found on a target definition line
  1043. X     are taken to be white space separated tokens.  The rule
  1044. X     operator (_o_p in SYNTAX section) is also considered to be a
  1045. X     token but does not require white space to precede or follow
  1046. X     it.  Since the rule operator begins with a `:', traditional
  1047. X     versions of make do not allow the `:' character to form a
  1048. X     valid target name.  ddmmaakkee allows `:' to be present in
  1049. X     target/prerequisite names as long as the entire
  1050. X     target/prerequisite name is quoted.  For example:
  1051. X
  1052. X          a:fred : test
  1053. X
  1054. X     would be parsed as TARGET = a, PREREQUISITES={fred, :,
  1055. X     test}, which is not what was intended.  To fix this you must
  1056. X     write:
  1057. X
  1058. X          "a:fred" : test
  1059. X
  1060. X     Which will be parsed as expected.  See the EXAMPLES section
  1061. X     for how to apply "" quoting to a list of targets.
  1062. X
  1063. AATTTTRRIIBBUUTTEESS
  1064. X     ddmmaakkee defines several target attributes.  Attributes may be
  1065. X     assigned to a single target, a group of targets, or to all
  1066. X     targets in the makefile.  Attributes are used to modify
  1067. X     ddmmaakkee actions during target update.  The recognized attri-
  1068. X     butes are:
  1069. X
  1070. X
  1071. X     ..EEPPIILLOOGG     Insert shell epilog code when executing a group
  1072. X                 recipe associated with any target having this
  1073. X
  1074. X
  1075. X
  1076. Version 3.70                    UW                              9
  1077. X
  1078. X
  1079. X
  1080. X
  1081. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1082. X
  1083. X
  1084. X
  1085. X                 attribute set.
  1086. X
  1087. X     ..IIGGNNOORREE     Ignore an error when trying to make any target
  1088. X                 with this attribute set.
  1089. X
  1090. X     ..LLIIBBRRAARRYY    Target is a library.
  1091. X
  1092. X     ..MMKKSSAARRGGSS    If running in an MSDOS environment then use MKS
  1093. X                 extended argument passing conventions to pass
  1094. X                 arguments to commands.  Non-MSDOS environments
  1095. X                 ignore this attribute.
  1096. X
  1097. X     ..NNOOIINNFFEERR    Any target with this attribute set will not be
  1098. X                 subjected to transitive closure if it is
  1099. X                 inferred as a prerequisite of a target whose
  1100. X                 recipe and prerequisites are being inferred.
  1101. X                 (i.e. the inference algorithm will not use any
  1102. X                 prerequisite with this attribute set, as a tar-
  1103. X                 get) If specified as '.NOINFER:' (ie. with no
  1104. SHAR_EOF
  1105. true || echo 'restore of dmake/man/dmake.p failed'
  1106. fi
  1107. echo 'End of part 15, continue with part 16'
  1108. echo 16 > _shar_seq_.tmp
  1109. exit 0
  1110.  
  1111. exit 0 # Just in case...
  1112. -- 
  1113. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1114. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1115. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1116. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1117.