home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume27 / dmake / part17 < prev    next >
Encoding:
Text File  |  1992-01-29  |  40.2 KB  |  1,123 lines

  1. Newsgroups: comp.sources.misc
  2. From: dvadura@plg.waterloo.edu (Dennis Vadura)
  3. Subject:  v27i118:  dmake - dmake Version 3.8, Part17/41
  4. Message-ID: <1992Jan28.214101.18966@sparky.imd.sterling.com>
  5. X-Md4-Signature: 5dab39e4279c3944c41d4946f3ca28ca
  6. Date: Tue, 28 Jan 1992 21:41:01 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: dvadura@plg.waterloo.edu (Dennis Vadura)
  10. Posting-number: Volume 27, Issue 118
  11. Archive-name: dmake/part17
  12. Environment: Atari-ST, Coherent, Mac, MSDOS, OS/2, UNIX
  13. Supersedes: dmake: Volume 19, Issue 22-58
  14.  
  15. ---- Cut Here and feed the following to sh ----
  16. # this is dmake.shar.17 (part 17 of a multipart archive)
  17. # do not concatenate these parts, unpack them in order with /bin/sh
  18. # file dmake/man/dmake.tf continued
  19. #
  20. if test ! -r _shar_seq_.tmp; then
  21.     echo 'Please unpack part 1 first!'
  22.     exit 1
  23. fi
  24. (read Scheck
  25.  if test "$Scheck" != 17; then
  26.     echo Please unpack part "$Scheck" next!
  27.     exit 1
  28.  else
  29.     exit 0
  30.  fi
  31. ) < _shar_seq_.tmp || exit 1
  32. if test -f _shar_wnt_.tmp; then
  33. sed 's/^X//' << 'SHAR_EOF' >> 'dmake/man/dmake.tf' &&
  34. .B dmake
  35. will attempt to make the target.
  36. .PP
  37. If no
  38. .B \-f
  39. command line option is present then
  40. .B dmake
  41. searches for an existing
  42. .I makefile
  43. from the list of prerequisites specified for the special target \fI.MAKEFILES\fR
  44. (see the STARTUP section for more details).
  45. If "\-" is the name of the file specified to the
  46. .B \-f
  47. flag then \fBdmake\fR uses standard input as the source of the makefile text.
  48. .PP
  49. Any macro definitions (arguments with embedded "="
  50. signs) that appear on the command line are processed first
  51. and supersede definitions for macros of the same name found
  52. within the makefile.  In general it is impossible for definitions found
  53. inside the makefile to redefine a macro defined on the command line, see the
  54. MACROS section for an exception.
  55. .PP
  56. If no
  57. .I target
  58. names are specified on the command line, then \fBdmake\fR uses the first
  59. non-special target found in the makefile as the default target.
  60. See the
  61. .B "SPECIAL TARGETS"
  62. section for the list of special targets and their function.
  63. \fBdmake\fR is a re-implementation of the UNIX Make utility with
  64. significant enhancements.  Makefiles written for most previous
  65. versions of
  66. .I Make
  67. will be handled correctly by 
  68. .B dmake.
  69. Known differences between \fBdmake\fR and other versions of make
  70. are discussed in the
  71. .B COMPATIBILITY
  72. section found at the end of this document.
  73. .SH OPTIONS
  74. .IP "\fB\-A\fR"
  75. Enable AUGMAKE special inference rule transformations
  76. (see the "PERCENT(%) RULES" section), these are set to off by default.
  77. .IP "\fB\-B\fR"
  78. Enable the use of spaces instead of <tabs> to begin recipe lines.
  79. This flag equivalent to the .NOTABS special macro and is further described
  80. below.
  81. .IP "\fB\-c\fR"
  82. Use non-standard comment stripping.  If you specify \fB\-c\fP then
  83. .B dmake
  84. will treat any \fB#\fP character as a start of comment character wherever it
  85. may appear unless it is escaped by a \e.
  86. .IP "\fB\-C [+]file\fR"
  87. This option writes to \fIfile\fP a copy of standard output and
  88. standard error from any child processes and from the
  89. .B dmake
  90. process itself.  If you specify a \fB+\fP prior to the file name then
  91. the text is appended to the previous contents of \fIfile\fP.
  92. This option is active in the MSDOS implementation only and is ignored
  93. by non-MSDOS versions of
  94. .B dmake.
  95. .IP "\fB\-E\fR"
  96. Read the environment and define all strings of the
  97. form '\fBENV\-VAR\fP=\fIevalue\fP'
  98. defined within as macros whose name is \fBENV\-VAR\fP,
  99. and whose value is '\fIevalue\fP'.
  100. The environment is processed prior to processing the user
  101. specified makefile thereby allowing definitions in the makefile to override
  102. definitions in the environment.
  103. .IP "\fB\-e\fR"
  104. Same as \-E, except that the environment is processed after the
  105. user specified makefile has been processed
  106. (thus definitions in the environment override definitions in the makefile).
  107. The \-e and \-E options are mutually exclusive.
  108. If both are given the latter takes effect.
  109. .IP "\fB\-f file\fR"
  110. Use \fBfile\fR as the source for the makefile text.
  111. Only one \fB\-f\fR option is allowed.
  112. .IP "\fB\-h\fR"
  113. Print the command summary for \fBdmake\fR.
  114. .IP "\fB\-i\fR"
  115. Tells \fBdmake\fR to ignore errors, and continue making other targets.
  116. This is equivalent to the .IGNORE attribute or macro.
  117. .IP "\fB\-K file\fR"
  118. Turns on \fB.KEEP_STATE\fP state tracking and tells \fBdmake\fP to use
  119. \fIfile\fP as the state file.
  120. .IP "\fB\-k\fR"
  121. Causes \fBdmake\fR to ignore errors caused by command execution and to make
  122. all targets not depending on targets that could not be made. 
  123. Ordinarily \fBdmake\fR stops after a command returns a non-zero status,
  124. specifying \fB\-k\fR causes \fBdmake\fR to ignore the error
  125. and continue to make as much as possible.
  126. .IP "\fB\-n\fR"
  127. Causes \fBdmake\fR to print out what it would have executed,
  128. but does not actually execute the commands.  A special check is made for
  129. the string "$(MAKE)" inside a recipe line, if found, the line is expanded
  130. and invoked, thereby enabling recursive makes to give a full
  131. description of all that they will do.
  132. The check for "$(MAKE)" is disabled inside group recipes.
  133. .IP "\fB\-p\fR"
  134. Print out a version of the digested makefile in human readable form.
  135. (useful for debugging, but cannot be re-read by \fBdmake\fP)
  136. .IP "\fB\-P#\fR"
  137. On systems that support multi-processing cause \fBdmake\fP to use \fI#\fP
  138. concurrent child processes to make targets.
  139. See the "MULTI PROCESSING" section for more information.
  140. .IP "\fB\-q\fR"
  141. Check and see if the target is up to date.  Exits with code 0 if up to date,
  142. 1 otherwise.
  143. .IP "\fB\-r\fR"
  144. Tells \fBdmake\fR not to read the initial startup makefile, see STARTUP
  145. section for more details.
  146. .IP "\fB\-s\fR"
  147. Tells \fBdmake\fR to do all its work silently and not echo the commands it is
  148. executing to stdout (also suppresses warnings).
  149. This  is equivalent to the .SILENT attribute or macro.
  150. .IP "\fB\-S\fR"
  151. Force sequential execution of recipes on architectures which support
  152. concurrent makes.  For backward compatibility with old makefiles that have
  153. nasty side-effect prerequisite dependencies.
  154. .IP "\fB\-t\fR"
  155. Causes \fBdmake\fR to touch the targets and bring them up to date
  156. without executing any commands.
  157. Note that targets will not be created if they do not already exist.
  158. .IP "\fB\-T\fR"
  159. Tells \fBdmake\fP to not perform transitive closure on the inference graph.
  160. .IP "\fB\-u\fR"
  161. Force an unconditional update.  (ie. do everything that would
  162. be done if everything that a target depended on was out of date)
  163. .IP "\fB\-v[dfimt]\fR"
  164. Verbose flag, when making targets print to stdout what we are going to make
  165. and what we think its time stamp is.  The optional flags \fB[dfimt]\fP can be
  166. used to restrict the information that is displayed.  In the absence of any
  167. optional flags all are assumed to be given (ie. \fB\-v\fP is equivalent to
  168. \fB\-vdfimt\fP).  The meanings of the optional flags are:
  169. .RS
  170. .IP "\fBd\fP"
  171. Notify of change directory operations only.
  172. .IP "\fBf\fP"
  173. Notify of file I/O operations only.
  174. .IP "\fBi\fP"
  175. Notify of inference algorithm operation only.
  176. .IP "\fBm\fP"
  177. Notify of target update operations only.
  178. .IP "\fBt\fP"
  179. Keep any temporary files created; normally they are automatically deleted.
  180. .RE
  181. .IP "\fB\-V\fR"
  182. Print the version of \fBdmake\fR, and values of builtin macros.
  183. .IP "\fB\-x\fR"
  184. Upon processing the user makefile export all non-internally defined macros
  185. to the user's environment.  This option together with the \-e option
  186. allows SYSV AUGMAKE recursive makes to function as expected.
  187. .SH INDEX
  188. Here is a list of the sections that follow and a short description of each.
  189. Perhaps you won't have to read the whole man page to find
  190. what you need.
  191. .IP \fBSTARTUP\fP 1.9i
  192. Describes \fBdmake\fP initialization.
  193. .IP \fBSYNTAX\fP 1.9i
  194. Describes the syntax of makefile expressions.
  195. .IP \fBATTRIBUTES\fP 1.9i
  196. Describes the notion of attributes and how they are used when
  197. making targets.
  198. .IP \fBMACROS\fP 1.9i
  199. Defining and expanding macros.
  200. .IP "\fBRULES AND TARGETS" 1.9i
  201. How to define targets and their prerequisites.
  202. .IP \fBRECIPES\fP 1.9i
  203. How to tell \fBdmake\fP how to make a target.
  204. .IP "\fBTEXT DIVERSIONS\fP" 1.9i
  205. How to use text diversions in recipes and macro expansions.
  206. .IP "\fBSPECIAL TARGETS\fP" 1.9i
  207. Some targets are special.
  208. .IP "\fBSPECIAL MACROS\fP" 1.9i
  209. Macros used by \fBdmake\fP to alter the processing of the makefile,
  210. and those defined by \fBdmake\fP for the user.
  211. .IP "\fBCONTROL MACROS\fP" 1.9i
  212. Itemized list of special control macros.
  213. .IP "\fBRUN-TIME MACROS\fP" 1.9i
  214. Discussion of special run-time macros such as $@ and $<.
  215. .IP "\fBFUNCTION MACROS\fP" 1.9i
  216. GNU style function macros, only $(mktmp ...) for now.
  217. .IP "\fBDYNAMIC PREREQUISITES\fP" 1.9i
  218. Processing of prerequisites which contain macro expansions in their name.
  219. .IP "\fBBINDING TARGETS\fP" 1.9i
  220. The rules that \fBdmake\fP uses to bind
  221. a target to an existing file in the file system.
  222. .IP "\fBPERCENT(%) RULES\fP" 1.9i
  223. Specification of recipes to be used by the inference algorithm.
  224. .IP "\fBMAKING INFERENCES\fP" 1.9i
  225. The rules that \fBdmake\fP uses when inferring how to make a target which
  226. has no explicit recipe.  This and the previous section are really a single
  227. section in the text.
  228. .IP "\fBMAKING TARGETS\fP" 1.9i
  229. How \fBdmake\fP makes targets other than libraries.
  230. .IP "\fBMAKING LIBRARIES\fP" 1.9i
  231. How \fBdmake\fP makes libraries.
  232. .IP "\fBKEEP STATE\fP" 1.9i
  233. A discussion of how .KEEP_STATE works.
  234. .IP "\fBMULTI PROCESSING\fP" 1.9i
  235. Discussion of \fBdmake's\fP parallel make facilities for architectures that
  236. support them.
  237. .IP "\fBCONDITIONALS\fP" 1.9i
  238. Conditional expressions which control the processing of the makefile.
  239. .IP "\fBEXAMPLES\fP" 1.9i
  240. Some hopefully useful examples.
  241. .IP "\fBCOMPATIBILITY\fP" 1.9i
  242. How \fBdmake\fP compares with previous versions of make.
  243. .IP "\fBLIMITS\fP" 1.9i
  244. Limitations of \fBdmake\fP.
  245. .IP \fBPORTABILITY\fP 1.9i
  246. Comments on writing portable makefiles.
  247. .IP \fBFILES\fP 1.9i
  248. Files used by \fBdmake\fP.
  249. .IP "\fBSEE ALSO\fP" 1.9i
  250. Other related programs, and man pages.
  251. .IP "\fBAUTHOR\fP" 1.9i
  252. The guy responsible for this thing.
  253. .IP \fBBUGS\fP 1.9i
  254. Hope not.
  255. .SH STARTUP
  256. When
  257. .B dmake
  258. begins execution it first processes the command line and then processes
  259. an initial startup-makefile.
  260. This is followed by an attempt to locate and process a user supplied makefile.
  261. The startup file defines the default values of all required control macros
  262. and the set of default rules for making targets and inferences.
  263. When searching for the startup makefile,
  264. .B dmake
  265. searches the following locations, in the order specified,
  266. until a startup file is located:
  267. .LP
  268. .RS
  269. .IP 1.
  270. The location given as the value of the macro
  271. MAKESTARTUP defined on the command line.
  272. .IP 2.
  273. The location given as the value of the environment variable MAKESTARTUP
  274. defined in the current environment.
  275. .IP 3.
  276. The location given as the value of the macro
  277. MAKESTARTUP defined internally within \fBdmake\fP.
  278. .RE
  279. .LP
  280. The above search is disabled by specifying the \-r option on the command line.
  281. An error is issued if a startup makefile cannot be found and the \-r
  282. option was not specified.
  283. A user may substitute a custom startup file by defining
  284. the MAKESTARTUP environment variable or by redefining the
  285. MAKESTARTUP macro on the command line.
  286. To determine where
  287. .B dmake
  288. looks for the default startup file, check your environment or issue the command
  289. \fI"dmake \-V"\fP.
  290. .PP
  291. A similar search is performed to locate a default user makefile when no
  292. \fB\-f\fP command line option is specified.
  293. By default, the prerequisite list of the special target .MAKEFILES
  294. specifies the names of possible makefiles and the search order that
  295. \fBdmake\fP should use to determine if one exists.
  296. A typical definition for this target is:
  297. .RS
  298. .sp
  299. \&.MAKEFILES : makefile.mk Makefile makefile
  300. .sp
  301. .RE
  302. \fBdmake\fP will first look for makefile.mk and then the others.
  303. If a prerequisite
  304. cannot be found \fBdmake\fP will try to make it before going on to the next
  305. prerequisite.  For example, makefile.mk can be checked out of an RCS file
  306. if the proper rules for doing so are defined in the startup file.
  307. .PP
  308. If the first line of the user makefile is of the form:
  309. .RS
  310. .sp
  311. \#! command command_args
  312. .sp
  313. .RE
  314. then \fBdmake\fP will expand and run the command prior to reading any
  315. addtional input.  If the return code of the command is zero then \fBdmake\fP
  316. will continue on to process the remainder of the user makefile, if the return
  317. code is non-zero then dmake will exit.
  318. .SH SYNTAX
  319. This section is a summary of the syntax of makefile statements.
  320. The description is given in a style similar to BNF, where { } enclose
  321. items that may appear zero or more times, and [ ] enclose items that
  322. are optional.  Alternative productions for a left hand side are indicated
  323. by '\(->', and newlines are significant.  All symbols in \fBbold\fP type
  324. are text or names representing text supplied by the user.
  325. .sp 2
  326. .RS
  327. .Ip "Makefile" "\(-> { Statement }"
  328. .Ip "Statement" "\(-> Macro-Definition"
  329. \(-> Conditional
  330. \(-> Rule-Definition
  331. \(-> Attribute-Definition
  332. .Ip "Macro-Definition" "\(-> \fBMACRO = LINE\fP"
  333. \(-> \fBMACRO *= LINE\fP
  334. \(-> \fBMACRO := LINE\fP
  335. \(-> \fBMACRO *:= LINE\fP
  336. \(-> \fBMACRO += LINE\fP
  337. \(-> \fBMACRO +:= LINE\fP
  338. .Ip "Conditional \(-> " "\fB\&.IF\fR expression"
  339. X   Makefile
  340. [ \fB.ELIF\fR expression
  341. X   Makefile ]
  342. [ \fB.ELSE\fR
  343. X   Makefile ]
  344. \fB\&.END\fR
  345. .Ip expression    "\(-> \fBLINE\fR"
  346. \(-> \fBSTRING == LINE\fR
  347. \(-> \fBSTRING != LINE\fR
  348. .sp
  349. .Ip "Rule-Definition \(-> " "target-definition"
  350. X   [ recipe ]
  351. .PP
  352. target-definition \(-> targets [attrs] op { \fBPREREQUISITE\fP } [\fB;\fR rcp-line]
  353. .Ip "targets" "\(-> target { targets }"
  354. \(-> \fB"\fRtarget\fB"\fR { targets }
  355. .Ip "target" "\(-> special-target"
  356. \(-> \fBTARGET\fR
  357. .Ip "attrs" "\(-> attribute { attrs }"
  358. \(-> \fB"\fRattribute\fB"\fR { attrs }
  359. .Ip "op" "\(-> \fB:\fR { modifier }"
  360. .Ip "modifier" "\(-> \fB:\fR"
  361. \(-> \fB^\fR
  362. \(-> \fB!\fR
  363. \(-> \fB\-\fR
  364. .Ip "recipe" "\(-> { \fBTAB\fR rcp-line }"
  365. \(-> [\fB@\fR][\fB%\fR][\fB\-\fR] \fB[
  366. .Is "recipe \(-> "
  367. .Ii " "
  368. X   \fR{ \fBLINE\fR }
  369. .Ii " "
  370. \fB]\fR
  371. .Ip "rcp-line" "\(-> [\fB@\fR][\fB%\fR][\fB\-\fR][\fB+\fR] \fBLINE\fR"
  372. .sp
  373. .Ip Attribute-Definition "\(-> attrs \fB:\fR targets"
  374. .sp
  375. .Ip "attribute"     "\(-> \fB.EPILOG\fR"
  376. \(-> \fB.IGNORE\fR
  377. \(-> \fB.LIBRARY\fR
  378. \(-> \fB.MKSARGS\fR
  379. \(-> \fB.NOINFER\fR
  380. \(-> \fB.NOSTATE\fR
  381. \(-> \fB.PHONY\fR
  382. \(-> \fB.PRECIOUS\fR
  383. \(-> \fB.PROLOG\fR
  384. \(-> \fB.SETDIR=\fIpath\fP\fR
  385. \(-> \fB.SILENT\fR
  386. \(-> \fB.SEQUENTIAL\fR
  387. \(-> \fB.SWAP\fR
  388. \(-> \fB.USESHELL\fR
  389. \(-> \fB.SYMBOL\fR
  390. \(-> \fB.UPDATEALL\fR
  391. .Ip "special-target" "\(-> \fB.ERROR\fR"
  392. \(-> \fB.EXPORT\fR
  393. \(-> \fB.GROUPEPILOG\fR
  394. \(-> \fB.GROUPPROLOG\fR
  395. \(-> \fB.IMPORT\fR
  396. \(-> \fB.INCLUDE\fR
  397. \(-> \fB.INCLUDEDIRS\fR
  398. \(-> \fB.MAKEFILES\fR
  399. \(-> \fB.REMOVE\fR
  400. \(-> \fB.SOURCE\fR
  401. \(-> \fB.SOURCE.\fIsuffix\fR
  402. \(-> .\fIsuffix1\fR.\fIsuffix2\fR
  403. .fi
  404. .RE
  405. .sp 1
  406. .PP
  407. Where, \fBTAB\fP represents a <tab> character, \fBSTRING\fP represents an
  408. arbitrary sequence of characters, and
  409. \fBLINE\fP represents a
  410. possibly empty sequence of characters terminated by a non-escaped 
  411. (not immediately preceded by a backslash '\e') new-line character.
  412. \fBMACRO\fP, \fBPREREQUISITE\fP,
  413. and \fBTARGET\fP each represent a string of characters not
  414. including space or tab which respectively form the name of a macro,
  415. prerequisite or target.
  416. The name may itself be a macro expansion expression.
  417. A \fBLINE\fP can be continued over several physical lines by terminating it with
  418. a single backslash character.  Comments are initiated by the
  419. pound \fB#\fR character and extend to the end of line.
  420. All comment text is discarded, a '#' may be placed into the makefile text
  421. by escaping it with '\e' (ie. \e# translates to # when it is parsed).
  422. An exception to this occurs when a # is seen inside
  423. a recipe line that begins with a <tab> or is inside a group recipe.
  424. If you specify the \fB\-c\fP command line switch then this behavior is
  425. disabled and
  426. .B dmake
  427. will treat all # characters as start of comment indicators unless they
  428. are escaped by \e.
  429. A set of continued lines may be commented out by placing a single # at the
  430. start of the first line.
  431. A continued line cannot span more than one makefile.
  432. .PP
  433. \fBwhite space\fP is defined to be any combination of
  434. <space>, <tab>, and the sequence \e<nl>
  435. when \e<nl> is used to terminate a LINE.
  436. When processing \fBmacro\fP definition lines,
  437. any amount of white space is allowed on either side of the macro operator
  438. (=, *=, :=, *:=, += or +:=), and
  439. white space is stripped from both before and after the macro
  440. value string.
  441. The sequence \e<nl> is treated as
  442. white space during recipe expansion
  443. and is deleted from the final recipe string.
  444. You must escape the \e<nl> with another \e in order to get a \e at the end
  445. of a recipe line.
  446. The \e<nl> sequence is deleted from macro values when they are expanded.
  447. .PP
  448. When processing \fBtarget\fP definition lines,
  449. the recipe for a target must, in general, follow the first definition
  450. of the target (See the RULES AND TARGETS section for an exception), and
  451. the recipe may not span across multiple makefiles.
  452. Any targets and prerequisites found on a target definition line are taken
  453. to be white space separated tokens.
  454. The rule operator (\fIop\fP in SYNTAX section) is also considered
  455. to be a token but does not require
  456. white space to precede or follow it.  Since the rule operator begins with a `:',
  457. traditional versions of make do not allow the `:' character to
  458. form a valid target name.  \fBdmake\fP allows `:' to be present in
  459. target/prerequisite names as long as the entire target/prerequisite name is
  460. quoted.  For example:
  461. .sp
  462. \ta:fred : test
  463. .sp
  464. would be parsed as TARGET = a, PREREQUISITES={fred, :, test}, which
  465. is not what was intended.  To fix this you must write:
  466. .sp
  467. \t"a:fred" : test
  468. .sp
  469. Which will be parsed as expected.  Quoted target and prerequisite
  470. specifications may also contain white space thereby allowing the use of
  471. complex function macro expressions..
  472. See the EXAMPLES section for how to apply \fB"\fP quoting
  473. to a list of targets.
  474. .SH ATTRIBUTES
  475. .B dmake
  476. defines several target attributes.  Attributes may be
  477. assigned to a single target, a group of targets, or to all targets in the
  478. makefile.  Attributes are used to modify
  479. \fBdmake\fP actions during target update.
  480. The recognized attributes are:
  481. .sp
  482. .IP \fB.EPILOG\fP 1.2i
  483. Insert shell epilog code when executing a group recipe associated with
  484. any target having this attribute set.
  485. .IP \fB.IGNORE\fP 1.2i
  486. Ignore an error when trying to make any target with this attribute set.
  487. .IP \fB.LIBRARY\fP 1.2i
  488. Target is a library.
  489. .IP \fB.MKSARGS\fP 1.2i
  490. If running in an MSDOS environment then use MKS extended argument passing
  491. conventions to pass arguments to commands.  Non-MSDOS
  492. environments ignore this attribute.
  493. .IP \fB.NOINFER\fP 1.2i
  494. Any target with this attribute set will not be subjected
  495. to transitive closure if it is inferred as a prerequisite 
  496. of a target whose recipe and prerequisites are being inferred.
  497. (i.e. the inference algorithm will not use any prerequisite with this attribute 
  498. set, as a target)
  499. If specified as '.NOINFER:' (ie. with no prerequisites or targets) then the
  500. effect is equivalent to specifying \fB\-T\fP on the command line.
  501. .IP \fB.NOSTATE\fP 1.2i
  502. Any target with this attribute set will not have command line flag
  503. information stored in the state file if .KEEP_STATE has been enabled.
  504. .IP \fB.PHONY\fP 1.2i
  505. Any target with this attribute set will have its recipe executed
  506. each time the target is made even if a file matching the target name can
  507. be located.  Any targets that have a .PHONY attributed target as a
  508. prerequisite will be made each time the .PHONY attributed prerequisite is
  509. made.
  510. .IP \fB.PRECIOUS\fP 1.2i
  511. Do not remove associated target under any circumstances.
  512. Set by default for any targets whose corresponding files exist in the file
  513. system prior to the execution of \fBdmake\fP.
  514. .IP \fB.PROLOG\fP 1.2i
  515. Insert shell prolog code when executing a group recipe associated with
  516. any target having this attribute set.
  517. .IP \fB.SEQUENTIAL\fP 1.2i
  518. Force a sequential make of the associated target's prerequisites.
  519. .IP \fB.SETDIR\fP 1.2i
  520. Change current working directory to specified directory when making the
  521. associated target.  You must
  522. specify the directory at the time the attribute is specified.  To do this
  523. simply give \fI.SETDIR=path\fP as the attribute.  \fIpath\fP is expanded and
  524. the result is used as the value of the directory to change to.
  525. If path is surrounded by single quotes then path is not expanded, and is used
  526. literally as the directory name.
  527. If the \fIpath\fP contains any `:' characters then the entire attribute string
  528. must be quoted using ".
  529. If a target having this attribute set also has the .IGNORE
  530. attribute set then if the change to the specified directory fails it will be
  531. ignored, and no error message will be issued.
  532. .IP \fB.SILENT\fP 1.2i
  533. Do not echo the recipe lines when making any target with this attribute set,
  534. and do not issue any warnings.
  535. .IP \fB.SWAP\fP 1.2i
  536. Under MSDOS
  537. when making a target with this attribute set swap the \fBdmake\fP executable
  538. to disk prior to executing the recipe line.  Also see the '%' recipe line
  539. flag defined in the RECIPES section.
  540. .IP \fB.SYMBOL\fP 1.2i
  541. Target is a library member and is an entry point into a module in the
  542. library.  This attribute is used only when searching a library for a target.
  543. Targets of the form lib((entry)) have this attribute set automatically.
  544. .IP \fB.USESHELL\fP 1.2i
  545. Force each recipe line of a target to be executed using a shell.
  546. Specifying this attribute is equivalent to specifying the '+' character at the
  547. start of each line of a non-group recipe.
  548. .IP \fB.UPDATEALL\fP 1.2i
  549. Indicates that all the targets listed in this rule are updated by the
  550. execution of the accompanying recipe.
  551. A common example is the production of the
  552. .I y.tab.c
  553. and
  554. .I y.tab.h
  555. files by
  556. .B yacc
  557. when it is run on a grammar.  Specifying .UPDATEALL in such a rule
  558. prevents the running of yacc twice, once for the y.tab.c file and once
  559. for the y.tab.h file.
  560. .sp
  561. .PP
  562. All attributes are user setable and except for .UPDATEALL, .SETDIR and .MKSARGS
  563. may be used in one of two forms.
  564. The .MKSARGS attribute is restricted to use as a global attribute, and
  565. the use of the .UPDATEALL and .SETDIR attributes is restricted to rules
  566. of the second form only.
  567. .sp
  568. \tATTRIBUTE_LIST : \fItargets\fP
  569. .sp
  570. assigns the attributes specified by ATTRIBUTE_LIST to each target in
  571. .I targets
  572. or
  573. .sp
  574. \t\fItargets\fP ATTRIBUTE_LIST : ...
  575. .sp
  576. assigns the attributes specified by ATTRIBUTE_LIST to each target in
  577. .I targets.
  578. In the first form if
  579. .I targets
  580. is empty (ie. a NULL list), then the
  581. list of attributes will apply to all targets in the makefile
  582. (this is equivalent to the common Make construct of \fI".IGNORE :"\fP
  583. but has been modified to the notion of an attribute instead of
  584. a special target).
  585. Not all of the attributes have global meaning.
  586. In particular, .LIBRARY, .NOSTATE, .PHONY, .SETDIR, .SYMBOL and .UPDATEALL
  587. have no assigned global meaning.
  588. .PP
  589. Any attribute may be used with any target, even with the special targets.
  590. Some combinations are useless (e.g. .INCLUDE .PRECIOUS: ... ),
  591. while others are useful (e.g. .INCLUDE .IGNORE : "file.mk" will not complain
  592. if file.mk cannot be found using the include file search rules,
  593. see the section on SPECIAL TARGETS for a description of .INCLUDE).
  594. If a specified attribute will not be used with the special target a warning
  595. is issued and the attribute is ignored.
  596. .SH MACROS
  597. .B dmake
  598. supports six types of macro assignment.
  599. .sp
  600. .IP "\fBMACRO = LINE\fP" 1.55i
  601. This is the most common and familiar form of macro assignment.  It assigns
  602. LINE literally as the value of MACRO.
  603. Future expansions of MACRO recursively expand its value.
  604. .IP "\fBMACRO *= LINE\fP" 1.55i
  605. This form behaves exactly as the simple '=' form with the exception that if
  606. MACRO already has a value then the assignment is not performed.
  607. .IP "\fBMACRO := LINE\fP" 1.55i
  608. This form differs from the simple '=' form in that it expands LINE
  609. prior to assigning it as the value of MACRO.
  610. Future expansions of MACRO do not recursively expand its value.
  611. .IP "\fBMACRO *:= LINE\fP" 1.55i
  612. This form behaves exactly as the ':=' form with the exception that if
  613. MACRO already has a value then the assignment and expansion are not performed.
  614. .IP "\fBMACRO += LINE\fP" 1.55i
  615. This form of macro assignment allows macro values to grow.  It takes the
  616. literal value of LINE and appends it to the previous value of MACRO separating
  617. the two by a single space.
  618. Future expansions of MACRO recursively expand its value.
  619. .IP "\fBMACRO +:= LINE\fP" 1.55i
  620. This form is similar to the '+=' form except that the value of LINE is expanded
  621. prior to being added to the value of MACRO.
  622. .PP
  623. Macro expressions specified on the command line allow the macro value
  624. to be redefined within the makefile only if the macro is defined using
  625. the '+=' and '+:=' operators.  Other operators will define a macro that cannot
  626. be further modified.
  627. .PP
  628. When \fBdmake\fP defines a non-environment macro it strips leading and
  629. trailing white space from the macro value.
  630. Macros imported from the environment via either the .IMPORT special
  631. target (see the SPECIAL TARGETS section), or the \fB\-e\fP, or \fB\-E\fP flags
  632. are an exception to this rule.  Their values are
  633. always taken literally and white space is never stripped.
  634. In addition, named macros defined using the .IMPORT special target do
  635. not have their values expanded when they are used within a makefile.
  636. In contrast, environment macros that are imported
  637. due to the specification of the \fB\-e\fP or \fB\-E\fP flags
  638. are subject to expansion when used.
  639. .PP
  640. To specify a macro expansion
  641. enclose the name in () or {} and precede it with a dollar sign $.
  642. Thus $(TEST) represents an expansion of the macro variable named TEST.
  643. If TEST is
  644. defined then $(TEST) is replaced by its expanded value.  If TEST is not
  645. defined then $(TEST) expands to the NULL string (this is equivalent to
  646. defining a macro as 'TEST=' ).  A short form may be used for single character
  647. named macros.  In this case the parentheses are optional, and $(I) is
  648. equivalent to $I.
  649. Macro expansion is recursive, hence, if the value string contains an expression
  650. representing a macro expansion, the expansion is performed.  Circular macro
  651. expansions are detected and cause an error to be issued.
  652. .PP
  653. When defining a macro the given macro name is first expanded before being used
  654. to define the macro.  Thus it is possible to define macros whose names
  655. depend on values of other macros.  For example, suppose CWD is defined as
  656. .sp
  657. \tCWD = $(PWD:b)
  658. .sp
  659. then the value of $(CWD) is the name of the current directory.
  660. This can be used to define macros specific to this directory, for
  661. example:
  662. .sp
  663. \t_$(CWD).prt = list of files to print...
  664. .sp
  665. The actual name of the defined macro is a function of the current directory.
  666. A construct such as this is useful when processing a hierarchy of directories
  667. using .SETDIR attributed targets and a collection of small distributed
  668. makefile stubs.
  669. .PP
  670. Macro variables may be defined within the makefile, on the command
  671. line, or imported from the environment.
  672. .PP
  673. .B \fBdmake\fR
  674. supports several non-standard macro expansions:
  675. The first is of the form:
  676. .RS
  677. .IP \fI$(macro_name:modifier_list:modifier_list:...)\fR
  678. .RE
  679. .LP
  680. where
  681. .I modifier_list
  682. is chosen from the set { D or d, F or f, B or b, S or s, T or t } and
  683. .RS
  684. .sp
  685. .Is "d "
  686. .Ii "d "
  687. \- directory portion of all path names
  688. .Ii "f"
  689. \- file (including suffix) portion of path names
  690. .Ii "b"
  691. \- file (not including suffix) portion of path names
  692. .Ii "s"
  693. \- simple pattern substitution
  694. .Ii "t"
  695. \- tokenization.
  696. .sp
  697. .RE
  698. Thus if we have the example:
  699. .LP
  700. \ttest = d1/d2/d3/a.out f.out d1/k.out
  701. .LP
  702. The following macro expansions produce the values on the right of '\(->' after
  703. expansion.
  704. .RS
  705. .sp
  706. .Is "$(test:s/out/in/:f)  "
  707. .Ii "$(test:d)"
  708. \(-> d1/d2/d3/ d1/
  709. .Ii "$(test:b)"
  710. \(-> a f k
  711. .Ii "$(test:f)"
  712. \(-> a.out f.out k.out
  713. .Ii "${test:db}"
  714. \(-> d1/d2/d3/a f d1/k
  715. .Ii "${test:s/out/in/:f}"
  716. \(-> a.in f.in k.in
  717. .Ii $(test:f:t"+")
  718. \(-> a.out+f.out+k.out
  719. .RE
  720. .PP
  721. If a token ends in a string composed from the value of the macro DIRBRKSTR
  722. (ie. ends in a directory separator string, e.g. '/' in UNIX) and you use the
  723. \fB:d\fP modifier then the expansion returns the directory name less the
  724. final directory separator string.  Thus successive pairs of :d modifiers
  725. each remove a level of directory in the token string.
  726. .PP
  727. The tokenization modifier takes all white space separated tokens from the
  728. macro value and separates them by the quoted separator string.  The separator
  729. string may contain the following escape codes \ea => <bel>,
  730. \&\eb => <backspace>, \ef => <formfeed>, \en => <nl>, \er => <cr>,
  731. \&\et => <tab>, \ev => <vertical tab>, \e" => ", and \exxx => <xxx> where
  732. xxx is the octal representation of a character.  Thus the
  733. expansion:
  734. .LP
  735. .RS
  736. .nf
  737. $(test:f:t"+\en")
  738. .RE
  739. produces:
  740. .RS
  741. a.out+
  742. f.out+
  743. k.out
  744. .fi
  745. .RE
  746. .PP
  747. The second non-standard form of macro expansion allows for recursive macros.
  748. It is possible to specify a $(\fImacro_name\fR) or ${\fImacro_name\fR} expansion
  749. where \fImacro_name\fR contains more $( ... ) or ${ ... } macro expansions
  750. itself.
  751. .PP
  752. For example $(CC$(_HOST)$(_COMPILER)) will first expand CC$(_HOST)$(_COMPILER)
  753. to get a result and use that result as the name of the macro to expand.
  754. This is useful for writing a makefile for more than one target
  755. environment.  As an example consider the following hypothetical case. 
  756. Suppose that _HOST and _COMPILER are imported from the environment
  757. and are set to represent the host machine type and the host compiler
  758. respectively.
  759. .RS
  760. .sp
  761. .nf
  762. CFLAGS_VAX_CC = \-c \-O     # _HOST == "_VAX", _COMPILER == "_CC"
  763. CFLAGS_PC_MSC = \-c \-ML # _HOST == "_PC",  _COMPILER == "_MSC"
  764. .sp
  765. # redefine CFLAGS macro as:
  766. .sp
  767. CFLAGS := $(CFLAGS$(_HOST)$(_COMPILER))
  768. .fi
  769. .sp
  770. .RE
  771. This causes CFLAGS to take on a value that corresponds to the
  772. environment in which the make is being invoked.
  773. .PP
  774. The final non-standard macro expansion is of the form:
  775. .RS
  776. .sp
  777. string1{token_list}string2
  778. .RE
  779. .LP
  780. where string1, string2 and token_list are expanded.  After expansion,
  781. string1 is prepended to each token found in token_list and
  782. string2 is appended to each resulting token from the previous prepend.
  783. string1 and string2 are not delimited by white space
  784. whereas the tokens in token_list are.
  785. A null token in the token list 
  786. is specified using "".
  787. Thus using another example we have:
  788. .RS
  789. .sp
  790. .Is "test/{f1  f2}.o    "
  791. .Ii "test/{f1 f2}.o"
  792. --> test/f1.o test/f2.o
  793. .Ii "test/ {f1 f2}.o"
  794. --> test/ f1.o f2.o
  795. .Ii "test/{f1 f2} .o"
  796. --> test/f1 test/f2 .o
  797. .Ii "test/{""f1""  """"}.o"
  798. --> test/f1.o test/.o
  799. .sp
  800. .Ii and
  801. .sp
  802. .Is "test/{d1 d2}/{f1 f2}.o --> "
  803. .Ii "test/{d1 d2}/{f1 f2}.o --> "
  804. test/d1/f1.o test/d1/f2.o
  805. test/d2/f1.o test/d2/f2.o
  806. .sp
  807. .RE
  808. This last expansion is activated only when the first characters of
  809. .I token_list
  810. appear immediately after the opening '{' with no intervening white space.
  811. The reason for this restriction is the following incompatibility with
  812. Bourne Shell recipes.  The line
  813. .RS
  814. .sp
  815. { echo hello;}
  816. .sp
  817. .RE
  818. is valid /bin/sh syntax; while
  819. .RS
  820. .sp
  821. {echo hello;}
  822. .sp
  823. .RE
  824. is not.
  825. Hence the latter triggers the enhanced macro expansion while the former
  826. causes it to be suppressed.
  827. See the SPECIAL MACROS section for a description of the special macros that
  828. \fBdmake\fP defines and understands.
  829. .SH "RULES AND TARGETS"
  830. A makefile contains a series of entries that specify dependencies.
  831. Such entries are called \fItarget/prerequisite\fP or \fIrule\fP definitions.
  832. Each rule definition
  833. is optionally followed by a set of lines that provide a recipe for updating
  834. any targets defined by the rule.
  835. Whenever
  836. .B dmake
  837. attempts to bring a target up to date and an explicit recipe is provided with
  838. a rule defining the target, that recipe is used to update the
  839. target.  A rule definition begins with a line having the following syntax:
  840. .sp
  841. .RS
  842. .nf
  843. \fI<targets>\fP [\fI<attributes>\fP] \fI<ruleop>\fP [\fI<prerequisites>\fP] [;\fI<recipe>\fP]
  844. .fi
  845. .RE
  846. .sp
  847. .I targets
  848. is a non-empty list of targets.  If the target is a
  849. special target (see SPECIAL TARGETS section below) then it must appear alone
  850. on the rule line.  For example:
  851. .sp
  852. .RS
  853. \&.IMPORT .ERROR : ...
  854. .RE
  855. .sp
  856. is not allowed since both .IMPORT and .ERROR are special targets.
  857. Special targets are not used in the construction of the dependency graph and
  858. will not be made.
  859. .PP
  860. .I attributes
  861. is a possibly empty list of attributes.  Any attribute defined in the
  862. ATTRIBUTES section above may be specified.  All attributes will be applied to
  863. the list of named targets in the rule definition.  No other targets will
  864. be affected.
  865. .sp
  866. .IP NOTE: 0.75i
  867. As stated earlier,
  868. if both the target list and prerequisite list are empty but the attributes
  869. list is not, then the specified attributes affect all targets in the makefile.
  870. .sp
  871. .PP
  872. .I ruleop
  873. is a separator which is used to identify the targets from the prerequisites.
  874. Optionally it also provides a facility for modifying the way in which
  875. .B dmake
  876. handles the making of the associated targets.
  877. In its simplest form the operator is a single ':', and need not be separated
  878. by white space from its neighboring tokens.  It may additionally be followed
  879. by any of the modifiers { !, ^, \-, : }, where:
  880. .sp
  881. .IP \fB!\fP
  882. says execute the recipe for the associated targets once for each out of date
  883. prerequisite.  Ordinarily the recipe is executed
  884. once for all out of date prerequisites at the same time.
  885. .IP \fB^\fP
  886. says to insert the specified prerequisites, if any, before any
  887. other prerequisites already associated with the specified targets.
  888. In general, it is not useful to specify ^ with an empty
  889. list of prerequisites.
  890. .IP \fB\-\fP
  891. says to clear the previous list of prerequisites before adding
  892. the new prerequisites.  Thus,
  893. .sp
  894. \t.SUFFIXES :
  895. .br
  896. \t.SUFFIXES : .a .b
  897. .sp
  898. can be replaced by
  899. .sp
  900. \t.SUFFIXES :\- .a .b
  901. .sp
  902. however the old form still works as expected.  NOTE:  .SUFFIXES is ignored by
  903. .B dmake
  904. it is used here simply as an example.
  905. .IP \fB:\fP
  906. When the rule operator is not modified by a second ':'
  907. only one set of rules may be specified for making a target.
  908. Multiple definitions may be used to add to the
  909. list of prerequisites that a target depends on.
  910. However, if a target is multiply defined
  911. only one definition may specify a recipe
  912. for making the target.
  913. .sp
  914. When a target's rule operator is modified by a second ':'
  915. (:: for example) then this definition may not be the only
  916. definition with a recipe for the target.  There may be other :: target
  917. definition lines that specify a different set of prerequisites with a
  918. different recipe for updating the target.  
  919. Any such target is made if any of the definitions
  920. find it to be out of date
  921. with respect to the related prerequisites
  922. and the corresponding recipe is used to update the
  923. target.
  924. .sp 
  925. In the following simple example, each rule has a `::' \fIruleop\fP.  In such an
  926. operator we call the first `:' the operator, and the second `:' the modifier.
  927. .sp
  928. .nf
  929. a.o :: a.c b.h
  930. X   first recipe for making a.o
  931. X
  932. a.o :: a.y b.h
  933. X   second recipe for making a.o
  934. .fi
  935. .sp
  936. If a.o is found to be out of date with respect to a.c then the first recipe
  937. is used to make a.o.  If it is found out of date with respect to a.y then
  938. the second recipe is used.  If a.o is out of date with respect to
  939. b.h then both recipes are invoked to make a.o.
  940. In the last case the order of invocation corresponds to the order in which the
  941. rule definitions appear in the makefile.
  942. .PP
  943. Targets defined using a single `:' operator
  944. with a recipe may be redefined again with a new recipe by using a
  945. `:' operator with a `:' modifier.
  946. This is equivalent to a target having been
  947. initially defined with a rule using a `:' modifier.
  948. Once a target is defined using a `:'
  949. modifier it may not be defined again with a recipe using only the `:' operator
  950. with no `:' modifier.  In both cases the use of a `:' modifier creates a new
  951. list of prerequisites and makes it the current prerequisite list for the target.
  952. The `:' operator with no recipe always modifies the current list
  953. of prerequisites.
  954. Thus assuming each of the following definitions has a recipe attached, then:
  955. .RS
  956. .sp
  957. .nf
  958. joe :  fred ...    (1)
  959. joe :: more ...    (2)
  960. .sp
  961. and
  962. .sp
  963. joe :: fred ...    (3)
  964. joe :: more ...    (4)
  965. .sp
  966. .fi
  967. .RE
  968. are legal and mean:  add the recipe associated with (2), or (4) to the set
  969. of recipes for joe, placing them after existing recipes for
  970. making joe.
  971. The constructs:
  972. .RS
  973. .sp
  974. .nf
  975. joe :: fred ...    (5)
  976. joe : more ...    (6)
  977. .sp
  978. and
  979. .sp
  980. joe : fred ...    (7)
  981. joe : more ...    (8)
  982. .sp
  983. .fi
  984. .RE
  985. are errors since we have two sets of perfectly good recipes for
  986. making the target.
  987. .PP
  988. .I prerequisites
  989. is a possibly empty list of targets that must be brought up to date before
  990. making the current target.
  991. .PP
  992. .I recipe
  993. is a short form and allows the user to specify short rule definitions
  994. on a single line.
  995. It is taken to be the first recipe line in a larger recipe
  996. if additional lines follow the rule definition.
  997. If the semi-colon is present but the recipe line is empty (ie. null string)
  998. then it is taken
  999. to be an empty rule.  Any target so defined causes the
  1000. .I "Don't know how to make ..."
  1001. error message to be suppressed when
  1002. .B dmake
  1003. tries to make the target and fails.
  1004. This silence is maintained for rules that are terminated
  1005. by a semicolon and have no following recipe lines, for targets listed on the
  1006. command line, for the first target found in the makefile, and for any target
  1007. having no recipe but containing a list of prerequisites (see the COMPATIBILITY
  1008. section for an exception to this rule if the AUGMAKE (\fB\-A\fP) flag
  1009. was specified.
  1010. .SH "RECIPES"
  1011. The traditional format used by most versions of Make defines the recipe
  1012. lines as arbitrary strings that may contain macro expansions.  They
  1013. follow a rule definition line and may be spaced
  1014. apart by comment or blank lines.
  1015. The list of recipe lines defining the recipe is terminated by a new target
  1016. definition, a macro definition, or end-of-file.
  1017. Each recipe line
  1018. .B MUST
  1019. begin with a \fB<TAB>\fP character which
  1020. may optionally be followed with one or all
  1021. of the characters
  1022. .IR "'@%+\-'" "."
  1023. The
  1024. .I "'\-'"
  1025. indicates that non-zero exit values (ie. errors)
  1026. are to be ignored when this recipe line is executed, the
  1027. .I "'\+'"
  1028. indicates that the current recipe line is to be executed using the shell, the
  1029. .I "'%'"
  1030. indicates that
  1031. .B dmake
  1032. should swap itself out to secondary storage (MSDOS only) before running the
  1033. recipe and the
  1034. .I "'@'"
  1035. indicates that the recipe line should NOT be echoed to the terminal prior to
  1036. being executed.  Each switch is off by default
  1037. (ie. by default, errors are significant, commands are echoed, no swapping is
  1038. done and a shell is
  1039. used only if the recipe line contains a character found in the value of the
  1040. SHELLMETAS macro).
  1041. Global settings activated via command line options or special attribute or
  1042. target names may also affect these settings.
  1043. An example recipe:
  1044. .sp
  1045. .RS
  1046. .nf
  1047. target :
  1048. \tfirst recipe line
  1049. \tsecond recipe line, executed independently of the first.
  1050. \t@a recipe line that is not echoed
  1051. \t\-and one that has errors ignored
  1052. \t%and one that causes dmake to swap out
  1053. \t\+and one that is executed using a shell.
  1054. .fi
  1055. .RE
  1056. .PP
  1057. The second and new format of the recipe block begins the block with the
  1058. character '[' (the open group character) in the last non-white space
  1059. position of a line, and terminates the
  1060. block with the character ']' (the close group character)
  1061. in the first non-white space position of a line.
  1062. In this form each recipe line need not have a leading TAB.  This is
  1063. called a recipe group.  Groups so defined are fed intact as a single
  1064. unit to a shell for execution whenever the corresponding target needs to
  1065. be updated.  If the open group character '[' is preceded
  1066. by one or all of \-, @ or %
  1067. then they apply to the entire group in the same way that they
  1068. apply to single recipe lines.  You may also specify '+' but it is
  1069. redundant as a shell is already being used to run the recipe.
  1070. See the MAKING TARGETS section for a description of how
  1071. .B dmake
  1072. invokes recipes.
  1073. Here is an example of a group recipe:
  1074. .sp
  1075. .RS
  1076. .nf
  1077. target :
  1078. [
  1079. \tfirst recipe line
  1080. \tsecond recipe line
  1081. \tall of these recipe lines are fed to a
  1082. \tsingle copy of a shell for execution.
  1083. ]
  1084. .fi
  1085. .RE
  1086. .sp
  1087. .SH "TEXT DIVERSIONS"
  1088. .B dmake
  1089. supports the notion of text diversions.
  1090. If a recipe line contains the macro expression
  1091. .RS
  1092. .sp
  1093. $(mktmp[,[\fIfile\fP][,\fItext\fP]] \fIdata\fP)
  1094. .sp
  1095. .RE
  1096. then all text contained in the \fIdata\fP expression is expanded and
  1097. is written to a temporary file.  The return
  1098. value of the macro is the name of the temporary file.
  1099. .PP
  1100. .I data
  1101. can be any text and must be separated from the 'mktmp' portion of the
  1102. macro name by white-space.  The only restriction on the data text is that
  1103. it must contain a balanced number of parentheses of the same kind as are
  1104. used to initiate the $(mktmp ...) expression.  For example:
  1105. .sp
  1106. \t$(mktmp $(XXX))
  1107. .sp
  1108. is legal and works as expected, but:
  1109. .sp
  1110. \t$(mktmp text (to dump to file)
  1111. .sp
  1112. is not legal.  You can achieve what you wish by either defining a macro that
  1113. expands to '(' or by using {} in the macro expression; like this:
  1114. .sp
  1115. \t${mktmp text (to dump to file}
  1116. SHAR_EOF
  1117. true || echo 'restore of dmake/man/dmake.tf failed'
  1118. fi
  1119. echo 'End of part 17, continue with part 18'
  1120. echo 18 > _shar_seq_.tmp
  1121. exit 0
  1122. exit 0 # Just in case...
  1123.