home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume15 / dmake-3.6 / part18 < prev    next >
Text File  |  1990-10-14  |  40KB  |  1,115 lines

  1. Newsgroups: comp.sources.misc
  2. X-UNIX-From: dvadura@watdragon.waterloo.edu
  3. subject: v15i070: dmake version 3.6 (part 18/25)
  4. from: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  5. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  6.  
  7. Posting-number: Volume 15, Issue 70
  8. Submitted-by: Dennis Vadura <dvadura@watdragon.waterloo.edu>
  9. Archive-name: dmake-3.6/part18
  10.  
  11. #!/bin/sh
  12. # this is part 18 of a multipart archive
  13. # do not concatenate these parts, unpack them in order with /bin/sh
  14. # file man/dmake.nc continued
  15. #
  16. CurArch=18
  17. if test ! -r s2_seq_.tmp
  18. then echo "Please unpack part 1 first!"
  19.      exit 1; fi
  20. ( read Scheck
  21.   if test "$Scheck" != $CurArch
  22.   then echo "Please unpack part $Scheck next!"
  23.        exit 1;
  24.   else exit 0; fi
  25. ) < s2_seq_.tmp || exit 1
  26. echo "x - Continuing file man/dmake.nc"
  27. sed 's/^X//' << 'SHAR_EOF' >> man/dmake.nc
  28. X     target file name with a trailing ,v attached to the previous
  29. X     result.
  30. X
  31. X     dmake can also infer indirect prerequisites.  An inferred
  32. X     target can have a list of prerequisites added that will not
  33. X     show up in the value of $< but will show up in the value of
  34. X     $? and $&.  Indirect prerequisites are specified in an
  35. X     inference rule by quoting the prerequisite with single
  36. X     quotes.  For example, if you had the explicit dependency:
  37. X
  38. X          fred.o : fred.c ; rule to make fred.o
  39. X          fred.o : local.h
  40. X
  41. X     then this can be infered for fred.o from the following
  42. X     inference rule:
  43. X
  44. X          %.o : %.c 'local.h' ; rule to make a .o from a .c
  45. X
  46. X     You may infer indirect prerequisites that are a function of
  47. X
  48. X
  49. X
  50. XVersion 3.50                    UW                             33
  51. X
  52. X
  53. X
  54. X
  55. XDMAKE(p)               Unsupported Software               DMAKE(p)
  56. X
  57. X
  58. X
  59. X     the value of '%' in the current rule.  The meta-rule:
  60. X
  61. X          %.o : %.c '$(INC)/%.h' ; rule to make a .o from a .c
  62. X
  63. X     infers an indirect prerequisite found in the INC directory
  64. X     whose name is the same as the expansion of $(INC), and the
  65. X     prerequisite name depends on the base name of the current
  66. X     target.  The set of indirect prerequisites is attached to
  67. X     the meta rule in which they are specified and are inferred
  68. X     only if the rule is used to infer a recipe for a target.
  69. X     They do not play an active role in driving the inference
  70. X     algorithm.  The construct:
  71. X
  72. X          %.o : %.c %.f 'local.h'; recipe
  73. X
  74. X     is equivalent to:
  75. X
  76. X          %.o : %.c 'local.h' : recipe
  77. X          %.o : %.f 'local.h' : recipe
  78. X
  79. X
  80. X     If any of the attributes .SETDIR, .EPILOG, .PROLOG, .SILENT,
  81. X     .USESHELL, .SWAP, .PRECIOUS, .LIBRARY, and .IGNORE are given
  82. X     for a %-rule then when that rule is bound to a target as the
  83. X     result of an inference, the target's set of attributes is
  84. X     augmented by the attributes from the above set that are
  85. X     specified in the bound %-rule.  Other attributes specified
  86. X     for %-meta rules are not inherited by the target.  The .SET-
  87. X     DIR attribute is treated in a special way.  If the target
  88. X     already had a .SETDIR attribute set and the bound %-rule
  89. X     also specified a .SETDIR attribute then the one originally
  90. X     specified with the target prevails.  During inference any
  91. X     .SETDIR attributes for the inferred prerequisite are
  92. X     honored.  The directories must exist for a %-meta rule to be
  93. X     selected as a possible inference path.  If the directories
  94. X     do not exist no error message is issued, instead the
  95. X     corresponding path in the inference graph is simply
  96. X     rejected.
  97. X
  98. X     dmake also supports the old format special target
  99. X     .<suffix>.<suffix> by identifying any rules of this form and
  100. X     mapping them to the appropriate %-rule.  So for example if
  101. X     an old makefile contains the construct:
  102. X
  103. X          .c.o :; cc -c $< -o $@
  104. X
  105. X     dmake maps this into the following %-rule:
  106. X
  107. X          %.o : %.c; cc -c $< -o $@
  108. X
  109. X     Furthermore, dmake understands several SYSV AUGMAKE special
  110. X     targets and maps them into corresponding %-meta rules.
  111. X
  112. X
  113. X
  114. XVersion 3.50                    UW                             34
  115. X
  116. X
  117. X
  118. X
  119. XDMAKE(p)               Unsupported Software               DMAKE(p)
  120. X
  121. X
  122. X
  123. X     These transformation must be enabled by providing the -A
  124. X     flag on the command line or by setting the value of AUGMAKE
  125. X     to non NULL.  The construct
  126. X
  127. X          .suff :; recipe
  128. X
  129. X     gets mapped into:
  130. X
  131. X          % : %.suff; recipe
  132. X
  133. X     and the construct
  134. X
  135. X          .c~.o :; recipe
  136. X
  137. X     gets mapped into:
  138. X
  139. X          %.o : s.%.c ; recipe
  140. X
  141. X     In general, a special target of the form .<str>~ is replaced
  142. X     by the %-rule construct s.%.<str>, thereby providing support
  143. X     for the syntax used by SYSV AUGMAKE for providing SCCS sup-
  144. X     port.  When enabled, these mappings allow processing of
  145. X     existing SYSV makefiles without modifications.
  146. X
  147. X     dmake bases all of it's inferences on the inference graph
  148. X     constructed from the %-rules defined in the makefile.  It
  149. X     knows exactly which targets can be made from which prere-
  150. X     quisites by making queries on the inference graph.  For this
  151. X     reason .SUFFIXES is not needed and is completely ignored.
  152. X
  153. X     For a %-meta rule to be inferred as the rule whose recipe
  154. X     will be used to make a target, the target's name must match
  155. X     the %-target pattern, and any inferred %-prerequisite must
  156. X     already exist or have an explicit recipe so that the prere-
  157. X     quisite can be made.  Without transitive closure on the
  158. X     inference graph the above rule describes precisely when an
  159. X     inference match terminates the search.  If transitive clo-
  160. X     sure is enabled (the usual case), and a prerequisite does
  161. X     not exist or cannot be made, then dmake invokes the infer-
  162. X     ence algorithm recursively on the prerequisite to see if
  163. X     there is some way the prerequisite can be manufactured.  For
  164. X     if the prerequisite can be made then the current target can
  165. X     also be made using the current %-meta rule.  This means that
  166. X     there is no longer a need to give a rule for making a .o
  167. X     from a .y if you have already given a rule for making a .o
  168. X     from a .c and a .c from a .y.  In such cases dmake can infer
  169. X     how to make the .o from the .y via the intermediary .c and
  170. X     will remove the .c when the .o is made.  Transitive closure
  171. X     can be disabled by giving the -T switch on the command line.
  172. X
  173. X     A word of caution.  dmake bases its transitive closure on
  174. X     the %-meta rule targets.  When it performs transitive
  175. X
  176. X
  177. X
  178. XVersion 3.50                    UW                             35
  179. X
  180. X
  181. X
  182. X
  183. XDMAKE(p)               Unsupported Software               DMAKE(p)
  184. X
  185. X
  186. X
  187. X     closure it infers how to make a target from a prerequisite
  188. X     by performing a pattern match as if the potential prere-
  189. X     quisite were a new target.  The set of rules:
  190. X
  191. X          %.o : %.c :; rule for making .o from .c
  192. X          %.c : %.y :; rule for making .c from .y
  193. X          % : RCS/%,v :; check out of RCS file
  194. X
  195. X     will, by performing transitive closure, allow dmake to infer
  196. X     how to make a .o from a .y using a .c as an intermediate
  197. X     temporary file.  Additionally it will be able to infer how
  198. X     to make a .y from an RCS file, as long as that RCS file is
  199. X     in the RCS directory and has a name which ends in .y,v.  The
  200. X     transitivity computation is performed dynamically for each
  201. X     target that does not have a recipe.  This has potential to
  202. X     be very slow if the %-meta rules are not carefully speci-
  203. X     fied.  The .NOINFER attribute is used to mark a %-meta node
  204. X     as being a final target during inference.  Any node with
  205. X     this attribute set will not be used for subsequent infer-
  206. X     ences.  As an example the node RCS/%,v is marked as a final
  207. X     node since we know that if the RCS file does not exist there
  208. X     likely is no other way to make it.  Thus the standard
  209. X     startup makefile contains the entry:
  210. X          .NOINFER : RCS/%,v
  211. X     Thereby indicating that the RCS file is the end of the
  212. X     inference chain.
  213. X
  214. X     dmake tries to remove intermediate files resulting from
  215. X     transitive closure if the file is not marked as being PRE-
  216. X     CIOUS, or the -u flag was not given on the command line, and
  217. X     if the inferred intermediate did not previously exist.
  218. X     Intermediate targets that existed prior to being made are
  219. X     never removed.  This is in keeping with the philosophy that
  220. X     dmake should never remove things from the file system that
  221. X     it did not add.  If the special target .REMOVE is defined
  222. X     and has a recipe then dmake constructs a list of the inter-
  223. X     mediate files to be removed and makes them prerequisites of
  224. X     .REMOVE.  It then makes .REMOVE thereby removing the prere-
  225. X     quisites if the recipe of .REMOVE says to.  Typically
  226. X     .REMOVE is defined in the startup file as:
  227. X
  228. X          ".REMOVE :; $(RM) $<".
  229. X
  230. XMAKING TARGETS
  231. X     In order to update a target dmake must execute a recipe.
  232. X     When a recipe needs to be executed it is first expanded so
  233. X     that any macros in the recipe text are expanded, and it is
  234. X     then either executed directly or passed to a shell.  dmake
  235. X     supports two types of recipes.  The regular recipes and
  236. X     group recipes.
  237. X
  238. X
  239. X
  240. X
  241. X
  242. XVersion 3.50                    UW                             36
  243. X
  244. X
  245. X
  246. X
  247. XDMAKE(p)               Unsupported Software               DMAKE(p)
  248. X
  249. X
  250. X
  251. X     When a regular recipe is invoked dmake executes each line of
  252. X     the recipe separately using a new copy of a shell if a shell
  253. X     is required.  Thus effects of commands do not generally per-
  254. X     sist across recipe lines.  (e.g. cd requests in a recipe
  255. X     line do not carry over to the next recipe line) The decision
  256. X     on whether a shell is required to execute a command is based
  257. X     on the value of the macro SHELLMETAS or on the specification
  258. X     of '+' or .USESHELL for the current recipe or target respec-
  259. X     tively.  If any character in the value of SHELLMETAS is
  260. X     found in the expanded recipe text-line or the use of a shell
  261. X     is requested explicitly via '+' or .USESHELL then the com-
  262. X     mand is executed using a shell, otherwise the command is
  263. X     executed directly.  The shell that is used for execution is
  264. X     given by the value of the macro SHELL.  The flags that are
  265. X     passed to the shell are given by the value of SHELLFLAGS.
  266. X     Thus dmake constructs the command line:
  267. X
  268. X          $(SHELL) $(SHELLFLAGS) $(expanded_recipe_command)
  269. X
  270. X     Normally dmake writes the command line that it is about to
  271. X     invoke to standard output.  If the .SILENT attribute is set
  272. X     for the target or for the recipe line (via @), then the
  273. X     recipe line is not echoed.
  274. X
  275. X     Group recipe processing is similar to that of regular
  276. X     recipes, except that a shell is always invoked.  The shell
  277. X     that is invoked is given by the value of the macro GROUP-
  278. X     SHELL, and its flags are taken from the value of the macro
  279. X     GROUPFLAGS.  If a target has the .PROLOG attribute set then
  280. X     dmake prepends to the shell script the recipe associated
  281. X     with the special target .GROUPPROLOG, and if the attribute
  282. X     .EPILOG is set as well, then the recipe associated with the
  283. X     special target .GROUPEPILOG is appended to the script file.
  284. X     This facility can be used to always prepend a common header
  285. X     and common trailer to group recipes.  Group recipes are
  286. X     echoed to standard output just like standard recipes, but
  287. X     are enclosed by lines beginning with [ and ].
  288. X
  289. XMAKING LIBRARIES
  290. X     Libraries are easy to maintain using dmake.  A library is a
  291. X     file containing a collection of object files.  Thus to make
  292. X     a library you simply specify it as a target with the
  293. X     .LIBRARY attribute set and specify its list of prere-
  294. X     quisites.  The prerequisites should be the object members
  295. X     that are to go into the library.  When dmake makes the
  296. X     library target it uses the .LIBRARY attribute to pass to the
  297. X     prerequisites the .LIBMEMBER attribute and the name of the
  298. X     library.  This enables the file binding mechanism to look
  299. X     for the member in the library if an appropriate object file
  300. X     cannot be found. A small example best illustrates this.
  301. X
  302. X          mylib.a .LIBRARY : mem1.o mem2.o mem3.o
  303. X
  304. X
  305. X
  306. XVersion 3.50                    UW                             37
  307. X
  308. X
  309. X
  310. X
  311. XDMAKE(p)               Unsupported Software               DMAKE(p)
  312. X
  313. X
  314. X
  315. X               rules for making library...
  316. X               # remember to remove .o's when lib is made
  317. X
  318. X          # equivalent to:  '%.o : %.c ; ...'
  319. X          .c.o :; rules for making .o from .c say
  320. X
  321. X     dmake will use the .c.o rule for making the library members
  322. X     if appropriate .c files can be found using the search rules.
  323. X     NOTE:  this is not specific in any way to C programs, they
  324. X     are simply used as an example.
  325. X
  326. X     dmake tries to handle the old library construct format in a
  327. X     sensible way.  The construct lib(member.o) is separated and
  328. X     the lib portion is declared as a library target.  The new
  329. X     target is defined with the .LIBRARY attribute set and the
  330. X     member.o portion of the construct is declared as a prere-
  331. X     quisite of the lib target.  If the construct lib(member.o)
  332. X     appears as a prerequisite of a target in the makefile, that
  333. X     target has the new name of the lib assigned as it's prere-
  334. X     quisite.  Thus the following example:
  335. X
  336. X          a.out : ml.a(a.o) ml.a(b.o); $(CC) -o $@  $<
  337. X
  338. X          .c.o :; $(CC) -c $(CFLAGS) -o $@  $<
  339. X          %.a:
  340. X               ar rv $@ $<
  341. X               ranlib $@
  342. X               rm -rf $<
  343. X
  344. X     constructs the following dependency graph.
  345. X
  346. X          a.out : ml.a; $(CC) -o $@  $<
  347. X          ml.a .LIBRARY : a.o b.o
  348. X
  349. X          %.o : %.c ; $(CC) -c $(CFLAGS) -o $@  $<
  350. X          %.a :
  351. X               ar rv $@ $<
  352. X               ranlib $@
  353. X               rm -rf $<
  354. X
  355. X     and making a.out then works as expected.
  356. X
  357. X     The same thing happens for any target of the form
  358. X     lib((entry)).  These targets have an additional feature in
  359. X     that the entry target has the .SYMBOL attribute set automat-
  360. X     ically.
  361. X
  362. X     NOTE:  If the notion of entry points is supported by the
  363. X     archive and by dmake (currently not the case) then dmake
  364. X     will search the archive for the entry point and return not
  365. X     only the modification time of the member which defines the
  366. X     entry but also the name of the member file.  This name will
  367. X
  368. X
  369. X
  370. XVersion 3.50                    UW                             38
  371. X
  372. X
  373. X
  374. X
  375. XDMAKE(p)               Unsupported Software               DMAKE(p)
  376. X
  377. X
  378. X
  379. X     then replace entry and will be used for making the member
  380. X     file.  Once bound to an archive member the .SYMBOL attribute
  381. X     is removed from the target.  This feature is presently dis-
  382. X     abled as there is little standardization among archive for-
  383. X     mats, and we have yet to find a makefile utilizing this
  384. X     feature (possibly due to the fact that it is unimplemented
  385. X     in most versions of UNIX Make).
  386. X
  387. XMULTI PROCESSING
  388. X     If the architecture supports it then dmake is capable of
  389. X     making a target's prerequisites in parallel.  dmake will
  390. X     make as much in parallel as it can and use a number of child
  391. X     processes up to the maximum specified by MAXPROCESS or by
  392. X     the value supplied to the -P command line flag.  A parallel
  393. X     make is enabled by setting the value of MAXPROCESS (either
  394. X     directly or via -P option) to a value which is > 1.  dmake
  395. X     guarantees that all dependencies as specified in the
  396. X     makefile are honored.  A target will not be made until all
  397. X     of its prerequisites have been made.  If a parallel make is
  398. X     being performed then the following restrictions on parallel-
  399. X     ism are enforced.
  400. X
  401. X          1.   Individual recipe lines in a non-group recipe are
  402. X               performed sequentially in the order in which they
  403. X               are specified within the makefile and in parallel
  404. X               with the recipes of other targets.
  405. X
  406. X          2.   If a target contains multiple recipe definitions
  407. X               (cf. :: rules) then these are performed sequen-
  408. X               tially in the order in which the :: rules are
  409. X               specified within the makefile and in parallel with
  410. X               the recipes of other targets.
  411. X
  412. X          3.   If a target rule contains the `!' modifier, then
  413. X               the recipe is performed sequentially for the list
  414. X               of outdated prerequisites and in parallel with the
  415. X               recipes of other targets.
  416. X
  417. X          4.   If a target has the .SEQUENTIAL attribute set then
  418. X               all of its prerequisites are made sequentially
  419. X               relative to one another (as if MAXPROCESS=1), but
  420. X               in parallel with other targets in the makefile.
  421. X
  422. X     Note:  If you specify a parallel make then the order of tar-
  423. X     get update and the order in which the associated recipes are
  424. X     invoked will not correspond to that displayed by the -n
  425. X     flag.
  426. X
  427. XCONDITIONALS
  428. X     dmake supports a makefile construct called a conditional.
  429. X     It allows the user to conditionally select portions of
  430. X     makefile text for input processing and to discard other
  431. X
  432. X
  433. X
  434. XVersion 3.50                    UW                             39
  435. X
  436. X
  437. X
  438. X
  439. XDMAKE(p)               Unsupported Software               DMAKE(p)
  440. X
  441. X
  442. X
  443. X     portions.  This becomes useful for writing makefiles that
  444. X     are intended to function for more than one target host and
  445. X     environment.  The conditional expression is specified as
  446. X     follows:
  447. X
  448. X          .IF  expression
  449. X             ... if text ...
  450. X          .ELSE
  451. X             ... else text ...
  452. X          .END
  453. X
  454. X     The .ELSE portion is optional, and the conditionals may be
  455. X     nested (ie.  the text may contain another conditional).
  456. X     .IF, .ELSE, and .END may appear anywhere in the makefile,
  457. X     but a single conditional expression may not span multiple
  458. X     makefiles.
  459. X
  460. X     expression can be one of the following three forms:
  461. X
  462. X          <text> | <text> == <text> | <text> != <text>
  463. X
  464. X     where text is either text or a macro expression.  In any
  465. X     case, before the comparison is made, the expression is
  466. X     expanded.  The text portions are then selected and compared.
  467. X     White space at the start and end of the text portion is dis-
  468. X     carded before the comparison.  This means that a macro that
  469. X     evaluates to nothing but white space is considered a NULL
  470. X     value for the purpose of the comparison.  In the first case
  471. X     the expression evaluates TRUE if the text is not NULL other-
  472. X     wise it evaluates FALSE.  The remaining two cases both
  473. X     evaluate the expression on the basis of a string comparison.
  474. X     If a macro expression needs to be equated to a NULL string
  475. X     then compare it to the value of the macro $(NULL).
  476. X
  477. XEXAMPLES
  478. X          # A simple example showing how to use make
  479. X          #
  480. X          prgm : a.o b.o
  481. X               cc a.o b.o -o prgm
  482. X          a.o : a.c g.h
  483. X               cc a.c -o $@
  484. X          b.o : b.c g.h
  485. X               cc b.c -o $@
  486. X
  487. X     In the previous example prgm is remade only if a.o and/or
  488. X     b.o is out of date with respect to prgm.  These dependencies
  489. X     can be stated more concisely by using the inference rules
  490. X     defined in the standard startup file.  The default rule for
  491. X     making .o's from .c's looks something like this:
  492. X
  493. X          %.o : %.c; cc -c $(CFLAGS) -o $@ $<
  494. X
  495. X
  496. X
  497. X
  498. XVersion 3.50                    UW                             40
  499. X
  500. X
  501. X
  502. X
  503. XDMAKE(p)               Unsupported Software               DMAKE(p)
  504. X
  505. X
  506. X
  507. X     Since there exists a rule (defined in the startup file) for
  508. X     making .o's from .c's dmake will use that rule for manufac-
  509. X     turing a .o from a .c and we can specify our dependencies
  510. X     more concisely.
  511. X
  512. X          prgm : a.o b.o
  513. X               cc -o prgm $<
  514. X          a.o b.o : g.h
  515. X
  516. X     A more general way to say the above using the new macro
  517. X     expansions would be:
  518. X
  519. X          SRC = a b
  520. X          OBJ = {$(SRC)}.o
  521. X
  522. X          prgm : $(OBJ)
  523. X               cc -o $@ $<
  524. X
  525. X          $(OBJ) : g.h
  526. X
  527. X     If we want to keep the objects in a separate directory,
  528. X     called objdir, then we would write something like this.
  529. X
  530. X          SRC = a b
  531. X          OBJ = {$(SRC)}.o
  532. X
  533. X          prgm : $(OBJ)
  534. X               cc $< -o $@
  535. X
  536. X          $(OBJ) : g.h
  537. X          %.o : %.c
  538. X               $(CC) -c $(CFLAGS) -o $(@:f) $<
  539. X               mv $(@:f) objdir
  540. X
  541. X          .SOURCE.o : objdir       # tell make to look here for .o's
  542. X
  543. X     An example of building library members would go something
  544. X     like this: (NOTE:  The same rules as above will be used to
  545. X     produce .o's from .c's)
  546. X
  547. X          SRC  = a b
  548. X          LIB  = lib
  549. X          LIBm = { $(SRC) }.o
  550. X
  551. X          prgm: $(LIB)
  552. X               cc -o $@ $(LIB)
  553. X
  554. X          $(LIB) .LIBRARY : $(LIBm)
  555. X               ar rv $@ $<
  556. X               rm $<
  557. X
  558. X     Finally, suppose that each of the source files in the
  559. X
  560. X
  561. X
  562. XVersion 3.50                    UW                             41
  563. X
  564. X
  565. X
  566. X
  567. XDMAKE(p)               Unsupported Software               DMAKE(p)
  568. X
  569. X
  570. X
  571. X     previous example had the `:' character in their target name.
  572. X     Then we would write the above example as:
  573. X
  574. X          SRC  = f:a f:b
  575. X          LIB  = lib
  576. X          LIBm = "{ $(SRC) }.o"         # put quotes around each token
  577. X
  578. X          prgm: $(LIB)
  579. X               cc -o $@ $(LIB)
  580. X
  581. X          $(LIB) .LIBRARY : $(LIBm)
  582. X               ar rv $@ $<
  583. X               rm $<
  584. X
  585. XCOMPATIBILITY
  586. X     There are two notable differences between dmake and the
  587. X     standard version of BSD UNIX 4.2/4.3 Make.
  588. X
  589. X          1. BSD UNIX 4.2/4.3 Make supports wild card filename
  590. X             expansion for prerequisite names.  Thus if a direc-
  591. X             tory contains a.h, b.h and c.h, then a line like
  592. X
  593. X                  target: *.h
  594. X
  595. X             will cause UNIX make to expand the *.h into "a.h b.h
  596. X             c.h".  dmake does not support this type of filename
  597. X             expansion.
  598. X
  599. X          2. Unlike UNIX make, touching a library member causes
  600. X             dmake to search the library for the member name and
  601. X             to update the library time stamp.  This is only
  602. X             implemented in the UNIX version.  MSDOS and other
  603. X             versions may not have librarians that keep file time
  604. X             stamps, as a result dmake touches the library file
  605. X             itself, and prints a warning.
  606. X
  607. X     dmake is not compatible with GNU Make.  In particular it
  608. X     does not understand GNU Make's macro expansions that query
  609. X     the file system.
  610. X
  611. X     dmake is fully compatible with SYSV AUGMAKE, and supports
  612. X     the following AUGMAKE features:
  613. X
  614. X          1. The word include appearing at the start of a line
  615. X             can be used instead of the ".INCLUDE :" construct
  616. X             understood by dmake.
  617. X
  618. X          2. The macro modifier expression $(macro:str=sub) is
  619. X             understood and is equivalent to the expression
  620. X             $(macro:s/str/sub), with the restriction that str
  621. X             must match the following regular expression:
  622. X
  623. X
  624. X
  625. X
  626. XVersion 3.50                    UW                             42
  627. X
  628. X
  629. X
  630. X
  631. XDMAKE(p)               Unsupported Software               DMAKE(p)
  632. X
  633. X
  634. X
  635. X                  str[ |\t][ |\t]*
  636. X
  637. X             (ie. str only matches at the end of a token where
  638. X             str is a suffix and is terminated by a space, a tab,
  639. X             or end of line)
  640. X
  641. X          3. The macro % is defined to be $@ (ie. $% expands to
  642. X             the same value as $@).
  643. X
  644. X          4. The AUGMAKE notion of libraries is handled
  645. X             correctly.
  646. X
  647. X          5. When defining special targets for the inference
  648. X             rules and the AUGMAKE special target mapping is
  649. X             enabled then the special target .X is equivalent to
  650. X             the %-rule "% : %.X".
  651. X
  652. XLIMITS
  653. X     In some environments the length of an argument string is
  654. X     restricted.  (e.g. MSDOS command line arguments cannot be
  655. X     longer than 128 bytes if you are using the standard
  656. X     command.com command interpreter as your shell, dmake text
  657. X     diversions may help in these situations.)
  658. X
  659. XPORTABILITY
  660. X     To write makefiles that can be moved from one environment to
  661. X     another requires some forethought.  In particular you must
  662. X     define as macros all those things that may be different in
  663. X     the new environment.  dmake has two facilities that help to
  664. X     support writing portable makefiles, recursive macros and
  665. X     conditional expressions.  The recursive macros, allow one to
  666. X     define environment configurations that allow different
  667. X     environments for similar types of operating systems.  For
  668. X     example the same make script can be used for SYSV and BSD
  669. X     but with different macro definitions.
  670. X
  671. X     To write a makefile that is portable between UNIX and MSDOS
  672. X     requires both features since in almost all cases you will
  673. X     need to define new recipes for making targets.  The recipes
  674. X     will probably be quite different since the capabilities of
  675. X     the tools on each machine are different.  Different macros
  676. X     will be needed to help handle the smaller differences in the
  677. X     two environments.
  678. X
  679. X     NOTE:  Unlike UNIX, MSDOS does maintain cd requests cross
  680. X     single recipe lines.  This is not portable, and your
  681. X     makefiles will not work the same way if you depend on it.
  682. X     Use the .IF ... .ELSE ... .END conditionals to supply dif-
  683. X     ferent make scripts as necessary.
  684. X
  685. X
  686. X
  687. X
  688. X
  689. X
  690. XVersion 3.50                    UW                             43
  691. X
  692. X
  693. X
  694. X
  695. XDMAKE(p)               Unsupported Software               DMAKE(p)
  696. X
  697. X
  698. X
  699. XFILES
  700. X     Makefile, makefile, startup.mk (use dmake -V to tell you
  701. X     where the startup file is)
  702. X
  703. XSEE ALSO
  704. X     sh(1), csh(1), touch(1), f77(1), pc(1), cc(1)
  705. X     S.I. Feldman  Make - A Program for Maintaining Computer Pro-
  706. X     grams
  707. X
  708. XAUTHOR
  709. X     Dennis Vadura, CS Dept. University of Waterloo.
  710. X     dvadura@watdragon.uwaterloo.ca
  711. X     Many thanks to Carl Seger for his helpful suggestions, and
  712. X     to Trevor John Thompson for his many excellent ideas and
  713. X     informative bug reports.
  714. X
  715. XBUGS
  716. X     Some system commands return non-zero status inappropriately.
  717. X     Use -i (`-' within the makefile) to overcome the difficulty.
  718. X
  719. X     Some systems do not have easily accessible time stamps for
  720. X     library members (MSDOS, AMIGA, etc) for these dmake uses the
  721. X     time stamp of the library instead and prints a warning the
  722. X     first time it does so.  This is almost always ok, except
  723. X     when multiple makefiles update a single library file.  In
  724. X     these instances it is possible to miss an update if one is
  725. X     not careful.
  726. X
  727. X
  728. X
  729. X
  730. X
  731. X
  732. X
  733. X
  734. X
  735. X
  736. X
  737. X
  738. X
  739. X
  740. X
  741. X
  742. X
  743. X
  744. X
  745. X
  746. X
  747. X
  748. X
  749. X
  750. X
  751. X
  752. X
  753. X
  754. XVersion 3.50                    UW                             44
  755. SHAR_EOF
  756. echo "File man/dmake.nc is complete"
  757. chmod 0640 man/dmake.nc || echo "restore of man/dmake.nc fails"
  758. echo "x - extracting makefile (Text)"
  759. sed 's/^X//' << 'SHAR_EOF' > makefile &&
  760. X# Default makefile for the various versions of dmake that we
  761. X# have available.  This is a bootstrap version and uses /bin/sh to
  762. X# execute a script which compiles dmake.
  763. X#
  764. X# Note the DOS commands actually invoke command.com to run the .bat file
  765. X# to make the script.
  766. X
  767. Xall:
  768. X    @echo "You must issue one of:"
  769. X    @echo "   make bsd43         - Generic BSD 4.3"
  770. X    @echo "   make bsd43uw       - Generic BSD 4.3 at U of Waterloo"
  771. X    @echo "   make bsd43vf       - Generic BSD 4.3 that needs vfprintf"
  772. X    @echo "   make sysvr3        - Generic SysV R3 UNIX"
  773. X    @echo "   make sysvr1        - Generic SysV R1 UNIX"
  774. X    @echo "   make 386ix         - 386/ix (SysV R3) [NOTE: not tested]"
  775. X    @echo "   make dynix         - Sequent DYNIX system"
  776. X    @echo "   make ultrix        - Ultrix 3.0 system"
  777. X    @echo "   make mips          - Any MIPS box"
  778. X    @echo "   make tcc           - DOS with tcc 2.0"
  779. X    @echo "   make tccswp        - swapping DOS version with tcc 2.0"
  780. X    @echo "   make msc           - DOS with MSC 4.0 to 5.1"
  781. X    @echo "   make msc60         - DOS with MSC 6.0"
  782. X    @echo "   make mscswp        - swapping DOS version with MSC 4.0 to 5.1"
  783. X    @echo "   make msc60swp      - swapping DOS version with MSC 6.0"
  784. X
  785. Xbsd43uw :; /bin/sh -x < unix/bsd43/uw/make.sh
  786. Xbsd43vf dynix mips        :; /bin/sh -x < unix/bsd43/vf/make.sh
  787. Xsysvr1 sysvr3 bsd43 386ix :; /bin/sh -x < unix/$@/make.sh
  788. Xultrix : sysvr3;
  789. X
  790. X# DOS with some form of make and sh
  791. X# Note if you do not have a 'make and/or sh' program under MSDOS then
  792. X# typing 'make' in the dmake distribution directory will invoke the make.bat
  793. X# batch file which will issue the appropriate instructions.
  794. Xtcc tccswp msc msc60 mscswp msc60swp:; make.bat $@
  795. SHAR_EOF
  796. chmod 0440 makefile || echo "restore of makefile fails"
  797. echo "x - extracting makefile.mk (Text)"
  798. sed 's/^X//' << 'SHAR_EOF' > makefile.mk &&
  799. X#             //// Makefile for DMAKE. \\\\
  800. X# The target system is characterized by the following macros imported from
  801. X# the environment.
  802. X#
  803. X#    OS          - gives the class of operating system
  804. X#    OSRELEASE     - optionally gives the particular release of the OS above.
  805. X#    OSENVIRONMENT - optionally gives the environment under which the above
  806. X#            OS is in use.
  807. X#
  808. X# Valid values for the above macros are:
  809. X#
  810. X#    OS            - unix, msdos
  811. X#       OSRELEASE     - bsd43, sysvr3, 386ix
  812. X#              - tccdos, mscdos  (valid only of OS == msdos)
  813. X#       OSENVIRONMENT - uw {valid for unix, bsd43 configuration only.}
  814. X#            vf (valid for unix, bsd43 configuration only.)
  815. X#
  816. X# See the config.mk file in the relevant subdirectories for additional
  817. X# comments describing when a setting is applicable.
  818. X
  819. X# First target in the makefile, do this so that targets declared in the
  820. X# included files are never marked as being the first *default* target.
  821. Xfirst : all ;
  822. X
  823. X# Pull in the configuration macros, from the environment.  OS is required,
  824. X# OSRELEASE, and OSENVIRONMENT are optional.
  825. X.IF $(OS) == $(NULL)
  826. X   .IMPORT : OS
  827. X.END
  828. X.IMPORT .IGNORE : OSRELEASE OSENVIRONMENT TMPDIR
  829. X
  830. X# Define the source files
  831. XSRC =\
  832. X    infer.c make.c stat.c expand.c string.c hash.c dag.c dmake.c\
  833. X    path.c imacs.c sysintf.c parse.c getinp.c quit.c\
  834. X    basename.c dump.c macparse.c rulparse.c percent.c function.c
  835. X
  836. X# Common Include files.
  837. XHDR = dmake.h extern.h struct.h vextern.h patchlvl.h version.h
  838. X
  839. X# Define the TARGET we are making, and where the OBJECT files go.
  840. XOBJDIR := objects
  841. XTARGET  = dmake$E
  842. XCFLAGS += -DHELP -I. -Icommon
  843. X
  844. X# Pull in the proper configuration file, based on the value of OS.
  845. X.INCLUDE : $(OS)/config.mk
  846. X
  847. X# Set the .SOURCE targets so that we look for things in the right place.
  848. X.SOURCE.c :^ .NULL
  849. X.SOURCE.h :^ .NULL
  850. X.SOURCE$O :^ $(OBJDIR)
  851. X.PRECIOUS : $(HDR)
  852. X
  853. X# Must come after the above INCLUDE so that it gets ALL objects.
  854. XOBJECTS    := {$(ASRC:b) $(SRC:b)}$O
  855. X
  856. X# The main target, make sure the objects directory exists first.
  857. X# LDARGS is defined in config.mk file of each OS/OSRELEASE combination.
  858. Xall : $(TARGET);
  859. X$(TARGET) : $(OBJDIR)
  860. X$(TARGET) : $(OBJECTS);$(LD) $(LDARGS)
  861. X
  862. X# Other obvious targets...
  863. X$(OBJDIR):;+-mkdir $@
  864. X
  865. X# Meta rule for making .o's from .c's (give our own so we can move object
  866. X# to objects directory in a portable, compiler independent way)
  867. X%$O : %.c
  868. X    %$(CC) -c $(CFLAGS) $<
  869. X    mv $(@:f) $(OBJDIR)
  870. X
  871. X# remaining dependencies should be automatically generated
  872. Xsysintf$O  : $(OS)/sysintf.h
  873. X$(OBJECTS) : $(HDR)
  874. X.SOURCE.h  : common
  875. X
  876. X# Define the macros for printing the source, and pull in the 
  877. X# makefile portion.
  878. XPRINTEXCLUDE = $(OBJDIR) $(OBJDIR).dbg test RCS control man common
  879. X.INCLUDE : common/print.mk
  880. X
  881. Xclean:;+ $(RM) -rf dmake$E dbdmake$E objects*
  882. X
  883. X# Rules for making the manual pages.
  884. Xman .SETDIR=man : dmake.nc ;
  885. Xdmake.nc : dmake.p ; scriptfix < $< > $@
  886. Xdmake.p  : dmake.tf; typeset -man -Tdumb $< > $@
  887. X
  888. X#--------------------------------------------------------------------------
  889. X# Make the various archives for shipping the thing around.
  890. X#
  891. Xarchives : zoo tar shar;
  892. Xzoo   : dmake.zoo ;
  893. Xshar  : dmake.shar;
  894. Xtar   : dmake.tar;
  895. Xunzoo : dmake.zoo ; zoo xO// dmake.zoo
  896. Xdmake.zoo  .SILENT: src-list
  897. X[
  898. X    echo "" >> $<
  899. X    echo -n '$@ : $$(ALLSRC);@ zoo aI $$@ < ' >> $<
  900. X        echo -n '<' >> $<
  901. X        echo -n '+' >> $<
  902. X        echo -n '$$(ALLSRC:t"\n")\n' >> $<
  903. X        echo -n '+' >> $<
  904. X        echo '>' >> $<
  905. X    $(MAKECMD) -f $< $@
  906. X    $(RM) -f $<
  907. X]
  908. X
  909. Xdmake.shar .SILENT : src-list-shar
  910. X[
  911. X    echo '$@:$$(ALLSRC) ;xshar -vc -o$@ -l40 $$(ALLSRC)' >> $<
  912. X    $(MAKECMD) -f $< $@
  913. X    $(RM) -f $<
  914. X]
  915. X
  916. Xdmake.tar : src-list
  917. X[
  918. X    echo '$@ .SILENT :$$(ALLSRC) ;tar -cf $@ $$(ALLSRC)' >> $<
  919. X    $(MAKECMD) -f $< $@
  920. X    mkdir dmake
  921. X    cd dmake
  922. X    tar xf ../$@; chmod -R u+rw .
  923. X    cd ..
  924. X    tar cf $@ dmake
  925. X    $(RM) -rf $< dmake
  926. X]
  927. X
  928. Xsrc-list .SILENT: clean man
  929. X    echo 'ALLSRC = \' >$@
  930. X    find . -type f -print |\
  931. X    sed -e 's/RCS\///' -e 's/,v//' -e 's/$$/\\/' -e 's/^\.\// /'|\
  932. X    sort -u |\
  933. X    grep -v tst | grep -v $@ | grep -v LICENSE |\
  934. X    grep -v '\.zoo' | grep -v '\.tar'| grep -v '\.shar' >> $@
  935. X    echo ' LICENSE' >> $@
  936. X
  937. Xsrc-list-shar .SILENT: clean man
  938. X    echo 'ALLSRC = \' >$@
  939. X    find . -print |\
  940. X    sed -e 's/RCS\///' -e 's/,v//' -e 's/$$/\\/' -e 's/^\.\// /'|\
  941. X    sort -ur |\
  942. X    grep -v tst | grep -v $@ | grep -v LICENSE | grep -v RCS |\
  943. X    grep -v '^\.\\$$' | grep -v '\.zoo' | grep -v '\.tar'|\
  944. X    grep -v '\.shar' >> $@
  945. X    echo ' LICENSE' >> $@
  946. X
  947. X
  948. X#--------------------------------------------------------------------------
  949. X# This section can be used to make the necessary script files so that dmake
  950. X# can be bootstrapped.
  951. X#
  952. X#    dmake scripts    -- makes all the script files at once.
  953. X#
  954. XSH = $(@:s/swp-/-/:s,-,/,:s/scripts/${SCRIPTFILE}/:s/c60d/cd/)
  955. XMS = MAKESTARTUP=$(@:s/swp-/-/:s,-,/,:s/scripts/startup.mk/:s/c60d/cd/)
  956. X
  957. Xscripts: unix-scripts msdos-scripts
  958. X
  959. X# To add a new environment for UNIX, simply create the appropriate entry
  960. X# in the style below for the macro which contains the OS, OSRELEASE and
  961. X# OSENVIRONMENT flags.  Then add the entry as a recipe line for the target
  962. X# unix-scripts.
  963. X#
  964. Xunix-bsd43-scripts-flags   = OS=unix OSRELEASE=bsd43  OSENVIRONMENT=
  965. Xunix-sysvr3-scripts-flags  = OS=unix OSRELEASE=sysvr3 OSENVIRONMENT=
  966. Xunix-sysvr1-scripts-flags  = OS=unix OSRELEASE=sysvr1 OSENVIRONMENT=
  967. Xunix-386ix-scripts-flags   = OS=unix OSRELEASE=386ix  OSENVIRONMENT=
  968. Xunix-bsd43-uw-scripts-flags= OS=unix OSRELEASE=bsd43  OSENVIRONMENT=uw
  969. Xunix-bsd43-vf-scripts-flags= OS=unix OSRELEASE=bsd43  OSENVIRONMENT=vf
  970. X
  971. Xunix-scripts: clean
  972. X    $(MAKE) SCRIPTFILE=make.sh unix-bsd43-scripts
  973. X    $(MAKE) SCRIPTFILE=make.sh unix-bsd43-uw-scripts
  974. X    $(MAKE) SCRIPTFILE=make.sh unix-bsd43-vf-scripts
  975. X    $(MAKE) SCRIPTFILE=make.sh unix-sysvr3-scripts
  976. X    $(MAKE) SCRIPTFILE=make.sh unix-sysvr1-scripts
  977. X    $(MAKE) SCRIPTFILE=make.sh unix-386ix-scripts
  978. X
  979. Xunix-%-scripts:; $(MAKECMD) -ns $(MS) $($@-flags) >$(SH)
  980. X
  981. X# We make the standard dos scripts here, but we have to go and fix up the
  982. X# make.bat file since it contains names of temporary files for the response
  983. X# files required by the linker.  We need to also construct the response file
  984. X# contents.  These two functions are performed by the fix-msdos-%-scripts
  985. X# meta-target.
  986. X#
  987. X# To add a new DOS environment just do what is described for adding a new
  988. X# unix environment, and then make certain that the fix-msdos-%-scripts target
  989. X# performs the correct function for the new environment.
  990. Xmsdos-cf = OS=msdos OSENVIRONMENT=
  991. Xmsdos-tccdos-scripts-flags = $(msdos-cf) OSRELEASE=tccdos NOSWAP=y
  992. Xmsdos-tccdosswp-scripts-flags = $(msdos-cf) OSRELEASE=tccdos
  993. Xmsdos-mscdos-scripts-flags = $(msdos-cf) OSRELEASE=mscdos NOSWAP=y
  994. Xmsdos-msc60dos-scripts-flags= $(msdos-cf) OSRELEASE=mscdos NOSWAP=y MSC_VER=6.0
  995. Xmsdos-mscdosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos
  996. Xmsdos-msc60dosswp-scripts-flags = $(msdos-cf) OSRELEASE=mscdos MSC_VER=6.0
  997. X
  998. Xmsdos-scripts: clean
  999. X    $(MAKE) SCRIPTFILE=mk.bat msdos-tccdos-scripts
  1000. X    $(MAKE) SCRIPTFILE=mkswp.bat msdos-tccdosswp-scripts
  1001. X    $(MAKE) SCRIPTFILE=mk.bat msdos-mscdos-scripts
  1002. X    $(MAKE) SCRIPTFILE=mk60.bat msdos-msc60dos-scripts
  1003. X    $(MAKE) SCRIPTFILE=mkswp.bat msdos-mscdosswp-scripts
  1004. X    $(MAKE) SCRIPTFILE=mk60swp.bat msdos-msc60dosswp-scripts
  1005. X
  1006. Xmsdos-%-scripts:
  1007. X    $(MAKE) -nus $(MS) $($@-flags) >$(SH)
  1008. X    $(MAKE) -s $(MAKEMACROS) $(MS) $($@-flags) fix-msdos-$*-scripts
  1009. X
  1010. XMAPOBJ = $(*:s/tccdos/obj/:s/mscdos/obj/:s/msc60dos/obj60/).rsp
  1011. XMAPLIB = $(*:s/tccdos/lib/:s/mscdos/lib/:s/msc60dos/lib60/).rsp
  1012. XOBJRSP = $(SH:s,fix/,,:s,${SCRIPTFILE},${MAPOBJ},)
  1013. XLIBRSP = $(SH:s,fix/,,:s,${SCRIPTFILE},${MAPLIB},)
  1014. XDOSOBJ = $(CSTARTUP) $(OBJDIR)/{$(OBJECTS)}
  1015. Xfix-msdos-%-scripts:
  1016. X    sed -e 's,/tmp/mkA..[0-9]*,$(OBJRSP),'\
  1017. X        -e 's,/tmp/mkB..[0-9]*,$(LIBRSP),'\
  1018. X        -e 's,/,\\,g' <$(SH:s,fix/,,) >tmp-out
  1019. X    mv -f tmp-out $(SH:s,fix/,,)
  1020. X    mv <+$(DOSOBJ:s,/,\\,:t"+\n")\n+> $(OBJRSP)
  1021. X    mv <+$(LDLIBS:s,/,\\,:t"+\n")\n+> $(LIBRSP)
  1022. SHAR_EOF
  1023. chmod 0640 makefile.mk || echo "restore of makefile.mk fails"
  1024. echo "x - extracting make.c (Text)"
  1025. sed 's/^X//' << 'SHAR_EOF' > make.c &&
  1026. X/* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/RCS/make.c,v 1.1 90/10/06 12:03:59 dvadura Exp $
  1027. X-- SYNOPSIS -- perform the update of all outdated targets.
  1028. X-- 
  1029. X-- DESCRIPTION
  1030. X--    This is where we traverse the make graph looking for targets that
  1031. X--    are out of date, and we try to infer how to make them if we can.
  1032. X--    The usual make macros are understood, as well as some new ones:
  1033. X--
  1034. X--        $$    - expands to $
  1035. X--        $@      - full target name
  1036. X--        $*      - target name with no suffix, same as $(@:db)
  1037. X--              or, the value of % in % meta rule recipes
  1038. X--        $?      - list of out of date prerequisites
  1039. X--        $<      - all prerequisites associated with rules line
  1040. X--        $&    - all prerequisites associated with target
  1041. X--        $>      - library name for target (if any)
  1042. X--        $^    - out of date prerequisites taken from value of $<
  1043. X--        {{    - expands to {
  1044. X--        }}    - expands to }
  1045. X--        \#    - expands to #
  1046. X-- 
  1047. X-- AUTHOR
  1048. X--      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  1049. X--      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  1050. X--
  1051. X-- COPYRIGHT
  1052. X--      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  1053. X-- 
  1054. X--      This program is free software; you can redistribute it and/or
  1055. X--      modify it under the terms of the GNU General Public License
  1056. X--      (version 1), as published by the Free Software Foundation, and
  1057. X--      found in the file 'LICENSE' included with this distribution.
  1058. X-- 
  1059. X--      This program is distributed in the hope that it will be useful,
  1060. X--      but WITHOUT ANY WARRANTY; without even the implied warrant of
  1061. X--      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1062. X--      GNU General Public License for more details.
  1063. X-- 
  1064. X--      You should have received a copy of the GNU General Public License
  1065. X--      along with this program;  if not, write to the Free Software
  1066. X--      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  1067. X--
  1068. X-- LOG
  1069. X--     $Log:    make.c,v $
  1070. X * Revision 1.1  90/10/06  12:03:59  dvadura
  1071. X * dmake Release, Version 3.6
  1072. X * 
  1073. X*/
  1074. X
  1075. X#include "extern.h"
  1076. X#include "alloc.h"
  1077. X#include "db.h"
  1078. X
  1079. Xstatic    int    _exec_commands ANSI((CELLPTR, HOWPTR));
  1080. Xstatic    void    _drop_mac ANSI((HASHPTR));
  1081. Xstatic    void    _print_cmnd ANSI((char*, int, int));
  1082. Xstatic    void    _set_recipe ANSI((char*, int));
  1083. Xstatic    void    _set_tmd ANSI(());
  1084. Xstatic    void    _append_file ANSI((STRINGPTR, FILE*, char*, int));
  1085. X
  1086. X#define RP_GPPROLOG    0
  1087. X#define RP_RECIPE    1
  1088. X#define RP_GPEPILOG    2
  1089. X#define NUM_RECIPES    3
  1090. X
  1091. Xstatic STRINGPTR _recipes[ NUM_RECIPES ];
  1092. Xstatic CELLPTR     Root;        /* root cell for make graph */
  1093. X
  1094. X
  1095. X
  1096. Xint
  1097. XMake_targets()/*
  1098. X================
  1099. X   Actually go and make the targets on the target list */
  1100. X{
  1101. X   LINKPTR        lp;
  1102. X   int            done = 0;
  1103. X
  1104. X   DB_ENTER( "Make_targets" );
  1105. X
  1106. X   /* Make sure the graph gets blown up for .SETDIR targets.
  1107. X    * Only required for architectures that support parallel  
  1108. X    * makes. */
  1109. SHAR_EOF
  1110. echo "End of part 18"
  1111. echo "File make.c is continued in part 19"
  1112. echo "19" > s2_seq_.tmp
  1113. exit 0
  1114.  
  1115.