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

  1. Newsgroups: comp.sources.misc
  2. subject: v14i020: dmake version 3.5 part 10/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 20
  7. Submitted-by: dvadura@watdragon.waterloo.edu (Dennis Vadura)
  8. Archive-name: dmake/part10
  9.  
  10. #!/bin/sh
  11. # this is part 10 of a multipart archive
  12. # do not concatenate these parts, unpack them in order with /bin/sh
  13. # file man/dmake.p continued
  14. #
  15. CurArch=10
  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.p"
  26. sed 's/^X//' << 'SHAR_EOF' >> man/dmake.p
  27. X
  28. X
  29. X
  30. XVersion 3.50                    UW                             10
  31. X
  32. X
  33. X
  34. X
  35. XDMAKE(p)               Unsupported Software               DMAKE(p)
  36. X
  37. X
  38. X
  39. X     assignment allows macro values to grow:
  40. X
  41. X          MACRO += LINE
  42. X
  43. X     adds the value of LINE to the previous value of MACRO
  44. X     separating the two by a single space (LINE is not expanded).
  45. X     The final form:
  46. X
  47. X          MACRO +:= LINE
  48. X
  49. X     is similar to ++==, with the difference that the value of LINE
  50. X     is expanded before being added to the previous value of
  51. X     MACRO.
  52. X
  53. X     When ddmmaakkee defines a non-environment macro it strips leading
  54. X     and trailing white space from the macro value.  Macros
  55. X     imported from the environment via either the .IMPORT special
  56. X     target (see the SPECIAL TARGETS section), or the --ee, or --EE
  57. X     flags are an exception to this rule.  Their values are
  58. X     always taken literally and white space is never stripped.
  59. X     In addition, macros defined using the .IMPORT special target
  60. X     do not have their values expanded when they are used within
  61. X     a makefile.  In contrast, environment macros that are
  62. X     imported due to the specification of the --ee or --EE flags are
  63. X     subject to expansion when used.
  64. X
  65. X     To specify a macro expansion enclose the name in () or {}
  66. X     and precede it with a dollar sign $.  Thus $(TEST)
  67. X     represents an expansion of the macro variable named TEST.
  68. X     If TEST is defined then $(TEST) is replaced by its expanded
  69. X     value.  If TEST is not defined then $(TEST) expands to the
  70. X     NULL string (this is equivalent to defining a macro as
  71. X     'TEST=' ).  A short form may be used for single character
  72. X     named macros.  In this case the parentheses are optional,
  73. X     and $(I) is equivalent to $I.  Macro expansion is recursive,
  74. X     hence if the value string contains an expression represent-
  75. X     ing a macro expansion, the expansion is performed.  Circular
  76. X     macro expansions are detected and cause an error to be
  77. X     issued.
  78. X
  79. X     When defining a macro the given macro name is first expanded
  80. X     before being used to define the macro.  Thus it is possible
  81. X     to define macros whose names depend on values of other mac-
  82. X     ros.  For example, suppose
  83. X
  84. X          CWD = $(PWD:b)
  85. X
  86. X     is defined, then the value of $(CWD) is the name of the
  87. X     current directory.  This can be used to define macros
  88. X     specific to this directory, for example:
  89. X
  90. X          _$(CWD).prt = list of files to print...
  91. X
  92. X
  93. X
  94. XVersion 3.50                    UW                             11
  95. X
  96. X
  97. X
  98. X
  99. XDMAKE(p)               Unsupported Software               DMAKE(p)
  100. X
  101. X
  102. X
  103. X     The actual name of the defined macro is a function of the
  104. X     current directory.  A construct such as this is useful when
  105. X     processing a hierarchy of directories using .SETDIR attri-
  106. X     buted targets and a collection of small distributed makefile
  107. X     stubs.
  108. X
  109. X     Macro variables may be defined within the makefile, on the
  110. X     command line, or imported from the environment.
  111. X
  112. X     ddmmaakkee supports several non-standard macro expansions: The
  113. X     first is of the form:
  114. X
  115. X          _$_(_m_a_c_r_o___n_a_m_e_:_m_o_d_i_f_i_e_r___l_i_s_t_:_m_o_d_i_f_i_e_r___l_i_s_t_:_._._._)
  116. X
  117. X     where _m_o_d_i_f_i_e_r___l_i_s_t is chosen from the set { D or d, F or f,
  118. X     B or b, S or s, T or t } and
  119. X
  120. X          d - directory portion of all path names
  121. X          f - file (including suffix) portion of path names
  122. X          b - file (not including suffix) portion of path names
  123. X          s - simple pattern substitution
  124. X          t - tokenization.
  125. X
  126. X     Thus if we have the example:
  127. X
  128. X          test = d1/d2/d3/a.out f.out d1/k.out
  129. X
  130. X     The following macro expansions produce the values on the
  131. X     right of '-->' after expansion.
  132. X
  133. X          $(test:d)            --> d1/d2/d3/ d1/
  134. X          $(test:b)            --> a f k
  135. X          $(test:f)            --> a.out f.out k.out
  136. X          ${test:db}           --> d1/d2/d3/a f d1/k
  137. X          ${test:s/out/in/:f}  --> a.in f.in k.in
  138. X          $(test:f:t"+")       --> a.out+f.out+k.out
  139. X
  140. X     If a token ends in a string composed from the value of the
  141. X     macro DIRBRKSTR (ie. ends in a directory separator string,
  142. X     e.g. '/' in UNIX) and you use the ::dd modifier then the
  143. X     expansion returns the directory name less the final direc-
  144. X     tory separator string.  Thus successive pairs of :d modif-
  145. X     iers each remove a level of directory in the token string.
  146. X
  147. X     The tokenization modifier takes all white space separated
  148. X     tokens from the macro value and separates them by the quoted
  149. X     separator string.  The separator string may contain the fol-
  150. X     lowing escape codes \a => <bel>, \b => <backspace>, \f =>
  151. X     <formfeed>, \n => <nl>, \r => <cr>, \t => <tab>, \v =>
  152. X     <vertical tab>, \" => ", and \xxx => <xxx> where xxx is the
  153. X     octal representation of a character.  Thus the expansion:
  154. X
  155. X
  156. X
  157. X
  158. XVersion 3.50                    UW                             12
  159. X
  160. X
  161. X
  162. X
  163. XDMAKE(p)               Unsupported Software               DMAKE(p)
  164. X
  165. X
  166. X
  167. X          $(test:f:t"+\n")
  168. X
  169. X     gives:
  170. X
  171. X          a.out+
  172. X          f.out+
  173. X          k.out
  174. X
  175. X     The second non-standard form of macro expansion allows for
  176. X     recursive macros.  It is possible to specify a $(_m_a_c_r_o___n_a_m_e)
  177. X     or ${_m_a_c_r_o___n_a_m_e} expansion where _m_a_c_r_o___n_a_m_e contains more $(
  178. X     ... ) or ${ ... } macro expansions itself.
  179. X
  180. X     For example $(CC$(_HOST)$(_COMPILER)) will first expand
  181. X     CC$(_HOST)$(_COMPILER) to get a result and use that result
  182. X     as the name of the macro to expand.  This is useful for
  183. X     writing a makefile for more than one target environment.  As
  184. X     an example consider the following hypothetical case. Suppose
  185. X     that _HOST and _COMPILER are imported from the environment
  186. X     and are set to represent the host machine type and the host
  187. X     compiler respectively.
  188. X
  189. X          CFLAGS_VAX_CC = -c -O    # _HOST == "_VAX", _COMPILER == "_CC"
  190. X          CFLAGS_PC_MSC = -c -ML   # _HOST == "_PC",  _COMPILER == "_MSC"
  191. X
  192. X          # redefine CFLAGS macro as:
  193. X
  194. X          CFLAGS := $(CFLAGS$(_HOST)$(_COMPILER))
  195. X
  196. X     This causes CFLAGS to take on a value that corresponds to
  197. X     the environment in which the make is being invoked.
  198. X
  199. X     The final non-standard macro expansion is of the form:
  200. X
  201. X          string1{token_list}string2
  202. X
  203. X     where string1, string2 and token_list are expanded.  After
  204. X     expansion, string1 is prepended to each token found in
  205. X     token_list and string2 is appended to each resulting token
  206. X     from the previous prepend.  string1 and string2 are not del-
  207. X     imited by white space whereas the tokens in token_list are.
  208. X     A null token in the token list is specified using "".  Thus
  209. X     using another example we have:
  210. X
  211. X          test/{f1 f2}.o            --> test/f1.o test/f2.o
  212. X          test/ {f1 f2}.o           --> test/ f1.o f2.o
  213. X          test/{f1 f2} .o           --> test/f1 test/f2 .o
  214. X          test/{ f1  "f2" "" }.o    --> test/f1.o test/f2.o
  215. X                                    test/.o
  216. X
  217. X          and
  218. X
  219. X
  220. X
  221. X
  222. XVersion 3.50                    UW                             13
  223. X
  224. X
  225. X
  226. X
  227. XDMAKE(p)               Unsupported Software               DMAKE(p)
  228. X
  229. X
  230. X
  231. X          test/{ d1 d2 }/{ f1 f2 }.o --> test/d1/f1.o
  232. X                                         test/d1/f2.o
  233. X                                         test/d2/f1.o
  234. X                                         test/d2/f2.o
  235. X
  236. X     See the SPECIAL MACROS section for a description of the spe-
  237. X     cial macros that ddmmaakkee defines and understands.
  238. X
  239. XRRUULLEESS AANNDD TTAARRGGEETTSS
  240. X     A makefile contains a series of entries that specify depen-
  241. X     dencies.  Such entries are called _t_a_r_g_e_t_/_p_r_e_r_e_q_u_i_s_i_t_e or
  242. X     _r_u_l_e definitions.  Each rule definition is optionally fol-
  243. X     lowed by a set of lines that provide a recipe for updating
  244. X     any targets defined by the rule.  Whenever ddmmaakkee attempts to
  245. X     bring a target up to date and an explicit recipe is provided
  246. X     with a rule defining the target, that recipe is used to
  247. X     update the target.  A rule definition begins with a line
  248. X     having the following syntax:
  249. X
  250. X          _<_t_a_r_g_e_t_s_> [_<_a_t_t_r_i_b_u_t_e_s_>] _<_r_u_l_e_o_p_> [_<_p_r_e_r_e_q_u_i_s_i_t_e_s_>] [;_<_r_e_c_i_p_e_>]
  251. X
  252. X     _t_a_r_g_e_t_s is a non-empty list of targets.  If the target is a
  253. X     special target (see SPECIAL TARGETS section below) then it
  254. X     must appear alone on the rule line.  For example:
  255. X
  256. X          .IMPORT .ERROR : ...
  257. X
  258. X     is not allowed since both .IMPORT and .ERROR are special
  259. X     targets.  Special targets are not used in the construction
  260. X     of the dependency graph and will not be made.
  261. X
  262. X     _a_t_t_r_i_b_u_t_e_s is a possibly empty list of attributes.  Any
  263. X     attribute defined in the ATTRIBUTES section above may be
  264. X     specified.  All attributes will be applied to the list of
  265. X     named targets in the rule definition.  No other targets will
  266. X     be affected.
  267. X
  268. X
  269. X     NOTE:   As stated earlier, if both the target list and
  270. X             prerequisite list are empty but the attributes list
  271. X             is not, then the specified attributes affect all
  272. X             targets in the makefile.
  273. X
  274. X
  275. X     _r_u_l_e_o_p is a separator which is used to identify the targets
  276. X     from the prerequisites.  Optionally it also provides a
  277. X     facility for modifying the way in which ddmmaakkee handles the
  278. X     making of the associated targets.  In its simplest form the
  279. X     operator is a single ':', and need not be separated by white
  280. X     space from its neighboring tokens.  It may additionally be
  281. X     followed by any of the modifiers { !, ^, -, : }, where:
  282. X
  283. X
  284. X
  285. X
  286. XVersion 3.50                    UW                             14
  287. X
  288. X
  289. X
  290. X
  291. XDMAKE(p)               Unsupported Software               DMAKE(p)
  292. X
  293. X
  294. X
  295. X     !!    says execute the recipe for the associated targets once
  296. X          for each out of date prerequisite.  Ordinarily the
  297. X          recipe is executed once for all out of date prere-
  298. X          quisites at the same time.
  299. X
  300. X     ^^    says to insert the specified prerequisites, if any,
  301. X          before any other prerequisites already associated with
  302. X          the specified targets.  In general, it is not useful to
  303. X          specify ^ with an empty list of prerequisites.
  304. X
  305. X     --    says to clear the previous list of prerequisites before
  306. X          adding the new prerequisites.  Thus,
  307. X
  308. X               .SUFFIXES :
  309. X               .SUFFIXES : .a .b
  310. X
  311. X          can be replaced by
  312. X
  313. X               .SUFFIXES :- .a .b
  314. X
  315. X          however the old form still works as expected.  NOTE:
  316. X          .SUFFIXES is ignored by ddmmaakkee it is used here simply as
  317. X          an example.
  318. X
  319. X     ::    When the rule operator is not modified by a second ':'
  320. X          only one set of rules may be specified for making a
  321. X          target.  Multiple definitions may be used to add to the
  322. X          list of prerequisites that a target depends on.  How-
  323. X          ever, if a target is multiply defined only one defini-
  324. X          tion may specify a recipe for making the target.
  325. X
  326. X          When a target's rule operator is modified by a second
  327. X          ':' (:: for example) then this definition may not be
  328. X          the only definition with a recipe for the target.
  329. X          There may be other :: target definition lines that
  330. X          specify a different set of prerequisites with a dif-
  331. X          ferent recipe for updating the target. Any such target
  332. X          is made if any of the definitions find it to be out of
  333. X          date with respect to the related prerequisites and uses
  334. X          the corresponding recipe to update the target.
  335. X
  336. X          In the following simple example, each rule has a `::'
  337. X          _r_u_l_e_o_p.  In such an operator we call the first `:' the
  338. X          operator, and the second `:' the modifier.
  339. X
  340. X          a.o :: a.c b.h
  341. X             first recipe for making a.o
  342. X
  343. X          a.o :: a.y b.h
  344. X             second recipe for making a.o
  345. X
  346. X          If a.o is found to be out of date with respect to a.c
  347. X
  348. X
  349. X
  350. XVersion 3.50                    UW                             15
  351. X
  352. X
  353. X
  354. X
  355. XDMAKE(p)               Unsupported Software               DMAKE(p)
  356. X
  357. X
  358. X
  359. X          then the first recipe is used to make a.o.  If it is
  360. X          found out of date with respect to a.y then the second
  361. X          recipe is used.  If a.o is out of date with respect to
  362. X          b.h then both recipes are invoked to make a.o.  In the
  363. X          last case the order of invocation corresponds to the
  364. X          order in which the rule definitions appear in the
  365. X          makefile.
  366. X
  367. X     Targets defined using a single `:' operator with a recipe
  368. X     may be redefined again with a new recipe by using a `:'
  369. X     operator with a `:' modifier.  This is equivalent to a tar-
  370. X     get having been initially defined with a rule using a `:'
  371. X     modifier.  Once a target is defined using a `:' modifier it
  372. X     may not be defined again with a recipe using only the `:'
  373. X     operator with no `:' modifier.  In both cases the use of a
  374. X     `:' modifier creates a new list of prerequisites and makes
  375. X     it the current prerequisite list for the target.  The `:'
  376. X     operator with no recipe always modifies the current list of
  377. X     prerequisites.  Thus assuming each of the following defini-
  378. X     tions has a recipe attached, then:
  379. X
  380. X          joe :  fred ...     (1)
  381. X          joe :: more ...     (2)
  382. X
  383. X          and
  384. X
  385. X          joe :: fred ...     (3)
  386. X          joe :: more ...     (4)
  387. X
  388. X     are legal and mean:  add the recipe associated with (2), or
  389. X     (4) to the set of recipes for joe, placing them after exist-
  390. X     ing recipes for making joe.  The construct:
  391. X
  392. X          joe :: fred ...     (5)
  393. X          joe : more ... (6)
  394. X
  395. X          and
  396. X
  397. X          joe : fred ... (7)
  398. X          joe : more ... (8)
  399. X
  400. X     are errors since we have two sets of perfectly good recipes
  401. X     for making the target.
  402. X
  403. X     _p_r_e_r_e_q_u_i_s_i_t_e_s is a possibly empty list of targets that must
  404. X     be brought up to date before making the current target.
  405. X
  406. X     _r_e_c_i_p_e is a short form and allows the user to specify short
  407. X     rule definitions on a single line.  It is taken to be the
  408. X     first recipe line in a larger recipe if additional lines
  409. X     follow the rule definition.  If the semi-colon is present
  410. X     but the recipe line is empty (ie. null string) then it is
  411. X
  412. X
  413. X
  414. XVersion 3.50                    UW                             16
  415. X
  416. X
  417. X
  418. X
  419. XDMAKE(p)               Unsupported Software               DMAKE(p)
  420. X
  421. X
  422. X
  423. X     taken to be an empty rule.  Any target so defined causes the
  424. X     _D_o_n_'_t _k_n_o_w _h_o_w _t_o _m_a_k_e _._._. error message to be suppressed
  425. X     when ddmmaakkee tries to make the target and fails.  This silence
  426. X     is maintained for rules that are terminated by a semicolon
  427. X     and have no following recipe lines, for targets listed on
  428. X     the command line, and for the first target found in the
  429. X     makefile.
  430. X
  431. XRREECCIIPPEESS
  432. X     The traditional format used by most versions of Make defines
  433. X     the recipe lines as arbitrary strings that may contain macro
  434. X     expansions.  They follow a rule definition line and may be
  435. X     spaced apart by comment or blank lines.  The list of recipe
  436. X     lines defining the recipe is terminated by a new target
  437. X     definition, a macro definition, or end-of-file.  Each recipe
  438. X     line MMUUSSTT begin with a <<TTAABB>> character which may optionally
  439. X     be followed with one or both of the characters _'_-_@_'.  The
  440. X     _'_-_' indicates that non-zero exit values (ie. errors) are to
  441. X     be ignored when this recipe line is executed, and the _'_@_'
  442. X     indicates that the recipe line should NOT be echoed to the
  443. X     terminal prior to being executed.  Both switches are off by
  444. X     default (ie. by default, errors are significant and commands
  445. X     are echoed).  Global settings activated via command line
  446. X     options or special attribute or target names may also affect
  447. X     these settings.  An example recipe:
  448. X
  449. X          target :
  450. X               first recipe line
  451. X               second recipe line, executed independently of the first.
  452. X               @a recipe line that is not echoed
  453. X               -and one that has errors ignored.
  454. X
  455. X     The second and new format of the recipe block begins the
  456. X     block with the character '[' (the open group character) in
  457. X     the last non-white space position of a line, and terminates
  458. X     the block with the character ']' (the close group character)
  459. X     in the first non-white space position of a line.  In this
  460. X     form each recipe line need not have a leading TAB.  This is
  461. X     called a recipe group.  Groups so defined are fed intact as
  462. X     a single unit to a shell for execution whenever the
  463. X     corresponding target needs to be updated.  If the open group
  464. X     character '[' is preceded by one or both of - or @ then they
  465. X     apply to the entire group in the same way that the - and @
  466. X     apply to single recipe lines.  See the MAKING TARGETS sec-
  467. X     tion for a description of how ddmmaakkee invokes recipes.  Here
  468. X     is an example of a group recipe:
  469. X
  470. X          target :
  471. X          [
  472. X               first recipe line
  473. X               second recipe line
  474. X               all of these recipe lines are fed to a
  475. X
  476. X
  477. X
  478. XVersion 3.50                    UW                             17
  479. X
  480. X
  481. X
  482. X
  483. XDMAKE(p)               Unsupported Software               DMAKE(p)
  484. X
  485. X
  486. X
  487. X               single copy of a shell for execution.
  488. X          ]
  489. X
  490. X
  491. XTTEEXXTT DDIIVVEERRSSIIOONNSS
  492. X     ddmmaakkee supports the notion of text diversions in recipes.  If
  493. X     a recipe line contains the character sequence <<++ it is
  494. X     recognized and a text diversion is started.  This causes
  495. X     ddmmaakkee to open a temporary file and to copy into that file
  496. X     all text that is found up to but not including the text
  497. X     diversion termination sequence ++>>.  Any diversions started
  498. X     with a <<++ must be terminated with a corresponding ++>>; the
  499. X     terminating ++>> may appear on the same or on a subsequent
  500. X     recipe line.  Nesting of diversions is not supported.
  501. X     New-lines provided in the recipe that forms the text of a
  502. X     diversion are inserted into the resulting temporary file at
  503. X     the appropriate locations.  The diversion text may contain
  504. X     the same escape codes as those described in the MACROS sec-
  505. X     tion.
  506. X
  507. X     The primary use of diversions is on systems (like MSDOS)
  508. X     that do not support long command lines.  The diversion makes
  509. X     it possible to produce a temporary file containing the argu-
  510. X     ments which can then be supplied to a utility via the tem-
  511. X     porary file.
  512. X
  513. X     Here are some examples:
  514. X
  515. X          all:
  516. X               cat <+this is a
  517. X               test of the text diversion+>
  518. X
  519. X     The above will cause ddmmaakkee to execute the command:
  520. X
  521. X          cat /tmp/mk12294AA
  522. X
  523. X     and the contents of the temporary file will be the text
  524. X     found between the <<++ and ++>> strings of the above recipe.
  525. X
  526. X          OBJ = fred.obj mary.obj joe.obj
  527. X          all : $(OBJ)
  528. X               link @<+$(^:t"+\n")\n+>
  529. X
  530. X     The result of making `all' in the second example is the com-
  531. X     mand:
  532. X
  533. X          link @/tmp/mk02394AA
  534. X
  535. X     where the temporary file contains:
  536. X
  537. X          fred.obj+
  538. X          mary.obj+
  539. X
  540. X
  541. X
  542. XVersion 3.50                    UW                             18
  543. X
  544. X
  545. X
  546. X
  547. XDMAKE(p)               Unsupported Software               DMAKE(p)
  548. X
  549. X
  550. X
  551. X          joe.obj
  552. X
  553. X     The last line of the file is terminated by a new-line which
  554. X     is inserted due to the \n placed immediately before the ++>>
  555. X     text diversion terminator.
  556. X
  557. X     If the environment variable TMPDIR is defined then the tem-
  558. X     porary file is created in the directory specified by that
  559. X     variable.  A makefile can change where temporary files are
  560. X     created by defining a macro named TMPDIR and exporting it
  561. X     using the .EXPORT special target.
  562. X
  563. XSSPPEECCIIAALL TTAARRGGEETTSS
  564. X     This section describes the special targets that are recog-
  565. X     nized by ddmmaakkee.  Some are affected by attributes and others
  566. X     are not.
  567. X
  568. X     ..EERRRROORR        If defined then the recipe associated with
  569. X                   this target is executed whenever an error con-
  570. X                   dition is detected by ddmmaakkee.  All attributes
  571. X                   that can be used with any other target may be
  572. X                   used with this target.  Any prerequisites of
  573. X                   this target will be brought up to date during
  574. X                   it's processing.  NOTE:  errors will be
  575. X                   ignored while making this target, in extreme
  576. X                   cases this may cause some problems.
  577. X
  578. X     ..EEXXPPOORRTT       All prerequisites associated with this target
  579. X                   are assumed to correspond to macro names and
  580. X                   they and their values are exported to the
  581. X                   environment as environment strings at the
  582. X                   point in the makefile at which this target
  583. X                   appears.  Any attributes specified with this
  584. X                   target are ignored.  Only macros which have
  585. X                   been assigned a value in the makefile prior to
  586. X                   the export directive are exported, macros as
  587. X                   yet undefined are not exported.
  588. X
  589. X     ..IIMMPPOORRTT       Prerequisite names specified for this target
  590. X                   are searched for in the environment and
  591. X                   defined as macros with their value taken from
  592. X                   the environment.  If the name cannot be found
  593. X                   in the environment an error message is issued.
  594. X                   .IMPORT accepts the .IGNORE attribute.  When
  595. X                   given, it causes ddmmaakkee to ignore the above
  596. X                   error.  See the MACROS section for a descrip-
  597. X                   tion of the processing of imported macro
  598. X                   values.
  599. X
  600. X     ..IINNCCLLUUDDEE      Parse another makefile just as if it had been
  601. X                   located at the point of the .INCLUDE in the
  602. X                   current makefile.  The list of prerequisites
  603. X
  604. X
  605. X
  606. XVersion 3.50                    UW                             19
  607. X
  608. X
  609. X
  610. X
  611. XDMAKE(p)               Unsupported Software               DMAKE(p)
  612. X
  613. X
  614. X
  615. X                   gives the list of makefiles to try to read.
  616. X                   If the list contains multiple makefiles then
  617. X                   they are read in order from left to right.
  618. X                   The following search rules are used when try-
  619. X                   ing to locate the file.  If the filename is
  620. X                   surrounded by " or just by itself then it is
  621. X                   searched for in the current directory.  If it
  622. X                   is not found it is then searched for in each
  623. X                   of the directories specified for the .INCLU-
  624. X                   DEDIRS special target.  If the file name is
  625. X                   surrounded by < and >, (ie.
  626. X                   <my_spiffy_new_makefile>) then it is searched
  627. X                   for only in the directories given by the
  628. X                   .INCLUDEDIRS special target.  In both cases if
  629. X                   the file name is a fully qualified name start-
  630. X                   ing at the root of the file system then it is
  631. X                   only searched for once, and the .INCLUDEDIRS
  632. X                   list is ignored.  .INCLUDE accepts the .IGNORE
  633. X                   and .SETDIR attributes.  If .IGNORE attribute
  634. X                   is given and the file cannot be found then
  635. X                   ddmmaakkee continues processing, otherwise an error
  636. X                   message is generated.  The .SETDIR attribute
  637. X                   causes ddmmaakkee to change directories to the
  638. X                   specified directory prior to attempting the
  639. X                   include operation.
  640. X
  641. X     ..IINNCCLLUUDDEEDDIIRRSS  The list of prerequisites specified for this
  642. X                   target defines the set of directories to
  643. X                   search when trying to include a makefile.
  644. X
  645. X     ..MMAAKKEEFFIILLEESS    The list of prerequisites is the set of files
  646. X                   to try to read as the default makefile.  By
  647. X                   default this target is defined as:
  648. X
  649. X                        .MAKEFILES : makefile.mk Makefile
  650. X                   makefile
  651. X
  652. X
  653. X     ..SSOOUURRCCEE       The prerequisite list of this target defines a
  654. X                   set of directories to check when trying to
  655. X                   locate a target file name.  See the section on
  656. X                   BINDING of targets for more information.
  657. X
  658. X     ..SSOOUURRCCEE..ssuuffff  The same as .SOURCE, except that the
  659. X                   .SOURCE.suff list is searched first when try-
  660. X                   ing to locate a file matching the a target
  661. X                   whose name ends in the suffix .suff.
  662. X
  663. X     ..RREEMMOOVVEE       The recipe of this target is used whenever
  664. X                   ddmmaakkee needs to remove intermediate targets
  665. X                   that were made but do not need to be kept
  666. X                   around.  Such targets result from the
  667. X
  668. X
  669. X
  670. XVersion 3.50                    UW                             20
  671. X
  672. X
  673. X
  674. X
  675. XDMAKE(p)               Unsupported Software               DMAKE(p)
  676. X
  677. X
  678. X
  679. X                   application of transitive closure on the
  680. X                   dependency graph.
  681. X
  682. X     In addition to the special targets above, several other
  683. X     forms of targets are recognized and are considered special,
  684. X     their exact form and use is defined in the sections that
  685. X     follow.
  686. X
  687. XSSPPEECCIIAALL MMAACCRROOSS
  688. X     ddmmaakkee defines a number of special macros.  They are divided
  689. X     into two classes: control macros and run-time macros.  The
  690. X     control macros are used by ddmmaakkee to configure it's actions,
  691. X     and are the preferred method of doing so.  In the case when
  692. X     a control macro has the same function as a special target or
  693. X     attribute they share the same name as the special target or
  694. X     attribute.  The run-time macros are defined when ddmmaakkee makes
  695. X     targets and may be used by the user inside recipes.  We
  696. X     first give the control macros and their meanings.
  697. X
  698. X     To use the control macros simply assign them a value just
  699. X     like any other macro.  The control macros are divided into
  700. X     three groups: string valued macros, character valued macros,
  701. X     and boolean valued macros.
  702. X
  703. X     The following are all of the string valued macros.  This
  704. X     list is also divided into three groups.  The first group
  705. X     gives the string valued macros that are defined internally
  706. X     and cannot be directly set by the user.
  707. X
  708. X     DDIIRRBBRRKKSSTTRR     Contains the string of chars used to terminate
  709. X                   the name of a directory in a pathname.  Under
  710. X                   UNIX it's value is "/", under MSDOS it's value
  711. X                   is "/\:".
  712. X
  713. X     IINNCCDDEEPPTTHH      This macro's value is a string of digits
  714. X                   representing the current depth of makefile
  715. X                   inclusion.  In the first makefile level this
  716. X                   value is zero.
  717. X
  718. X     MMFFLLAAGGSS        Is the list of flags that were given on the
  719. X                   command line including a leading switch char-
  720. X                   acter.  The -f flag is not included in this
  721. X                   list.
  722. X
  723. X     MMAAKKEECCMMDD       Is the name with which ddmmaakkee was invoked.
  724. X
  725. X     MMAAKKEEDDIIRR       Is the full path to the initial directory in
  726. X                   which ddmmaakkee was invoked.
  727. X
  728. X     MMAAKKEEFFIILLEE      Contains the string "-f _m_a_k_e_f_i_l_e" where,
  729. X                   _m_a_k_e_f_i_l_e is the name of initial user makefile
  730. X                   that was first read.
  731. X
  732. X
  733. X
  734. XVersion 3.50                    UW                             21
  735. X
  736. X
  737. X
  738. X
  739. XDMAKE(p)               Unsupported Software               DMAKE(p)
  740. X
  741. X
  742. X
  743. X     MMAAKKEEFFLLAAGGSS     Is the same as $(MFLAGS) but has no leading
  744. X                   switch character. (ie. MFLAGS = -$(MAKEFLAGS))
  745. X
  746. X     MMAAKKEEMMAACCRROOSS    Contains the complete list of macro expres-
  747. X                   sions that were specified on the command line.
  748. X
  749. X     MMAAXXPPRROOCCEESSSSLLIIMMIITT
  750. X                   Is a numeric string representing the maximum
  751. X                   number of processes that ddmmaakkee can use when
  752. X                   making targets in the parallel mode.
  753. X
  754. X     NNUULLLL          Is permanently defined to be the NULL string.
  755. X                   This is useful when comparing a conditional
  756. X                   expression to an NULL value.
  757. X
  758. X     PPWWDD           Is the full path to the current directory in
  759. X                   which make is executing.
  760. X
  761. X     TTMMDD           Stands for "To Make Dir", and is the path from
  762. X                   the present directory (value of $(PWD)) to the
  763. X                   directory that ddmmaakkee was started up in (value
  764. X                   of $(MAKEDIR)).  This macro is modified when
  765. X                   .SETDIR attributes are processed.
  766. X
  767. X
  768. X     The second group of string valued macros control ddmmaakkee
  769. X     behavior and may be set by the user.
  770. X
  771. X     ..SSEETTDDIIRR         If this macro is assigned a value then ddmmaakkee
  772. X                     will change to the directory given by that
  773. X                     value before making any targets.  This macro
  774. X                     is equivalent to the .SETDIR attribute.
  775. X                     Thus the two lines:
  776. X
  777. X                     .SETDIR=fred/hello :
  778. X
  779. X                     .SETDIR := fred/hello
  780. X
  781. X                     are completely equivalent.  The difference
  782. X                     being that the first is processed as a rule
  783. X                     definition and the other as a macro.
  784. X
  785. X     AAUUGGMMAAKKEE         If set to a non NULL value will enable the
  786. X                     transformation of special meta targets to
  787. X                     support special AUGMAKE inferences.
  788. X
  789. X     DDIIRRSSEEPPSSTTRR       Contains the string that is used to separate
  790. X                     directory components when path names are
  791. X                     constructed.  It is defined with a default
  792. X                     value at startup.
  793. X
  794. X
  795. X
  796. X
  797. X
  798. XVersion 3.50                    UW                             22
  799. X
  800. X
  801. X
  802. X
  803. XDMAKE(p)               Unsupported Software               DMAKE(p)
  804. X
  805. X
  806. X
  807. X     GGRROOUUPPFFLLAAGGSS      This macro gives the set of flags to pass to
  808. X                     the shell when invoking it to execute a
  809. X                     group recipe.  The value of the macro is the
  810. X                     list of flags with a leading switch indica-
  811. X                     tor.  (ie. `-' under UNIX)
  812. X
  813. X     GGRROOUUPPSSHHEELLLL      This macro defines the full path to the exe-
  814. X                     cutable image to be used as the shell when
  815. X                     processing group recipes.  This macro must
  816. X                     be defined if group recipes are used.  It is
  817. X                     assigned a default value in the startup
  818. X                     makefile.  Under UNIX this value is /bin/sh.
  819. X
  820. X     GGRROOUUPPSSUUFFFFIIXX     If defined, this macro gives the string to
  821. X                     use as a suffix when creating group recipe
  822. X                     files to be handed to the command inter-
  823. X                     preter.  For example, if it is defined as
  824. X                     .sh, then all temporary files created by
  825. X                     ddmmaakkee will end in the suffix .sh.  Under
  826. X                     MSDOS if you are using command.com as your
  827. X                     GROUPSHELL, then this suffix must be set to
  828. X                     .bat in order for group recipes to work
  829. X                     correctly.
  830. X
  831. X     MMAAKKEE            It is defined in the startup file by
  832. X                     default.  The string $(MAKE) is recognized
  833. X                     when using the -n option for single line
  834. X                     recipes.  Initially this macro is defined to
  835. X                     have the value "$(MAKECMD) $(MFLAGS)".
  836. X
  837. X     MMAAKKEESSTTAARRTTUUPP     This macro defines the full path to the ini-
  838. X                     tial startup makefile.  Use the --VV command
  839. X                     line option to discover it's initial value.
  840. X
  841. X     MMAAXXLLIINNEELLEENNGGTTHH   This macro defines the maximum size of a
  842. X                     single line of makefile input text.  The
  843. X                     size is specified as a number, the default
  844. X                     value is defined internally and is shown via
  845. X                     the --VV option.  A buffer of this size plus 2
  846. X                     is allocated for reading makefile text.  The
  847. X                     buffer is freed before any targets are made,
  848. X                     thereby allowing files containing long input
  849. X                     lines to be processed without consuming
  850. X                     memory during the actual make.
  851. X
  852. X     MMAAXXPPRROOCCEESSSS      Specify the maximum number of child
  853. X                     processes to use when making targets.  The
  854. X                     default value of this macro is "1" and it's
  855. X                     value cannot exceed the value of the macro
  856. X                     MAXPROCESSLIMIT.  Setting the value of MAX-
  857. X                     PROCESS on the command line or in the
  858. X                     makefile is equivalent to supplying a
  859. X
  860. X
  861. X
  862. XVersion 3.50                    UW                             23
  863. X
  864. X
  865. X
  866. X
  867. XDMAKE(p)               Unsupported Software               DMAKE(p)
  868. X
  869. X
  870. X
  871. X                     corresponding value to the -P flag on the
  872. X                     command line.
  873. X
  874. X     PPRREEPP            This macro defines the number of iterations
  875. X                     to be expanded automatically when processing
  876. X                     % rule definitions of the form:
  877. X
  878. X                     % : %.suff
  879. X
  880. X                     See the sections on PERCENT(%) RULES for
  881. X                     details on how PREP is used.
  882. X
  883. X     SSHHEELLLL           This macro defines the full path to the exe-
  884. X                     cutable image to be used as the shell when
  885. X                     processing single line recipes.  This macro
  886. X                     must be defined if recipes requiring the
  887. X                     shell for execution are to be used.  It is
  888. X                     assigned a default value in the startup
  889. X                     makefile.  Under UNIX this value is /bin/sh.
  890. X
  891. X     SSHHEELLLLFFLLAAGGSS      This macro gives the set of flags to pass to
  892. X                     the shell when invoking it to execute a sin-
  893. X                     gle line recipe.  The value of the macro is
  894. X                     the list of flags with a leading switch
  895. X                     indicator.  (ie. `-' under UNIX)
  896. X
  897. X     SSHHEELLLLMMEETTAASS      Each time ddmmaakkee executes a single recipe
  898. X                     line (not a group recipe) the line is
  899. X                     searched for any occurrence of a character
  900. X                     defined in the value of SHELLMETAS.  If such
  901. X                     a character is found the recipe line is
  902. X                     defined to require a shell to ensure it's
  903. X                     correct execution.  In such instances a
  904. X                     shell is used to invoke the recipe line.  If
  905. X                     no match is found the recipe line is exe-
  906. X                     cuted without the use of a shell.
  907. X
  908. X
  909. X     There is only one character valued macro defined by ddmmaakkee:
  910. X     SSWWIITTCCHHAARR contains the switch character used to introduce
  911. X     options on command lines.  On UNIX it's value is '-', on
  912. X     MSDOS it's value may be '/' or '-'.  The macro is internally
  913. X     defined and is not user setable.
  914. X
  915. X     All boolean macros currently understood by ddmmaakkee correspond
  916. X     directly to the previously defined attributes.  These macros
  917. X     provide a second way to apply global attributes, and
  918. X     represent the preferred method of doing so.  They are used
  919. X     by assigning them a value.  If the value is not a NULL
  920. X     string then the boolean condition is set to on.  If the
  921. X     value is a NULL string then the condition is set to off.
  922. X     There are five conditions defined and they correspond
  923. X
  924. X
  925. X
  926. XVersion 3.50                    UW                             24
  927. X
  928. X
  929. X
  930. X
  931. XDMAKE(p)               Unsupported Software               DMAKE(p)
  932. X
  933. X
  934. X
  935. X     directly to the attributes of the same name.  Their meanings
  936. X     are defined in the ATTRIBUTES section above.  The macros
  937. X     are: ..EEPPIILLOOGG, ..IIGGNNOORREE, ..PPRREECCIIOOUUSS, ..PPRROOLLOOGG, and ..SSIILLEENNTT.
  938. X     Assigning any of these a non NULL value will turn on the
  939. X     corresponding attribute on a global scale.
  940. X
  941. X     The second class of macros is the run-time macros.  These
  942. X     macros are defined when ddmmaakkee is making targets, and may
  943. X     take on different values for each target.  $$@@ is defined to
  944. X     be the full target name, $$?? is the list of all out of date
  945. X     prerequisites, $$&& is the list of all prerequisites, $$>> is
  946. X     the name of the library if the current target is a library
  947. X     member, $$<< is the list of prerequisites specified in the
  948. X     current rule (this includes any inferred prerequisites), $$**
  949. X     is defined as $$((@@::ddbb)) when making targets with explicit
  950. X     recipes and is defined as the value of % when making targets
  951. X     whose recipe is the result of an inference.  In the first
  952. X     case $$** is the target name with no suffix, and in the latter
  953. X     is the value of the matched % pattern from the associated
  954. X     %-rule.  $$^^ expands to the set of out of date prerequisites
  955. X     taken from the current value of $$<<.  In addition to these,
  956. SHAR_EOF
  957. echo "End of part 10"
  958. echo "File man/dmake.p is continued in part 11"
  959. echo "11" > s2_seq_.tmp
  960. exit 0
  961.  
  962.