home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / nmake32.zip / nmake32.inf (.txt) < prev   
OS/2 Help File  |  2000-10-20  |  73KB  |  2,751 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. About This Book ΓòÉΓòÉΓòÉ
  3.  
  4. This document describes the Enhanced Program Maintenance Utility (NMAKE32). 
  5. This is a new utility that provides a superset of the features found in the 
  6. "legacy" NMAKE utility.  Since there are some behavioral differences between 
  7. the new and old versions of the tool, they are being provided separately so 
  8. that users can select the version that works best for them. 
  9.  
  10.  
  11. ΓòÉΓòÉΓòÉ 1.1. Enhanced Program Maintenance Utility (NMAKE32) ΓòÉΓòÉΓòÉ
  12.  
  13. Purpose 
  14.  
  15. The Enhanced Program Maintenance Utility (NMAKE32) automates the process of 
  16. updating project files and can be used to make backups, configure data files, 
  17. and run programs when data files are modified. 
  18.  
  19. Description 
  20.  
  21. The Enhanced Program Maintenance Utility (NMAKE32) compares the modification 
  22. dates for one set of files (the target files) with those of another set of 
  23. files (the dependent files).  If any dependent files have changed more recently 
  24. than the target files, NMAKE32 executes a series of commands to bring the 
  25. targets up-to-date. 
  26.  
  27.  
  28. ΓòÉΓòÉΓòÉ 2. Program Maintenance Utility Program (NMAKE32) ΓòÉΓòÉΓòÉ
  29.  
  30. The purpose of the NMAKE32 tool is to automate the process of updating project 
  31. files.  NMAKE32 compares the modification dates for one set of files (the 
  32. target files) with those of another set of files (the dependent files). If any 
  33. dependent files have changed more recently than the target files, NMAKE32 
  34. executes a series of commands to bring the targets up-to-date. 
  35.  
  36.  
  37. ΓòÉΓòÉΓòÉ 2.1. Why Use NMAKE32? ΓòÉΓòÉΓòÉ
  38.  
  39. Large projects tend to have many source files.  Often, only a few source files 
  40. need to be compiled when a change is made.  NMAKE32 allows a user to set up a 
  41. special file called a "description" file (or "makefile") that tells NMAKE32: 
  42.  
  43.      Which files depend on others 
  44.  
  45.      Which commands, such as compile and link commands, need to be carried out 
  46.       to bring programs up to date. 
  47.  
  48.  This use of NMAKE32 is only one example of its power.  By building suitable 
  49.  description files, NMAKE32 can be used to: 
  50.  
  51.      Make backups 
  52.  
  53.      Configure data files 
  54.  
  55.      Run programs when data files are modified. 
  56.  
  57.  
  58. ΓòÉΓòÉΓòÉ 2.2. Upgrading from prior versions of NMAKE ΓòÉΓòÉΓòÉ
  59.  
  60. Relative to older versions of NMAKE, NMAKE32 provides a richer set of functions 
  61. including: 
  62.  
  63.  Transformation macros            Transformation macros manipulate strings and 
  64.                                   can be used for pattern matching and for 
  65.                                   conversions from upper to lower case and vice 
  66.                                   versa. 
  67.  
  68.  Built-in commands                Built-in commands are commands processed 
  69.                                   internally by NMAKE32 to perform basic 
  70.                                   operations such as changing directories or 
  71.                                   setting environment variables. 
  72.  
  73.  Built-in functions               Built-in functions are provided that can be 
  74.                                   used in conditional constructs to test such 
  75.                                   things as the return code from the last 
  76.                                   command executed. 
  77.  
  78.  New and improved directives      Directives can now be used at run-time as 
  79.                                   part of a command block.  Two new directives, 
  80.                                   !elseif and !tryinclude have been added. 
  81.  
  82.  New macro assignments            Macro assignments can now use =+ and += to 
  83.                                   append a string to either the beginning or 
  84.                                   the end of an existing definition. 
  85.  
  86.  Be sure to read Migration Considerations for a few differences between NMAKE32 
  87.  and previous versions of NMAKE. 
  88.  
  89.  
  90. ΓòÉΓòÉΓòÉ 2.2.1. Migration Considerations ΓòÉΓòÉΓòÉ
  91.  
  92. NMAKE32 is fully compatible with previous versions of NMAKE with the following 
  93. exceptions: 
  94.  
  95.      When the -n option is specified, only commands prefixed with & or $(MAKE) 
  96.       are executed. 
  97.  
  98.      Parentheses must be used to group expressions in directives that contain 
  99.       multiple expressions. 
  100.  
  101.      Control characters used in filenames and pathnames in a makefile must be 
  102.       preceded by a caret (^) character so that they are not evaluated by 
  103.       NMAKE32.  This is especially important in pathnames where an ending 
  104.       backslash character could erroneously be treated as the line 
  105.       concatenation operation by NMAKE32 instead of the literal backslash 
  106.       character intended by the makefile writer. 
  107.  
  108.      A pseudo-target without a dependent must contain a command block. 
  109.  
  110.  
  111. ΓòÉΓòÉΓòÉ 2.3. Command-Line Syntax ΓòÉΓòÉΓòÉ
  112.  
  113. NMAKE32 accepts certain flags on the command line, each of which may be 
  114. specified in upper or lowercase (or any combination). Flags may be listed 
  115. together following a single "-" or "/" sign. For example, the following 
  116. invocations are equivalent: 
  117.  
  118. nmake32 -N /d -P
  119.  
  120. nmake32 /n -dP
  121.  
  122. nmake32 /ndp
  123.  
  124. Some flags require an additional value. In every case, the value must be 
  125. specified as a separate argument at invocation. If more than one flag that 
  126. requires a value is given, the values are assigned in the order that the flags 
  127. were specified. For example, the following invocations are equivalent: 
  128.  
  129. nmake32 -FBD mymake.fil mybuilt.ins
  130.  
  131. nmake32 -D -F mymake.fil -B mybuild.ins
  132.  
  133. Following is the general syntax for NMAKE32: 
  134.  
  135. nmake32  [flags]  [targets]  [var=val]  [@responsefile]
  136.  
  137.  
  138. ΓòÉΓòÉΓòÉ 2.3.1. Command-Line Options ΓòÉΓòÉΓòÉ
  139.  
  140. The flags can be one or more of the following options: 
  141.  
  142.  -?, -h, -help       Display the help information and exit. 
  143.  
  144.  -a                  Rebuild all targets regardless of the date or timestamp of 
  145.                      the dependent files. 
  146.  
  147.  -b builtins_file    Use the description file specified by builtins_file 
  148.                      instead of the default description file name of 
  149.                      BUILTINS.MAK. 
  150.  
  151.  -c                  Suppress the display of the NMAKE32 sign-on banner, 
  152.                      nonfatal error messages, and warning messages. 
  153.  
  154.  -d                  Display a trace of the execution as it checks each target 
  155.                      against its dependents and prints the dates. NMAKE32 also 
  156.                      prints a macro substitution trace. 
  157.  
  158.  -e                  The values of environment variables will override the 
  159.                      values in the makefile. 
  160.  
  161.  -f filename         Use the description file specified by filename instead of 
  162.                      the default description file name of MAKEFILE. If the 
  163.                      specified description file is left blank, then the 
  164.                      description file is read from standard input. 
  165.  
  166.  -i                  Do not terminate execution when a command returns a 
  167.                      non-zero return code. Continue to process all targets. 
  168.  
  169.  -k                  Do not terminate execution when a command returns a 
  170.                      non-zero return code. Continue to process targets which do 
  171.                      not depend on the failed target. 
  172.  
  173.  -l                  Do not combine contiguous spaces into a single space. 
  174.  
  175.  -n                  Instead of directly invoking the commands, NMAKE32 will 
  176.                      only display the commands that would have been executed 
  177.                      based on the evaluation of conditionals. The $(MAKE) 
  178.                      command and commands prefaced with & are always executed. 
  179.                      All commands are displayed, even those prefaced with @. 
  180.  
  181.                      It is important to prefix any command that must be 
  182.                      executed when using this option with &.  For instance, if 
  183.                      a change directory (CD) command must be performed for 
  184.                      NMAKE32 to locate a file, this CD command must be prefixed 
  185.                      with an & so that the appropriate file is found when using 
  186.                      the -n option. 
  187.  
  188.  -o[+] batch_file    Instead of directly invoking the commands, NMAKE32 creates 
  189.                      the specified custom batch_file listing the commands. The 
  190.                      flag -o will overwrite the specified batch_file and the 
  191.                      flag -o+ will append to the specified batch_file. If the 
  192.                      specified file cannot be opened, NMAKE32 will write the 
  193.                      commands to the standard output device. The custom batch 
  194.                      file will contain only those commands which are needed, no 
  195.                      extraneous messages will be written. 
  196.  
  197.  -p                  Prints out the contents of the internal data structures: 
  198.                      macros, rules (targets and dependents), and commands. 
  199.  
  200.  -q                  Queries the target and determines if it is up to date. 
  201.                      Exits with a "0" return code if the target(s) are up to 
  202.                      date, or returns the number of out-of-date targets if the 
  203.                      target(s) are not up to date. Also, this sets the -n and 
  204.                      -s flags. 
  205.  
  206.  -r                  Reject default values mode. Does not read the default 
  207.                      TOOLS.INI or BUILTINS.MAK files. Does not use the built-in 
  208.                      extensions for inference rule processing (.SUFFIXES). Does 
  209.                      not define default macros AS ( masm ), CC ( icc ), COBOL ( 
  210.                      cobol), FOR (fl ),  PASCAL ( pl ), or  RC ( rc ). Does not 
  211.                      define default inference rules. 
  212.  
  213.  -s                  Do not display the commands as they are executed. This has 
  214.                      the same meaning as the .SILENT: target in the makefile. 
  215.  
  216.  -t                  Touch all out of date targets with the current date and 
  217.                      time without rebuilding them. If a target does not exist, 
  218.                      it is created with the current date and time and a length 
  219.                      of 0. 
  220.  
  221.  -v                  Macro names are case-insensitive as opposed to 
  222.                      case-sensitive. Macros defined from the environment will 
  223.                      be defined in uppercase. 
  224.  
  225.  -x errfile          Redirects error messages (stderr) to the specified file, 
  226.                      errfile. 
  227.  
  228.  -\                  Do not place a space between continued lines. The two 
  229.                      lines are to be continued exactly as they appear in the 
  230.                      description file after the backslash is removed. 
  231.  
  232.  -=                  Select whether or not to build when target/dependent 
  233.                      timestamps are equal.  The default is to build when the 
  234.                      timestamps are equal. 
  235.  
  236.  -nologo             Suppresses the NMAKE32 sign-on banner without suppressing 
  237.                      other messages. 
  238.  
  239.  Other command-line options are: 
  240.  
  241.  targets             A list of one or more targets to be built. Because OS/2 is 
  242.                      case-insensitive, targets can be specified in upper or 
  243.                      lower case. If a target is not specified, NMAKE32 will 
  244.                      attempt to rebuild the first target specified in the 
  245.                      description file. 
  246.  
  247.  var=val             Creates the variable var and assigns it the value val. If 
  248.                      there are any spaces in this option, it must be enclosed 
  249.                      in double quotes. This definition overrides all other 
  250.                      definitions of this variable. 
  251.  
  252.  @responsefile       The file, responsefile, contains additional command-line 
  253.                      input to NMAKE32. 
  254.  
  255.  
  256. ΓòÉΓòÉΓòÉ 2.4. Using NMAKE32 Response Files ΓòÉΓòÉΓòÉ
  257.  
  258. Input to NMAKE32 can be split between the command line and a response file. The 
  259. name of a response file (preceded by @), can be used as a command-line option. 
  260. A response file can be used for: 
  261.  
  262.      Complex and long commands 
  263.  
  264.      Strings of command-line arguments, such as macro definitions, that exceed 
  265.       the limit for command-line length. 
  266.  
  267.  
  268. ΓòÉΓòÉΓòÉ 2.4.1. Command File Syntax ΓòÉΓòÉΓòÉ
  269.  
  270. nmake32 @responsefile
  271.  
  272. NMAKE32 treats line breaks that occur between arguments as spaces.  Macro 
  273. definitions can span multiple lines if each line is terminated with a backslash 
  274. (\).  Macro definitions that contain spaces must be enclosed by quotation 
  275. marks, just as if they were entered directly on the command line. 
  276.  
  277. The following is an example of a response file called UPDATE: 
  278.  
  279.      /s "program\
  280.     = flash" SORT.EXE SEARCH.EXE
  281.  
  282. To use this response file type the following command: 
  283.  
  284.     nmake32 @update
  285.  
  286. This response file runs NMAKE32 using: 
  287.  
  288.      The /s option 
  289.      The macro definition "program = flash" 
  290.      The targets specified as SORT.EXE and SEARCH.EXE 
  291.      The description file MAKEFILE by default 
  292.  
  293.  Note that the backslash allows the macro definition to span multiple lines. 
  294.  
  295.  
  296. ΓòÉΓòÉΓòÉ 2.5. The NMAKE32 Environment ΓòÉΓòÉΓòÉ
  297.  
  298. NMAKE32 automatically accesses all environment variables, converting each into 
  299. a macro of the same name.  Following is the evaluation precedence of macros: 
  300.  
  301.  Priority         Definition 
  302.  
  303.  1  (Highest)     Macros from the command-line 
  304.  
  305.  2                Macros from the description file and its include files. 
  306.  
  307.  3                Environment variables. 
  308.  
  309.  4                Macros from TOOLS.INI or BUILTINS.MAK 
  310.  
  311.  5  (Lowest)      Predefined macros (such as MAKEDIR or TIMESTAMP) 
  312.  
  313.  Note that macro definitions found at a higher priority replace macro 
  314.  definitions at a lower priority (for example, macros from the description file 
  315.  replace macros from the built-ins file). 
  316.  
  317.  The -e flag causes macros defined from environment variables to overwrite 
  318.  previously defined macros (switches the processing of numbers 2 and 3). 
  319.  
  320.  The MAKEFLAGS environment variable is generated by NMAKE32 to contain all 
  321.  input flags specified on the NMAKE32 command line, except for the -b, -f, -x, 
  322.  -o and -p flags (and their corresponding values). 
  323.  
  324.  If it is not already in the environment, NMAKE32 creates the MAKEFLAGS 
  325.  variable and sets it according to the current flags, and passes it on to 
  326.  nested NMAKE32 invocations as they are called. Therefore, MAKEFLAGS  always 
  327.  contains the current input flags. 
  328.  
  329.  Each time NMAKE32 is executed, it reads the MAKEFLAGS  variable from the 
  330.  environment. If it exists and is non-null, its contents are processed before 
  331.  the NMAKE32 command line is processed. 
  332.  
  333.  
  334. ΓòÉΓòÉΓòÉ 2.5.1. The TOOLS.INI File ΓòÉΓòÉΓòÉ
  335.  
  336. NMAKE32 can use a file named TOOLS.INI for initialization information. NMAKE32 
  337. looks for the TOOLS.INI file in the current directory, and then in the 
  338. directory specified by the INIT environment variable.  If NMAKE32 finds a 
  339. TOOLS.INI file, it looks for the following section name: 
  340.  
  341. [nmake]
  342.  
  343. Note:  This section name is case-insensitive. If a TOOLS.INI file is to be 
  344. processed, it must contain an "[nmake]" section, even if the section is empty. 
  345. NMAKE32 will generate a warning if this section name is missing, and will 
  346. attempt to process the BUILTINS.MAK file. 
  347.  
  348. The only valid information the user can place in this section are macros and 
  349. inference rules using the same format specified for description files. 
  350. However, if a description file and TOOLS.INI both contain a definition for the 
  351. same macro or inference rule with the same extensions, the definition in the 
  352. description file overrides the definition in TOOLS.INI.  The TOOLS.INI file can 
  353. be used to customize default options for NMAKE32.  For example, if an inference 
  354. rule is needed for several description files, instead of modifying all the 
  355. description files, the rule can be added to the TOOLS.INI file. 
  356.  
  357. Example: 
  358.  
  359. Given the following TOOLS.INI excerpt: 
  360.  
  361.     [nmake]
  362.     CFLAGS=
  363.     .c.obj:
  364.         $(CC) -c $(CFLAGS) $*.c
  365.  
  366. These lines: 
  367.  
  368.      Define the CFLAGS macro as a null string 
  369.  
  370.      Redefine the predefined inference rule to build .obj files from .c source 
  371.       files using the CFLAGS macro. 
  372.  
  373.  
  374. ΓòÉΓòÉΓòÉ 2.5.2. The BUILTINS.MAK File ΓòÉΓòÉΓòÉ
  375.  
  376. In addition to the TOOLS.INI file, NMAKE32 supports the use of an optional file 
  377. named BUILTINS.MAK.  NMAKE32 will process either the TOOLS.INI or the 
  378. BUILTINS.MAK file.  If a TOOLS.INI file is not found, or the nmake section does 
  379. not exist, NMAKE32 automatically searches for the BUILTINS.MAK file in the 
  380. current directory or the file as specified by the -b flag.  When an 
  381. initialization file is processed, it is included as part of the makefile 
  382. currently being executed.  This feature allows the user to supplement the set 
  383. of predefined macros that NMAKE32 supports and to maintain an additional set of 
  384. inference rules. 
  385.  
  386. Like the TOOLS.INI file, the BUILTINS.MAK file can be used to customize default 
  387. options for NMAKE32.  For example, if an inference rule is needed for several 
  388. description files, instead of modifying all the description files, the rule can 
  389. be added to the BUILTINS.MAK file.  Unlike the TOOLS.INI file, an "[nmake]" 
  390. section is not expected.  All lines from the file are expected to be valid 
  391. description file statements. 
  392.  
  393. Example: 
  394.  
  395. The lines in the BUILTINS.MAK file below do the following: 
  396.  
  397.      Define the CFLAGS macro as a null string 
  398.  
  399.      Redefine the predefined inference rule to build .obj files from .c source 
  400.       files using the CFLAGS macro 
  401.  
  402.   CFLAGS=
  403.   .c.obj:
  404.       $(CC) -c $(CFLAGS) $*.
  405.  
  406.  
  407. ΓòÉΓòÉΓòÉ 2.5.3. Description Files ΓòÉΓòÉΓòÉ
  408.  
  409. The file that contains the set of customized rules for NMAKE32 is a special 
  410. file referred to as a description file. The default description file that 
  411. NMAKE32 will search for is named makefile.  The /f option is used to provide a 
  412. description file name when the user does not want to use the default 
  413. description file.  NMAKE32 will return an error if a description file is not 
  414. provided.  A description file consists of the following elements: 
  415.  
  416.      Description blocks 
  417.      Macro definitions 
  418.      Inference rules 
  419.      Directives 
  420.  
  421.  The following syntax rules apply to description files: 
  422.  
  423.      A target/dependency statement must begin in column one. 
  424.  
  425.      A command line must begin with a space; it cannot start in column 1. 
  426.  
  427.      A backslash(\) at the end of a line tells NMAKE32 that the next line is a 
  428.       continuation of the current line. 
  429.  
  430.      An unescaped pound sign (#) anywhere on a line in a description file 
  431.       indicates that the remainder of the line is a comment. Since the lines in 
  432.       an in-line file are processed by the command shell, specifying comments 
  433.       is specific to the shell in use. In OS/2, CMD.EXE uses rem. 
  434.  
  435.  NMAKE32 uses the target/dependency rules in the description file to determine 
  436.  if a target needs to be updated.  All dependents are recursively checked for 
  437.  being out of date with respect to their dependents.  Missing targets are 
  438.  considered to be out of date.  If a target is determined to be out of date, 
  439.  the command associated with the target/dependency statement is executed.  See 
  440.  the following example: 
  441.  
  442.       program.exe:    program.obj  abcd.obj
  443.           ilink program abcd;
  444.  
  445.       program.obj:    program.c   xxx.h
  446.           icc program.c
  447.  
  448.       abcd.obj:       abcd.c      xxx.h
  449.           icc abcd.c
  450.  
  451.  The above example description file says that program.exe depends on two files, 
  452.  program.obj and abcd.obj, and that they in turn depend on their corresponding 
  453.  files, program.c, abcd.c and a common include file, xxx.h. 
  454.  
  455.  When NMAKE32 is executed with the above description file, it would determine 
  456.  that program.exe was the main target and that abcd.obj and program.obj are the 
  457.  files that it depends on. NMAKE32 would then recursively determine that 
  458.  program.obj depends on program.c and xxx.h, and that abcd.obj depends on 
  459.  abcd.c and xxx.h. Thus, NMAKE32 constructs a graph of file dependencies. 
  460.  Starting from each node of the graph, NMAKE32 compares the modification date 
  461.  of each node (file) to its immediate descendants. If a file is older than one 
  462.  or more of its descendants, then the command associated with the file is 
  463.  executed to bring the file up to date. 
  464.  
  465.  When the above description file is processed by NMAKE32, assuming that each 
  466.  .obj file is older than the corresponding .c file, the following commands 
  467.  would be executed: 
  468.  
  469.      icc -c program.c
  470.      icc -c abcd.c
  471.      ilink program abcd;
  472.  
  473.  These are all the necessary commands to make program.exe from program.c, 
  474.  abcd.c, and xxx.h. If any of these commands encountered an error, NMAKE32 
  475.  would immediately terminate and report which command failed. 
  476.  
  477.  If the file abcd.c was modified, then executing NMAKE32 again would only 
  478.  execute the commands necessary to bring program.exe up to date. The commands 
  479.  executed now would be: 
  480.  
  481.      icc -c abcd.c
  482.      ilink program abcd;
  483.  
  484.  If the file program.exe was missing, executing NMAKE32 would execute the 
  485.  following command: 
  486.  
  487.      ilink program abcd;
  488.  
  489.  If the file xxx.h was modified, executing NMAKE32 would cause all the commands 
  490.  to be issued again because abcd.obj and program.obj depend on it. 
  491.  
  492.  
  493. ΓòÉΓòÉΓòÉ 2.6. Case Sensitivity ΓòÉΓòÉΓòÉ
  494.  
  495. NMAKE32 statements within a description file are case insensitive, except macro 
  496. names.  Macro names can be changed to be case insensitive by using the -V 
  497. option.  For example, the !IF, !if, and !If are all correct forms of the if 
  498. directive. 
  499.  
  500.  
  501. ΓòÉΓòÉΓòÉ 2.7. Read-Time vs. Run-Time ΓòÉΓòÉΓòÉ
  502.  
  503. Read-time processing occurs during the reading of the description file, in a 
  504. similar manner to the C language's preprocessor stage, and essentially 
  505. determines which parts of the description file are used. At read-time all of 
  506. the statements beginning in column 1 are processed. During read-time 
  507. processing, the graph of all targets and their dependents is built, macros are 
  508. initially defined, and directives are processed. Run-time processing begins 
  509. after read-time processing has completed, and is the stage during which NMAKE32 
  510. checks file dates/times, and invokes any required commands. At run-time the 
  511. statements that are not in column 1 are processed. 
  512.  
  513. Every directive may be used during either read-time or run-time, with different 
  514. effects. 
  515.  
  516.  
  517. ΓòÉΓòÉΓòÉ 2.8. Description File Elements ΓòÉΓòÉΓòÉ
  518.  
  519. NMAKE32 uses a description file to determine a series of actions that must be 
  520. executed to update a target.  In its simplest form, a description file 
  521. indicates which commands need to be executed when a dependent file is updated. 
  522.  
  523.  
  524. ΓòÉΓòÉΓòÉ 2.8.1. Comments ΓòÉΓòÉΓòÉ
  525.  
  526. The pound sign (#) tells NMAKE32 that what follows is a comment and not a 
  527. description file statement to be acted on.  NMAKE32 ignores blank lines in 
  528. description files. The pound sign cannot be used in in-line files to indicate 
  529. comments (see In-Line Files). 
  530.  
  531. A comment can be on a line by itself or on the same line with a description 
  532. file statement that will be executed.  When a comment is on a line by itself, 
  533. the pound sign can be anywhere on the line. When the comment is on the same 
  534. line as an executable description file statement, the pound sign follows the 
  535. description file statement and everything that follows the pound sign on that 
  536. line is considered to be a comment and is therefore ignored by NMAKE32. 
  537.  
  538. Comment lines cannot be continued with the backslash character. 
  539.  
  540. The pound sign can be used as a literal character if it is preceded by a caret 
  541. (^). See Escape Characters for more information. 
  542.  
  543. Example: 
  544.  
  545. #  The following description file shows examples of comments:
  546.  
  547. # This is a comment line.
  548.  
  549. program.exe: program.obj abcd.obj # This is a comment.
  550.        ilink program abcd;
  551.  
  552. # These three lines, 1,
  553. #  2, and
  554. #  3, are comment lines.
  555.  
  556. program.obj:     program.c  xxx.h
  557.        icc -c program.c
  558.  
  559. abcd.obj:        abcd.c     xxx.h
  560.        icc -c abcd.c
  561.  
  562.  
  563. ΓòÉΓòÉΓòÉ 2.8.2. Description Blocks ΓòÉΓòÉΓòÉ
  564.  
  565. A description file consists of description blocks that define the dependent 
  566. relationship between files. The description block specifies the creation and/or 
  567. update process for each file. A description block has the following format: 
  568.  
  569. targets...  :  dependents...
  570.    command
  571.    .
  572.    .
  573.  
  574. targets...  :  dependents...
  575.    command
  576.    .
  577.    .
  578.  
  579. Example: 
  580.  
  581. # Program build description block
  582.  
  583. program.obj : program.c program.h
  584.     icc /c program.c /Foprogram.obj
  585.  
  586. # End of program build description block
  587.  
  588.  
  589. ΓòÉΓòÉΓòÉ 2.8.3. Targets and Dependencies ΓòÉΓòÉΓòÉ
  590.  
  591. Targets are the files that will be created or updated in the description file. 
  592. Targets are file names that start in column one of a description file and are 
  593. followed by a colon (:). Dependents are the filenames that follow after the 
  594. colon. These are the files that are examined to determine if the target should 
  595. be updated. Specification of the target(s) and dependent(s) will be frequently 
  596. referenced as the target/dependency statement. The target/dependency statement 
  597. must start in the first column of the description file by definition. The 
  598. target/dependency statement has the following format: 
  599.  
  600. targets...  :  [{path}]dependents...
  601. or 
  602.  
  603. {path1;path2;...}targets  :  {path1;path2;...}dependents
  604.  
  605. Example: 
  606.  
  607. program.obj : program.c program.h
  608.  
  609. Note:  Target/Dependency statements may not contain an equal sign (=). Only 
  610. macro definitions may contain an equal sign. 
  611.  
  612. The optional curly brace paths preceding the filenames are alternative paths 
  613. that can be used if the file is not located in the current directory. When 
  614. specifying multiple paths they must be separated by semicolons (;). Whenever 
  615. one of the dependents has a timestamp equal to or newer (depending on the use 
  616. of the -= option) than the target, the target will be updated. All dependents 
  617. are also checked for being out of date with respect to their dependents. 
  618. Missing files are always considered to be out of date. The target build process 
  619. can be specified in a command block following the target/dependency statement. 
  620. If there is no command block in the description block, then the build process 
  621. will be inferred from either rules predefined in NMAKE32, or rules that have 
  622. been given in the description file, the TOOLS.INI file, the BUILTINS.MAK file, 
  623. or the file specified by the -b option on the command line (see Inference 
  624. Rules). 
  625.  
  626. NMAKE32 builds the first target that is specified in the description file if it 
  627. is out of date.  Often a pseudotarget will be used to list all the targets that 
  628. the developer wants to build from the description file. 
  629.  
  630. Example: 
  631.  
  632. all : hello.obj bye.obj
  633.  
  634. hello.obj : hello.c hello.h
  635.    icc /fohello.obj /c hello.c
  636.  
  637. target1.obj : target1.c
  638.    icc /fotarget1.obj /c target1.c
  639.  
  640. bye.obj : bye.c bye.h
  641.    icc /fobye.obj /c bye.c
  642.  
  643. target2.obj : target2.c
  644.    icc /fotarget2.obj /c target2.c
  645.  
  646. In the preceding example, of the four targets listed (five, including the 
  647. pseudotarget all), only hello.obj and bye.obj will be checked for updating. The 
  648. first target NMAKE32 encounters is all, and it has two dependents, hello.obj 
  649. and bye.obj. 
  650.  
  651. If we deleted the target/dependency statement that defines all and its 
  652. dependents, the only target checked for updating would be hello.obj, because it 
  653. would be the first target in the description file. 
  654.  
  655. Targets can also be specified during NMAKE32 invocation from the command line. 
  656. When targets are specified during invocation, they  become the targets to be 
  657. updated, those targets and their dependents will be checked for updating.  The 
  658. command line targets supersede targets defined in the description file.  If a 
  659. command line target does not correspond to a target in the description file, 
  660. NMAKE32 will attempt to infer a command using either a default inference rule, 
  661. or an inference rule defined in the makefile. 
  662.  
  663. A target specified in the description file without dependencies is always out 
  664. of date. When specified for updating, it's command block will always execute. 
  665.  
  666.  
  667. ΓòÉΓòÉΓòÉ 2.8.4. Commands ΓòÉΓòÉΓòÉ
  668.  
  669. A command block is the set of commands that must be executed in order to build 
  670. a target. These commands usually consist of compile statements or file 
  671. processing commands (such as executing tool commands, file manipulation, 
  672. directory changes, or system commands). All lines following a target/dependency 
  673. statement that start with a space are executed as commands. A command can also 
  674. be specified on the target/dependency statement line, if preceded by a 
  675. semi-colon (;). The format is the following: 
  676.  
  677. targets...  :  dependents; command
  678. or 
  679.  
  680. {paths;...}targets  :  {paths;...} dependents; commands
  681.  
  682. Example: 
  683.  
  684. {\program\objs; \objects}program.obj : {\source} program.c \
  685. program.h;icc /c program.c /Foprogram.obj
  686.    @echo Build Finished
  687.  
  688. The first line following the target/dependency statement that does not begin 
  689. with a blank or a comment indicator (#) is taken as the beginning of a new 
  690. target/dependency or macro. 
  691.  
  692. If a command does not fit on one line, it can be continued on the following 
  693. line by using the line continuation character (\) at the end of the line. The 
  694. remainder of the line can be typed on the following line. Whenever a backslash 
  695. character is found, it is deleted and the following line appended to the 
  696. current line. 
  697.  
  698. always:
  699.     @echo This command line will always execute and will \
  700.                          continue on the next line!
  701.  
  702. #  And this line is just a comment line
  703.  
  704.  
  705. ΓòÉΓòÉΓòÉ 2.8.5. Dependent Specific Rules ΓòÉΓòÉΓòÉ
  706.  
  707. There is a method of choosing a command block to be executed based on which 
  708. dependents cause the target to be updated.  If an object library contains both 
  709. compiled files and assembled files, you might want to generate the objects and 
  710. update the library in different ways depending on which file types were 
  711. updated.  NMAKE32 supports this with dependent specific rules.  These rules are 
  712. similar to regular rules, but are identified by using two colons (::) between 
  713. the target and the dependents, and the target is usually specified in more than 
  714. one description block.  The following description blocks are permissible: 
  715.  
  716. X :: a
  717.    command block
  718.  
  719. X :: b
  720.    command block
  721.  
  722. The following example shows how dependent specific rules can be utilized. 
  723.  
  724. object.lib :: a.asm
  725.  $(AS) a.asm;
  726.  $(LIB) object -+a.obj;
  727.  
  728. object.lib :: b.c
  729.  $(CC) $(CFLAGS) b.c
  730.  $(LIB) object -+b.obj;
  731.  
  732. The two description blocks both update the library named object.lib, however, 
  733. the first command block is only executed if a.asm is newer than object.lib, and 
  734. the second command block is only executed if b.c is newer than object.lib. 
  735.  
  736. Whenever there is a target that appears in more than one description block, and 
  737. the target/dependency separator is a single colon (:), the two description 
  738. blocks are merged by concatenating the command blocks and the dependents. 
  739.  
  740.  
  741. ΓòÉΓòÉΓòÉ 2.8.6. Wildcards ΓòÉΓòÉΓòÉ
  742.  
  743. In some cases, it is not desirable to have to specify all the filenames that 
  744. are required to build a target. OS/2 wildcards ('*' and '?') are supported on 
  745. the dependency file specification. 
  746.  
  747. Wildcards cannot be used in a dependency list to reference files that do not 
  748. exist at the time of execution of NMAKE32. Files that will be generated 
  749. (dependents from one target/dependency statement that are targets in another 
  750. target/dependency statement) during NMAKE32 execution cannot be referenced 
  751. using wildcards. 
  752.  
  753. Wildcards cannot be used on targets or for path specifications. 
  754.  
  755.  
  756. ΓòÉΓòÉΓòÉ 2.8.7. Explicit Command Processing ΓòÉΓòÉΓòÉ
  757.  
  758. Explicit commands are contained in the command block that follows a 
  759. target/dependency statement. It is the block of commands that will be executed 
  760. if the target needs updating. 
  761.  
  762. Example: 
  763.  
  764. targ.obj :  program.c            #  Target / dependency statement
  765.   icc /c /Fotarg.obj program.c
  766.  
  767. Whenever there is an explicit command associated with a target/dependency 
  768. statement, inference rule processing is not attempted. 
  769.  
  770. Paths may be specified for targets and dependents. A target file in the 
  771. specified target directory will be built or updated if the dependent is found 
  772. in the specified directory. 
  773.  
  774. When paths are specified in curly braces on file specifications, the default is 
  775. to use the local directory. If a file is not found that matches the file 
  776. specification in the local directory, then the path in curly braces (or paths, 
  777. separated by semicolons) is searched in the order given. 
  778.  
  779. A file can be both a target and a dependent in a description file. If the file 
  780. is specified with curly brace paths in any instance, all instances of that file 
  781. must contain the same curly brace paths. If the file is not specified the same 
  782. way in all instances, it will be treated as a different file specification. 
  783.  
  784. When specifying multiple search paths in curly braces on targets and 
  785. dependents, the paths are specified in the following manner: 
  786.  
  787. {p1;p2;p3} targ.obj : {p4;p5;p6} dep.c   # Multiple paths in curly braces
  788.     $(CC) -c -Fo$@ $<                    # Explicit rule for target/dependency
  789.  
  790. File specifications can be combined with relative path specifiers to modify the 
  791. local directory or to modify the paths in curly braces. The relative path 
  792. specifier is included on the file specification. The relative path 
  793. specification works in OS/2 in the following manner: 
  794.  
  795. cd e:\os2\system\test     # executing this from the e: drive
  796.                           # would locate you in the specified
  797.                           # directory
  798.  
  799. dir ..\..\filename.txt    # This file specification includes a
  800.                           # relative path specification.  It
  801.                           # will look for filename.txt in the os2
  802.                           # directory
  803.  
  804. .PATH macro processing is used to search for unlocatable files after any 
  805. applicable curly brace paths have been processed. .PATH searches are applied if 
  806. the unlocatable files match the .PATH macro extensions and do not have a path 
  807. or relative path included in their file specification.  The .PATH macro 
  808. processing method of searching for files works only with target/dependency 
  809. statements that have an explicit rule. 
  810.  
  811. .PATH processing functions similar to explicit curly brace processing in that 
  812. it will use the first file it finds, starting with the .PATH processing 
  813. functions similar to explicit curly brace processing in that it will use the 
  814. first file it finds, starting with the local directory and then searching the 
  815. paths specified by .PATH. 
  816.  
  817. For more information on the .PATH macro, see Predefined Macros. 
  818.  
  819.  
  820. ΓòÉΓòÉΓòÉ 2.8.8. Inference Rules ΓòÉΓòÉΓòÉ
  821.  
  822. Inference rules allow you to define rules that can be used for more than one 
  823. file. When NMAKE32 encounters a target/dependency statement with no commands, 
  824. it looks for an inference rule that specifies how to create the targets based 
  825. on the defined .SUFFIXES extensions, the defined inference rules, and the 
  826. target/dependent base file names. 
  827.  
  828. In order for an inference rule to be applied, three conditions must be met: 
  829.  
  830.      The extensions of the target file and the dependent file must be defined 
  831.       in the .SUFFIXES: target 
  832.  
  833.      There must be a valid inference rule with correct path specification 
  834.       defined. 
  835.  
  836.      The target and dependent must have the same base file name. 
  837.  
  838.  A valid  inference rule, with local directory path specification, starts in 
  839.  the first column of the description file, and consists of the dependent 
  840.  extension, followed by the target extension and a colon. The command block 
  841.  starts on the following line, and must be preceded by at least one space. 
  842.  
  843.      .extension1.extension2:
  844.          [command..]
  845.  
  846.  Given a target/dependent statement, with the same base file name, and valid 
  847.  file extensions in the .SUFFIXES: target, NMAKE32 will search for a defined 
  848.  inference rule, and execute the rule if available. If the target and all 
  849.  dependents exist, and a rule cannot be inferred, the target is assumed to be 
  850.  "up to date". 
  851.  
  852.  Example: 
  853.  
  854.     .c.obj:
  855.        icc -c -Fo$@  $<
  856.  
  857.     hello.obj : hello.c
  858.  
  859.  Similarly, given a target without a dependent or a command block, NMAKE32 will 
  860.  infer a dependent file from the targets base file name and all inference rules 
  861.  defined with the target's file extension. The inference rules are searched in 
  862.  the order that they are defined in the .SUFFIXES target. 
  863.  
  864.  Example: 
  865.  
  866.     .SUFFIXES: .c .asm .obj .exe
  867.  
  868.     .obj.exe:
  869.        icc -fe$@ $<
  870.  
  871.     .c.obj:
  872.        icc -c -f$@ $<
  873.  
  874.     .asm.obj:
  875.          masm $<;
  876.  
  877.     target.exe: header.h
  878.     target.obj:
  879.  
  880.  In the preceding example, NMAKE32 will search for an inference rule that 
  881.  builds a .exe file, it will locate the .exe.obj rule, using the target 
  882.  filename and the source extension, target.obj will be inferred as a dependent. 
  883.  It will then check to see if it can locate an up-to-date target.obj on disk, 
  884.  or can build one.  When NMAKE32 locates target.obj as a target defined in the 
  885.  description file, it will try to build it. In order to build this file it will 
  886.  use the same inference rule process to infer the dependent target.c (searching 
  887.  extensions in the order given by .SUFFIXES). If target.c did not exist on disk 
  888.  or could be built from the description file, the next inference rule evaluated 
  889.  would be .asm.obj:, and the next inferred dependent would be target.asm. 
  890.  
  891.  
  892. ΓòÉΓòÉΓòÉ 2.8.9. Default Inference Rules ΓòÉΓòÉΓòÉ
  893.  
  894. The use of inference rules eliminates the need to put the same commands in 
  895. several description blocks. Default inference rules and extensions can be 
  896. updated by the TOOLS.INI, BUILTINS.MAK, or the file specified by the /b option 
  897. on the command line (see The TOOLS.INI File and The BUILTINS.MAK File). 
  898.  
  899. Default inference rules and extensions are supplied by NMAKE32. The .SUFFIXES: 
  900. target defaults to the following extensions: 
  901.  
  902.    .SUFFIXES: .exe .obj .asm .c .bas .cbl .for .pas .res .rc .cpp .cxx
  903.  
  904. The default inference extensions can be eliminated by defining an empty 
  905. .SUFFIXES: target. The .SUFFIXES: target can be redefined as needed. 
  906.  
  907. Example: 
  908.  
  909. .SUFFIXES:
  910. .SUFFIXES:  .exe  .obj  .asm  .c
  911.  
  912. The list of default inference rules are the following: 
  913.  
  914. .asm.exe:
  915.     $(AS) $(AFLAGS) /c $<;
  916.  
  917. .asm.obj:
  918.     $(AS) $(AFLAGS) $<;
  919.  
  920. .c.exe:
  921.     $(CC) $(CFLAGS) $<
  922.  
  923. .c.obj:
  924.     $(CC) $(CFLAGS) /c $<
  925.  
  926. .cbl.exe:
  927.     $(COBOL) $(COBFLAGS) $<, $@;
  928.  
  929. .cbl.obj:
  930.     $(COBOL) $(COBFLAGS) $<;
  931.  
  932. .for.exe:
  933.     $(FOR) $(FFLAGS) $<
  934.  
  935. .for.obj:
  936.     $(FOR) /c $(FFLAGS) $<
  937.  
  938. .pas.exe:
  939.     $(PASCAL) $(PFLAGS) $<
  940.  
  941. .pas.obj:
  942.     $(PASCAL) /c $(PFLAGS) $<
  943.  
  944. .rc.res:
  945.     $(RC) $(RFLAGS) /r $<
  946.  
  947. .cpp.obj:
  948.     $(CC) $(CFLAGS) /c $<
  949.  
  950. .cxx.obj:
  951.     $(CC) $(CFLAGS) /c $<
  952.  
  953.  
  954. ΓòÉΓòÉΓòÉ 2.8.10. Inference Rules with Curly Braces ΓòÉΓòÉΓòÉ
  955.  
  956. Inference rules can be combined with specified target/dependency paths for each 
  957. rule. Given the inference rule below, if a dependent file with the given 
  958. extension is found in the dep_path directory during inference rule processing, 
  959. then the target will be updated in the specified target_path directory. These 
  960. paths are specified in the inference rules inside curly braces. Only single 
  961. paths are supported inside curly braces on inference rules. However, multiple 
  962. inference rules using the same extensions and different paths can be specified. 
  963. The first matching inference rule is the rule that is used if multiple 
  964. inference rules are specified in the description file. 
  965.  
  966. {dep_path}.extension1{target_path}.extension2:
  967.     command block
  968.  
  969. Example: 
  970.  
  971. # Build objects in the p2 directory from source
  972. # in the p1 directory
  973.  
  974. {p1}.c{p2}.obj:
  975.     icc /c /Fo$@  $<
  976.  
  977. p2\file.obj: p1\file.c
  978.  
  979. When using paths or target/dependency statements and curly brace paths on 
  980. inference rules, all paths must be carefully matched. When a  target/dependency 
  981. statement dependent path does not match the curly brace  path on the inference 
  982. dependent extension, it is deemed a mismatch. The following example combines 
  983. inference rules, paths and explicit rules to demonstrate correct application of 
  984. the rule concepts. 
  985.  
  986. Example: 
  987.  
  988. {p1}.c{p2}.obj:                 #  Valid .SUFFIXES: extensions
  989.     $CC) $(CFLAGS) /Fo$@ $<     #  First inference rule
  990.  
  991. {p3}.c{p4}.obj:                 #  Valid .SUFFIXES: extensions
  992.     $(CC) $(CPPFLAGS) /Fo$@ $<  #  Second inference rule
  993.  
  994. {p1}.c{p4}.obj:                 #  Valid .SUFFIXES: extensions
  995.     $(CC) $(CPPFLAGS) /Fo$@ $<  #  Third inference rule
  996.  
  997. p2\dep.obj : p1\dep.c           #  Target / dependency statement
  998.     @echo Bogus explicit rule   #  Explicit rule
  999.  
  1000. p4\dep.obj : p1\dep.c           #  Target / dependency statement
  1001.                                 #  with no explicit rule
  1002.  
  1003. The application of the inference rules for the target/dependency with no 
  1004. explicit rule is as follows: 
  1005.  
  1006.    1. The first rule does not apply, because it is an inference rule to create 
  1007.       objects in the p2 directory from source in the p1 directory. 
  1008.  
  1009.    2. The second rule does not apply, because it is an inference rule to create 
  1010.       objects in the p4 directory from source in the p3 directory. 
  1011.  
  1012.    3. The third inference rule creates objects in the p4 directory from source 
  1013.       in the p1 directory.  This rule is used. 
  1014.  
  1015.    4. Although the paths for the dependent and target on the first 
  1016.       target\dependency statement match the first inference rule, the inclusion 
  1017.       of an explicit rule in this dependency precludes it from being built 
  1018.       using any inference rule processing. 
  1019.  
  1020.  The third inference rule is the rule that applies to the second 
  1021.  target/dependency statement. The target will be updated in the p4 directory 
  1022.  from the dependent in the p1 directory, if required. 
  1023.  
  1024.  
  1025. ΓòÉΓòÉΓòÉ 2.8.11. Inference Rule and Curly Braces on Target/Dependents ΓòÉΓòÉΓòÉ
  1026.  
  1027. When curly brace paths are used on target/dependency statements, the location 
  1028. of existing target/dependency files determines the inference rule to be used. 
  1029. This is demonstrated in the following example: 
  1030.  
  1031. Example: 
  1032.  
  1033. {p1}.c{p4}.obj:
  1034.    icc -fo$@ -c $<
  1035.  
  1036. {p3}.c{p4}.obj:
  1037.    icc -fo$@ -c $<
  1038.  
  1039. {p3}.c{p4}.obj:
  1040.    icc -fo$@ -c $<
  1041.  
  1042. {p2;p4} file.obj : {p1;p3} file.c
  1043.  
  1044. If file.obj exists in the p4 directory and file.c exists in the p1 directory, 
  1045. the first inference rule will be used if the target needs updating. Note that 
  1046. if file.obj also was on disk in the p2 directory, the first directory found 
  1047. during explicit target path matching would be p2. There is not an inference 
  1048. rule defined for the {p1}.c{p2}.obj combination, so inference rule processing 
  1049. would fail. 
  1050.  
  1051.  
  1052. ΓòÉΓòÉΓòÉ 2.8.12. Built-in Commands ΓòÉΓòÉΓòÉ
  1053.  
  1054. Built-in commands are operations handled internally by NMAKE32, rather than 
  1055. passed out to the operating system. All built-in commands begin with a percent 
  1056. sign (%). 
  1057.  
  1058.  %cd directory       Instructs NMAKE32 to change the current directory to 
  1059.                      directory. 
  1060.  
  1061.  %do other_target    Instructs NMAKE32 to invoke the commands of target 
  1062.                      other_target as though they were inline. All built-in 
  1063.                      macros (such as $@ and $?) associated with the current 
  1064.                      target and dependents remain unchanged; only the commands 
  1065.                      are used. 
  1066.  
  1067.                      This built-in command can be used to set up generic rules 
  1068.                      which can be invoked repetitively from different points in 
  1069.                      your description file.  Note that it does not matter where 
  1070.                      other_target was defined, as long as it is visible to 
  1071.                      NMAKE32 during the processing of your description file. 
  1072.  
  1073.  Example: 
  1074.  
  1075.     # Use the %do command in the target/dependency
  1076.     # command using the target comp_rule:  This target
  1077.     # is not listed as a dependent of any other target,
  1078.     # and is only accessible via the %do command.
  1079.  
  1080.     comp_rule:
  1081.        $(CC) -c -fo$@ $<
  1082.  
  1083.     all: test1.obj test2.obj        # define targets to build
  1084.  
  1085.     test1.obj: test1.c              # first target/dep pair
  1086.       %do comp_rule                 #   %do command
  1087.  
  1088.     test2.obj: test2.c              # second target/dep pair
  1089.       $(CC) /c -fo$@ $<             # use explicit command
  1090.  
  1091.  %echo string           Instructs NMAKE32 to display the contents of string 
  1092.                         (after expanding any macros) 
  1093.  
  1094.  %set var=value         Instructs NMAKE32 to assign value to the variable var. 
  1095.                         There are instances where it would be a valuable 
  1096.                         feature to be able to change the value of a variable 
  1097.                         after NMAKE32 has read all the description files and 
  1098.                         has begun execution.  The %set command allows to you to 
  1099.                         change or create any NMAKE32 variable while commands 
  1100.                         are being invoked. 
  1101.  
  1102.  %setenv var=value      Instructs NMAKE32 to assign value to the environment 
  1103.                         variable var. If the variable is not already defined, 
  1104.                         it is created with the specified value; if the variable 
  1105.                         is already defined, its value is replaced by the 
  1106.                         specified value. 
  1107.  
  1108.  
  1109. ΓòÉΓòÉΓòÉ 2.8.13. Pseudotargets ΓòÉΓòÉΓòÉ
  1110.  
  1111. A pseudotarget is a target in a description block that is not a file. It is a 
  1112. name that serves as a handle for building a group of files or executing a 
  1113. command block. There are two types of pseudotargets recognized by NMAKE32, 
  1114. predefined and user defined. 
  1115.  
  1116. Predefined pseudotargets start with a period (.) and are used to control 
  1117. NMAKE32 processing characteristics. NMAKE32 provided pseudotargets and function 
  1118. follow: 
  1119.  
  1120. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1121. Γöé.IGNORE: [targets]       ΓöéTells NMAKE32 to ignore return codes from    Γöé
  1122. Γöé                         Γöéinvoked commands. Same function as /i option Γöé
  1123. Γöé                         Γöéon the command line.  If  specified with     Γöé
  1124. Γöé                         Γöétargets, only return codes of those targets  Γöé
  1125. Γöé                         Γöéare ignored.                                 Γöé
  1126. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1127. Γöé.MAKEINIT: [command]     ΓöéThe commands of this target are executed justΓöé
  1128. Γöé                         Γöébefore the first real target is  examined    Γöé
  1129. Γöé                         Γöé(after the command line and the description  Γöé
  1130. Γöé                         Γöéfile have been processed).                   Γöé
  1131. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1132. Γöé.INIT: [command]         ΓöéThe commands of this target are executed justΓöé
  1133. Γöé                         Γöébefore the first real target is built (just  Γöé
  1134. Γöé                         Γöébefore the first user command is invoked).   Γöé
  1135. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1136. Γöé.MAKEDEINIT: [command]   ΓöéThe commands of this target are executed justΓöé
  1137. Γöé                         Γöébefore NMAKE32 terminates.                   Γöé
  1138. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1139. Γöé.DEINIT: [command]       ΓöéThe commands of this target are executed justΓöé
  1140. Γöé                         Γöébefore the commands of the .MAKEDEINIT:      Γöé
  1141. Γöé                         Γöétarget are executed, but only if the commandsΓöé
  1142. Γöé                         Γöéof the .INIT: target and at least one user   Γöé
  1143. Γöé                         Γöécommand have been executed.                  Γöé
  1144. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1145. Γöé.RECHECK:                ΓöéInstructs NMAKE32 to recheck the date, time  Γöé
  1146. Γöé                         Γöéand path of each target (the check occurs    Γöé
  1147. Γöé                         Γöéafter all commands for that target have been Γöé
  1148. Γöé                         Γöéexecuted).                                   Γöé
  1149. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1150. Γöé.NORECHECK:              ΓöéInstructs NMAKE32 to not recheck the date,   Γöé
  1151. Γöé                         Γöétime and path of each target. This is the    Γöé
  1152. Γöé                         Γöédefault behavior.                            Γöé
  1153. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1154. Γöé.PRECIOUS: [targets]     ΓöéInstructs NMAKE32 not to delete the targets  Γöé
  1155. Γöé                         Γöéif the command completes with a nonzero      Γöé
  1156. Γöé                         Γöéreturn code.    If  specified with targets,  Γöé
  1157. Γöé                         Γöéonly those targets are saved for nonzero     Γöé
  1158. Γöé                         Γöéreturn codes.                                Γöé
  1159. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1160. Γöé.SILENT:                 ΓöéInstructs NMAKE32 not to echo commands. Same Γöé
  1161. Γöé                         Γöéfunction as /s option on the command line.   Γöé
  1162. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1163. Γöé.SUFFIXES: [exts]        ΓöéUsed to change the defined extensions that   Γöé
  1164. Γöé                         ΓöéNMAKE32 recognizes for inference rule        Γöé
  1165. Γöé                         Γöéprocessing. If specified without extensions, Γöé
  1166. Γöé                         Γöéresets the defined extensions to null. If    Γöé
  1167. Γöé                         Γöéfollowed by extensions, these are added to   Γöé
  1168. Γöé                         Γöéthe defined recognized extensions.           Γöé
  1169. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1170.  
  1171. Example: 
  1172.  
  1173. # Example of .SUFFIXES and .PRECIOUS
  1174.  
  1175. .sav.exe:
  1176.     -copy keep.sav keepthis.exe
  1177.  
  1178. .SUFFIXES:                 # This set .SUFFIXES to null
  1179. .SUFFIXES: .sav .exe       # These two extensions can be used
  1180.                            # in inference rules
  1181.  
  1182. .PRECIOUS:   keepthis.exe  # This protects keepthis.exe from
  1183.                            # being deleted
  1184.  
  1185. keepthis.exe :keep.sav
  1186.                            #  Inference rule will be used here
  1187.  
  1188. User defined pseudotargets are used when you wish to invoke a block of commands 
  1189. without having them associated to a target. This would allow you to invoke the 
  1190. block of commands either from the command line by specifying the pseudotarget 
  1191. name, or from the description file via a dependency. (The commands for a 
  1192. pseudotarget without dependencies are always executed.) 
  1193.  
  1194. Example: 
  1195.  
  1196. ALWAYS:
  1197.   @echo  These commands will always execute if you
  1198.   @echo  specify the pseudotarget ALWAYS on the NMAKE32
  1199.   @echo  invocation, or you run a description file where
  1200.   @echo  ALWAYS appears as a dependent, or the only target
  1201.   @echo  in the description file.  There is no actual
  1202.   @echo  file named ALWAYS.
  1203.  
  1204.  
  1205. ΓòÉΓòÉΓòÉ 2.8.14. Command Line Modifiers ΓòÉΓòÉΓòÉ
  1206.  
  1207. The NMAKE32 syntax includes prefixes that change the way it handles command 
  1208. processing. By prepending these special characters in front of a command you 
  1209. can alter NMAKE32 default behavior for a given command. 
  1210.  
  1211. The following are the defined prefixes and their usages: 
  1212.  
  1213.  @command       Execute command in silent mode. Prevents the command from being 
  1214.                 displayed. 
  1215.  
  1216.  -command       Ignore the return codes from command. This prefix sets the 
  1217.                 %status built-in function with the return code of command, but 
  1218.                 prevents NMAKE32 execution interruption if it was non-zero. 
  1219.                 Similar function to the /i option on the command line. 
  1220.  
  1221.  -n command     Ignore all return codes for command less than or equal to n. 
  1222.  
  1223.  ~command       Propagate the return code from the previously executed command 
  1224.                 and prevent NMAKE32 execution interruption if command returns a 
  1225.                 non-zero value. When used in conjunction with the %status() 
  1226.                 built-in function (for use in !if expressions) returns the 
  1227.                 value of the last command's return code. This combination is 
  1228.                 very useful for doing post-processing on commands, even if 
  1229.                 those commands have failed. 
  1230.  
  1231.                 Example: 
  1232.  
  1233.                 This example will execute a command that has a non-zero return 
  1234.                 code and NOT interrupt NMAKE32 execution. It will propagate the 
  1235.                 return code from that command for later processing. 
  1236.  
  1237.                                 #  Execute an intentionally bad command
  1238.  
  1239.                                 target:
  1240.                                    -copy garbage.txt filename
  1241.  
  1242.                                 !if %status()==1
  1243.                                    ~@echo the %status is set to 1
  1244.                                    ~@echo these commands would usually update %status
  1245.                                 !endif
  1246.  
  1247.                                 copy hello.c hello.z
  1248.  
  1249.                                 !if %status()==0
  1250.                                   @echo  the status value is 0
  1251.  
  1252.  !command       Execute the command for each dependent in the $? macro values. 
  1253.  
  1254.  =command       Force date, time and path rechecking for the current target 
  1255.                 after all commands for the target have been executed. 
  1256.  
  1257.  &command       Execute this command, even if the -N flag was specified. 
  1258.  
  1259.                 Note:  The built-in commands, such as %echo and %cd, ignore the 
  1260.                 command line modifiers, and the -n command line modifier cannot 
  1261.                 be used with a built-in command. Remember the built-in commands 
  1262.                 are handled internally, so they do not provide return codes and 
  1263.                 are not echoed. 
  1264.  
  1265.  
  1266. ΓòÉΓòÉΓòÉ 2.9. Macros ΓòÉΓòÉΓòÉ
  1267.  
  1268. Macros provide a convenient way to replace one string with another in the 
  1269. description file. The text is automatically replaced each time NMAKE32 is run. 
  1270. This feature makes it easy to change text throughout the description file 
  1271. without having to edit every line that uses the text. Some common uses of 
  1272. macros are: 
  1273.  
  1274.      To create a standard description file for several projects. The macro 
  1275.       represents the names of commands. These names are defined when you run 
  1276.       NMAKE32. When a different project is started, changing the macro changes 
  1277.       the names NMAKE32 uses throughout the description file. 
  1278.  
  1279.      To control the options that NMAKE32 passes to the compiler, assembler, or 
  1280.       linker. When using a macro to specify the options, options can be quickly 
  1281.       changed throughout the description file in one easy step. 
  1282.  
  1283.      Defining groups of files in a project, such as the .OBJ files required to 
  1284.       build an executable or a library. 
  1285.  
  1286.  A macro can be defined: 
  1287.  
  1288.      On the command line 
  1289.  
  1290.      As a predefined macro 
  1291.  
  1292.      Through inheritance from environment variables 
  1293.  
  1294.      In the TOOLS.INI or BUILTINS.MAK (if defined) 
  1295.  
  1296.      In a description file 
  1297.  
  1298.  
  1299. ΓòÉΓòÉΓòÉ 2.9.1. Defining Macros ΓòÉΓòÉΓòÉ
  1300.  
  1301. A macro definition follows this form: 
  1302.  
  1303. name=character-string
  1304. name+=character-string
  1305. name=+character-string
  1306.  
  1307. Macro names are case_sensitive by default. The character-string can be any 
  1308. string of characters. The first character of the macro must be in column one. 
  1309. NMAKE32 ignores spaces surrounding the name. 
  1310.  
  1311. The character-string can be a null string and can contain embedded spaces. Do 
  1312. not enclose the macro string in quotation marks. Quotation marks are used when 
  1313. macros defined on the command line contain embedded spaces. 
  1314.  
  1315. The "+=" form of a macro assignment causes the character-string value to be 
  1316. appended to the end of the current value of name, while the "=+" form causes 
  1317. character-string to be prepended to the beginning of the current value of name. 
  1318. Values are concatenated, spaces are not added. 
  1319.  
  1320. NMAKE32 also allows the user to recursively define a macro, by using the macro 
  1321. name in the definition. This results in a permanent change to the original 
  1322. macro. 
  1323.  
  1324. Examples: 
  1325.  
  1326. Suppose you have a macro named CFLAGS which is used to define the flags for 
  1327. your C compiler, and you wish to add a flag. The original definition would be: 
  1328.  
  1329.     CFLAGS = -Fo$@ -c
  1330.  
  1331. You can then append to this definition a new flag: 
  1332.  
  1333.     CFLAGS += -Zi
  1334.  
  1335. The resulting string definition for CFLAGS is then: 
  1336.  
  1337.     -Fo$@ -c -Zi
  1338.  
  1339. If the new flag had been prepended: 
  1340.  
  1341.     CFLAGS =+ -Zi
  1342.  
  1343. The resulting string definition for CFLAGS is then: 
  1344.  
  1345.     -Zi -Fo$@ -c
  1346.  
  1347. This could also be done using recursion and appending a new flag: 
  1348.  
  1349.     CFLAGS = $(CFLAGS) -Zi
  1350.  
  1351. The resulting string definition for CFLAGS is: 
  1352.  
  1353.     -Fo$@ -c -Zi
  1354.  
  1355. Macros on the Command Line 
  1356.  
  1357. A macro may also be defined on the command line when calling NMAKE32. 
  1358. Command-line macro definitions follow this form: 
  1359.  
  1360. name=character-string
  1361.  
  1362. If the macro contains embedded spaces or special characters defined in the 
  1363. shell, enclose it in double quotation marks ("). 
  1364.  
  1365. Inherited Macros 
  1366.  
  1367. NMAKE32 inherits all current environment variables as macros. For example, if 
  1368. you have a PATH environment variable defined as PATH = C:\TOOLS\BIN, the string 
  1369. C:\TOOLS\BIN is substituted when you use $(PATH) in the description file. 
  1370.  
  1371. Inherited macros may be redefined by including a line such as the one in the 
  1372. example above in a description file.  While NMAKE32 is executing, the macro 
  1373. takes on the redefined definition.  However, when NMAKE32 terminates the 
  1374. environment variable resumes its original value. 
  1375.  
  1376. The /E (override environment variable) option disables inherited macro 
  1377. redefinition. If you use this option, NMAKE32 ignores any attempt to redefine 
  1378. an inherited macro, except from the command line. 
  1379.  
  1380.  
  1381. ΓòÉΓòÉΓòÉ 2.9.2. Referencing Macros ΓòÉΓòÉΓòÉ
  1382.  
  1383. After a macro has been defined, it can be used anywhere in a description file 
  1384. using the following syntax: 
  1385.  
  1386.     $(name)
  1387.  
  1388. The parentheses are not required if the macro name is only one character long. 
  1389. To use a dollar sign ($) without using a macro, enter two dollar signs ($$), or 
  1390. use the caret (^) before the dollar sign as an escape character. 
  1391.  
  1392. When NMAKE32 runs, it replaces all occurrences of $(name) with the defined 
  1393. macro string. If the macro is undefined, a null string is substituted. Defined 
  1394. macros can be undefined with the !UNDEF directive. 
  1395.  
  1396. Example: 
  1397.  
  1398. To echo the following line to the screen: 
  1399.  
  1400.     $(HELLO) is HI
  1401.  
  1402. The macro must be referenced with double dollar signs ($$), as shown in the 
  1403. following description file excerpt: 
  1404.  
  1405.      HELLO = HI
  1406.  
  1407.      dummy:
  1408.           @echo $$(HELLO) is $(HELLO)
  1409.  
  1410.  
  1411. ΓòÉΓòÉΓòÉ 2.9.3. Macro Substitutions ΓòÉΓòÉΓòÉ
  1412.  
  1413. NMAKE32 allows substitutions in macro invocations that allow a user to change 
  1414. the value generated without changing the macro itself. The following syntax is 
  1415. used for macro substitutions: 
  1416.  
  1417.      $(name: character-string1 = character-string2)
  1418.  
  1419. where name is the name of the macro whose value is being modified, 
  1420. character-string1 is character or characters between the colon ":" and the 
  1421. equal "=" sign, and character-string2 is the replacement character or 
  1422. characters after the equal "=" sign and before the closing parentheses ")". If 
  1423. character-string2 is null, .character-string1 is removed from name (that is, 
  1424. replaced by a null string). 
  1425.  
  1426. Example: 
  1427.  
  1428. The following macro: 
  1429.  
  1430.     FILES = file1.z file2.z file3.z
  1431.  
  1432. followed by this macro substitution: 
  1433.  
  1434.     $(FILES:.z=.c)
  1435.  
  1436. expands to the value: 
  1437.  
  1438.     file1.c file2.c file3.c
  1439.  
  1440. The actual value of FILES remains unchanged. 
  1441.  
  1442.  
  1443. ΓòÉΓòÉΓòÉ 2.9.4. Built-in Macros ΓòÉΓòÉΓòÉ
  1444.  
  1445. File-Specification Parts 
  1446.  
  1447. A full file specification gives the base name of the file, the file name 
  1448. extension, and the path. The path provides the disk drive identifier and the 
  1449. sequence of directories needed to locate the file on the disk. 
  1450.  
  1451. Example: 
  1452.  
  1453. The file specification: 
  1454.  
  1455.      C:\SOURCE\PROG\SORT.OBJ
  1456.  
  1457. has the following parts: 
  1458.  
  1459. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1460. ΓöéPath Name           ΓöéC:\SOURCE\PROG      Γöéeverything prior to Γöé
  1461. Γöé                    Γöé                    Γöéthe last path       Γöé
  1462. Γöé                    Γöé                    Γöéseparator           Γöé
  1463. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1464. ΓöéFile Extension      Γöé.OBJ                Γöéeverything after andΓöé
  1465. Γöé                    Γöé                    Γöéincluding the last  Γöé
  1466. Γöé                    Γöé                    Γöédot (.)             Γöé
  1467. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1468. ΓöéBase File Name      ΓöéSORT                Γöéwhat's left         Γöé
  1469. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1470.  
  1471. NMAKE32 predefines several macros which are useful for writing rules for 
  1472. building targets. 
  1473.  
  1474. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1475. ΓöéMacro       ΓöéValue                                           Γöé
  1476. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1477. Γöé$$          ΓöéThe '$' character, which does not participate inΓöé
  1478. Γöé            Γöéany further macro expansion.                    Γöé
  1479. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1480. Γöé$*          ΓöéThe path name and base file name of the current Γöé
  1481. Γöé            Γöétarget with the extension deleted.              Γöé
  1482. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1483. Γöé$<          ΓöéWhen used in an explicit rule; the first        Γöé
  1484. Γöé            Γöédependent of the target (regardless of whether  Γöé
  1485. Γöé            Γöéthe dependent is out of date), if any. When usedΓöé
  1486. Γöé            Γöéin an inference rule, the file specification of Γöé
  1487. Γöé            Γöéthe (inferred) dependent which is out of date   Γöé
  1488. Γöé            Γöéwith respect to the target. For example, in the Γöé
  1489. Γöé            Γöé.c.obj: rule, $< would evaluate to the .c file. Γöé
  1490. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1491. Γöé$@          ΓöéThe file specification of the current target.   Γöé
  1492. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1493. Γöé$?          ΓöéThe file specification of all dependents which  Γöé
  1494. Γöé            Γöéare out of date with respect to the target.     Γöé
  1495. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1496. Γöé$**         ΓöéThe list of file specifications of all          Γöé
  1497. Γöé            Γöédependents (whether up-to-date or not).         Γöé
  1498. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1499. Γöé$$@         ΓöéThe file specification of the target that       Γöé
  1500. Γöé            ΓöéNMAKE32 is currently evaluating. This is a      Γöé
  1501. Γöé            Γöédynamic dependency parameter, used only in      Γöé
  1502. Γöé            Γöédependent lists.                                Γöé
  1503. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1504. Γöé$:          ΓöéThe path name of the current target file        Γöé
  1505. Γöé            Γöéspecification.                                  Γöé
  1506. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1507. Γöé$.          ΓöéThe base file name and extension of the current Γöé
  1508. Γöé            Γöétarget file specification.                      Γöé
  1509. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1510. Γöé$&          ΓöéThe base file name of the current target file   Γöé
  1511. Γöé            Γöéspecification.                                  Γöé
  1512. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1513. Γöé$()         ΓöéThe null string                                 Γöé
  1514. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1515.  
  1516. Note:  The special macros $** and $$@ are the only exceptions to the rule that 
  1517. macro names longer than one character must be enclosed in parentheses. 
  1518.  
  1519. Example: 
  1520.  
  1521. Given the following description file excerpt: 
  1522.  
  1523.      c:\mydir\myprog.obj: $*.c
  1524.           @echo Dollar Star is $*
  1525.           @echo Dollar Star Star is $**
  1526.           @echo Dollar At is $@
  1527.  
  1528. The special macro $* on the target dependent line will expand to 
  1529. c:\mydir\myprog, and the following text will be displayed when NMAKE32 is run: 
  1530.  
  1531.      Dollar Star is c:\mydir\myprog
  1532.      Dollar Star Star is c:\mydir\myprog.c
  1533.      Dollar At is c:\mydir\myprog.obj
  1534.  
  1535. Characters that Modify Built-in Macros 
  1536.  
  1537. The following macros all resolve to a file specification (or possible several 
  1538. file specifications for $** and $?): 
  1539.  
  1540.    $*   $@   $**   $<   $?   $$@ 
  1541.  
  1542. There are four characters (D, F, B, or R), which may be appended to any of 
  1543. these macros to modify the filename returned by the macro. Parts of the full 
  1544. file specification are returned, depending on which character is used. 
  1545.  
  1546.                       Appended Character 
  1547.  
  1548. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1549. ΓöéFile Part Returned      ΓöéD       ΓöéF       ΓöéB       ΓöéR       Γöé
  1550. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1551. ΓöéFile Path               ΓöéYes     ΓöéNo      ΓöéNo      ΓöéYes     Γöé
  1552. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1553. ΓöéBase File Name          ΓöéNo      ΓöéYes     ΓöéYes     ΓöéYes     Γöé
  1554. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1555. ΓöéFile Name Extension     ΓöéNo      ΓöéYes     ΓöéNo      ΓöéNo      Γöé
  1556. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1557.  
  1558. Example: 
  1559.  
  1560. If the macro $@ has the value 
  1561.  
  1562.      C:\SOURCE\PROG\SORT.OBJ
  1563.  
  1564. then the following values are returned for the modified macro: 
  1565.  
  1566.  Macro          Value 
  1567.  
  1568.  $(@D)          C:\SOURCE\PROG 
  1569.  
  1570.  $(@F)          SORT.OBJ 
  1571.  
  1572.  $(@B)          SORT 
  1573.  
  1574.  $(@R)          C:\SOURCE\PROG\SORT 
  1575.  
  1576.  Note:  Modified macros are always longer than a single character so they must 
  1577.  be enclosed by parentheses when used. 
  1578.  
  1579.  
  1580. ΓòÉΓòÉΓòÉ 2.9.5. Predefined Macros ΓòÉΓòÉΓòÉ
  1581.  
  1582. The following macros are defined (or read from the environment variable) by 
  1583. NMAKE32 before the first file is read. 
  1584.  
  1585.  MAKEDIR           Current working directory when NMAKE32 is invoked. 
  1586.  
  1587.  MAKE              The name of the NMAKE32 program. 
  1588.  
  1589.  MAKEVER           The current NMAKE32 version number. 
  1590.  
  1591.  MAKEFLAGS         All command line parameters, plus the values form the 
  1592.                    MAKEFLAGS environment variable, except for b, f, o, p, and x 
  1593.                    options. 
  1594.  
  1595.  TIMESTAMP         Data and time when NMAKE32 was started. The format is locale 
  1596.                    specific. 
  1597.  
  1598.  DATE              Date from TIMESTAMP in the form:  YYYYMMDD (for example, 
  1599.                    19960325) 
  1600.  
  1601.  TIME              Time from TIMESTAMP in the form:  HHMMSS (for example, 
  1602.                    123015) 
  1603.  
  1604.  AS                Expands to the default assembler, which is "masm" on OS/2. 
  1605.  
  1606.  CC                Expands to the default C language compiler, which is "icc" 
  1607.                    on OS/2. 
  1608.  
  1609.  COBOL             Expands to the default cobol compiler, which is "cobol" on 
  1610.                    OS/2. 
  1611.  
  1612.  FOR               Expands to the default fortran compiler, which is "fl" on 
  1613.                    OS/2. 
  1614.  
  1615.  PASCAL            Expands to the default pascal compiler, which is "pl" on 
  1616.                    OS/2. 
  1617.  
  1618.  RC                Expands to "rc", the resource compiler, which is "rc" on 
  1619.                    OS/2. 
  1620.  
  1621.  The following macro, while not predefined by NMAKE32, also has special 
  1622.  significance 
  1623.  
  1624.   .PATH.ext = path_list
  1625.  
  1626.  where: 
  1627.  
  1628.  ext         is the extension for which the search path should be applied. 
  1629.  
  1630.  path_list   is the list of paths, separated by semicolons. Note that macros 
  1631.              are expanded in this path list, so $(INCLUDE), $(DPATH), or any 
  1632.              other macro or environment variable could be used. 
  1633.  
  1634.  The path_list is only used when a dependent file specification has no path and 
  1635.  cannot be found as specified. NMAKE32 tries to locate the file in each of the 
  1636.  paths specified in the path_list which matches that file's extension. It uses 
  1637.  the first copy of the file found in the path list. 
  1638.  
  1639.  Any number of these macros (one per extension) may be defined in a description 
  1640.  file, so that any or all of the file extensions that are specified in your 
  1641.  description file may be supported. 
  1642.  
  1643.  
  1644. ΓòÉΓòÉΓòÉ 2.9.6. Extmake Syntax ΓòÉΓòÉΓòÉ
  1645.  
  1646. Description files can use a special syntax to determine the drive, path, base 
  1647. name, and extension of the first dependent file in a description block. This 
  1648. syntax is called the "extmake" syntax. 
  1649.  
  1650. The characters %s represent the complete file specification of the first 
  1651. dependent file. Various parts of the file specification are represented using 
  1652. the syntax: 
  1653.  
  1654.      %|<parts>F
  1655.  
  1656. where <parts> is any combination of the following letters: 
  1657.  
  1658.  d         Drive 
  1659.  
  1660.  p         Path 
  1661.  
  1662.  f         Base name 
  1663.  
  1664.  e         Extension 
  1665.  
  1666.  The percent symbol (%) is a replacement in the OS/2 command line. To use the 
  1667.  percent symbol in the command-line arguments, use a double percent (%%). 
  1668.  
  1669.  Example: 
  1670.  
  1671.  Using the following description file excerpt: 
  1672.  
  1673.            d:\path\filename.ext
  1674.            @echo"%%s" is "%s" and "%%|dpfeF" is "%|dpfeF"
  1675.  
  1676.  The following would be displayed: 
  1677.  
  1678.            "%s" is "d:\path\filename.ext" and "%|dpfeF" is
  1679.            "d:\path\filename.ext"
  1680.  
  1681.  In this example a double percent sign is used to display a single percent 
  1682.  sign, and the output from %s is that same as the output from %|dpfeF. 
  1683.  
  1684.  
  1685. ΓòÉΓòÉΓòÉ 2.9.7. Transformation Macros ΓòÉΓòÉΓòÉ
  1686.  
  1687. Transformation macros are used to manipulate strings, which in turn can contain 
  1688. macros. Macros are evaluated from the "inside out" so that the strings will be 
  1689. fully resolved before the transformation is performed on them. Note:  When 
  1690. using the transformation macros described below, there must be no spaces 
  1691. between the initial dollar sign and the first comma, or the macro will not be 
  1692. recognized. 
  1693.  
  1694. NMAKE32 supports the following transformation macros: 
  1695.  
  1696.  
  1697. ΓòÉΓòÉΓòÉ 2.9.7.1. Include Transformation ΓòÉΓòÉΓòÉ
  1698.  
  1699. Syntax: 
  1700.  
  1701.      $[@,filespec]
  1702.  
  1703. In this transformation, NMAKE32 will return the contents of the specified file, 
  1704. as a single string with comments removed. 
  1705.  
  1706. Example: 
  1707.  
  1708. INCLUDE.FIL is a file with the following lines: 
  1709.  
  1710.      # This is a comment and will not be returned
  1711.      Line one,
  1712.                  # This comment will not be returned
  1713.       and line two.
  1714.  
  1715. The transformation macro: 
  1716.  
  1717.      $[@,INCLUDE.FIL]
  1718.  
  1719. returns: 
  1720.  
  1721.      Line one, and line two.
  1722.  
  1723.  
  1724. ΓòÉΓòÉΓòÉ 2.9.7.2. Clip String Transformation ΓòÉΓòÉΓòÉ
  1725.  
  1726. Syntax: 
  1727.  
  1728.      $[c,string,start,end]
  1729.  
  1730. In this transformation, NMAKE32 will return characters at positions start 
  1731. through end, inclusive, where start and end are integers. If start is not 
  1732. specified, it defaults to 1. If end is not specified, it defaults to the end of 
  1733. the string. Note that the first position is 1, not 0. If either start or end is 
  1734. a negative number, it indicates the position relative to the end of the string, 
  1735. rather than to the start. In this case, -1 indicates the last character. 
  1736.  
  1737. Examples: 
  1738.  
  1739. Given the following clip string transformations: 
  1740.  
  1741.      $[c,FILE01.OBJ,5,6]
  1742.      $[c,FILE01.OBJ,-6]
  1743.      $[c,FILE01.OBJ,,6]
  1744.  
  1745. The first transformation will return: 
  1746.  
  1747.      01
  1748.  
  1749. The second transformation will return: 
  1750.  
  1751.      01.OBJ
  1752.  
  1753. The third transformation will return: 
  1754.  
  1755.      FILE01
  1756.  
  1757.  
  1758. ΓòÉΓòÉΓòÉ 2.9.7.3. Directory Transformation ΓòÉΓòÉΓòÉ
  1759.  
  1760. Syntax: 
  1761.  
  1762.      $[d,string]
  1763.  
  1764. In this transformation, NMAKE32 will return the subdirectory portion of string. 
  1765. If there is no drive or path specified in string, this transformation will 
  1766. return an empty string; otherwise, it may contain a drive specifier, a path 
  1767. specification, or both. 
  1768.  
  1769. Example: 
  1770.  
  1771. The directory transformation: 
  1772.  
  1773.      $[d,D:\MAKE\TEST.FIL]
  1774.  
  1775. returns: 
  1776.  
  1777.      D:\MAKE
  1778.  
  1779. Note:  Unlike the "path" transformation, the directory transformation will 
  1780. never end with a path separator. 
  1781.  
  1782.  
  1783. ΓòÉΓòÉΓòÉ 2.9.7.4. Extension Transformation ΓòÉΓòÉΓòÉ
  1784.  
  1785. Syntax: 
  1786.  
  1787.      $[e,string]
  1788.  
  1789. In this transformation, NMAKE32 will return the file extension portion of 
  1790. string. If there is no file extension specified in string, this transformation 
  1791. will return an empty string. 
  1792.  
  1793. Example: 
  1794.  
  1795. The extension transformation: 
  1796.  
  1797.      $[e,D:\MAKE\TEST.FIL]
  1798.  
  1799. returns: 
  1800.  
  1801.      FIL
  1802.  
  1803.  
  1804. ΓòÉΓòÉΓòÉ 2.9.7.5. Filename Transformation ΓòÉΓòÉΓòÉ
  1805.  
  1806. Syntax: 
  1807.  
  1808.      $[f,path,rootlist,extension]
  1809.  
  1810. In this transformation, NMAKE32 uses the parts specified to construct complete 
  1811. file specification. The rootlist value may contain one or more filenames, each 
  1812. of which can be fully-qualified. NMAKE32 takes each of those names, adds the 
  1813. value specified by path and the value specified by extension (replacing those 
  1814. parts if specified in the name), and returns a string containing these new file 
  1815. specifications. If the path or extension value is omitted, that part of the 
  1816. original file specification will remain unchanged; however, if either of those 
  1817. values is a null string (""), the corresponding parts of the file specification 
  1818. will be removed. 
  1819.  
  1820. Examples: 
  1821.  
  1822. The transformation macros: 
  1823.  
  1824.      $[f,C:\OS2\,D:\MAKE\TEST.FIL,EXT]
  1825.      $[f,"",D:\MAKE\TEST.FIL,]
  1826.  
  1827. returns: 
  1828.  
  1829.      C:\OS2\TEST.EXT
  1830.      MAKE.FIL
  1831.  
  1832.  
  1833. ΓòÉΓòÉΓòÉ 2.9.7.6. Lowercase Transformation ΓòÉΓòÉΓòÉ
  1834.  
  1835. Syntax: 
  1836.  
  1837.      $[l,string]
  1838.  
  1839. In this transformation, NMAKE32 will return the lowercase equivalent of string, 
  1840. using the current locale. 
  1841.  
  1842. Example: 
  1843.  
  1844. The following lowercase transformation: 
  1845.  
  1846.      $[l,BIG]
  1847.  
  1848. returns: 
  1849.  
  1850.      big
  1851.  
  1852.  
  1853. ΓòÉΓòÉΓòÉ 2.9.7.7. Filename Pattern Matching Transformation ΓòÉΓòÉΓòÉ
  1854.  
  1855. Syntax: 
  1856.  
  1857.      $[m,pattern,string]
  1858.  
  1859. In this transformation, NMAKE32 will return those words in string which match 
  1860. the filename pattern specified by pattern. The matching is case-insensitive. 
  1861.  
  1862. A filename can contain one or more of the following patterns: 
  1863.  
  1864.  *              Matches any string, including the null string. 
  1865.  
  1866.  ?              Matches any single character. 
  1867.  
  1868.  [...]          Matches any one of the enclosed characters. 
  1869.  
  1870.  [.-.]          Matches any character between the enclosed pair, inclusive 
  1871.                 (range) 
  1872.  
  1873.  To remove the special meaning of the characters {, }, \, ., *, ^, and !, if 
  1874.  they are part of the filename to be matched, precede them with a  backslash. 
  1875.  If the dollar ($) character is used in a pattern, it must be preceded by a 
  1876.  caret (^) character so that it will not be interpreted as a macro. The 
  1877.  characters [, ], and comma (,) cannot be used in pattern matching. 
  1878.  
  1879.  Enclosed characters can be combined with ranges. Therefore, [ABCM-Z]* matches 
  1880.  any filename that begins with A, B, C, or M through Z. 
  1881.  
  1882.  Examples: 
  1883.  
  1884.  The following transformation: 
  1885.  
  1886.        $[m,*.c,x.c a.h b.h c.h]
  1887.  
  1888.  returns: 
  1889.  
  1890.        x.c
  1891.  
  1892.  Since string can include macros as well as text, a transformation macro can be 
  1893.  used to easily extract dependents with a particular extension. If the 
  1894.  following line was in a description file: 
  1895.  
  1896.        my.obj: my.c a.h b.h c.h
  1897.  
  1898.  The macro: 
  1899.  
  1900.        $[m,*.c,$**]
  1901.  
  1902.  returns: 
  1903.  
  1904.        my.c
  1905.  
  1906.  
  1907. ΓòÉΓòÉΓòÉ 2.9.7.8. Regular Expression Matching Transformation ΓòÉΓòÉΓòÉ
  1908.  
  1909. Syntax: 
  1910.  
  1911.      $[mr,regexp,string]
  1912.  
  1913. In this transformation, NMAKE32 will return those words in string which match 
  1914. the regular expression specified by regexp. The matching is case-insensitive. 
  1915.  
  1916. The following expressions match a single character: 
  1917.  
  1918. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1919. Γöéc              ΓöéAny ordinary character, other than one of theΓöé
  1920. Γöé               Γöéspecial pattern-matching characters, matches Γöé
  1921. Γöé               Γöéitself.                                      Γöé
  1922. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1923. Γöé.              ΓöéA period (.) matches any single character.   Γöé
  1924. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1925. Γöé[string]       ΓöéA string enclosed in square brackets matches Γöé
  1926. Γöé               Γöéany one character in the string              Γöé
  1927. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1928. Γöé[.-.]          ΓöéA range is two characters separated by a dashΓöé
  1929. Γöé               Γöéand enclosed in square brackets. It matches  Γöé
  1930. Γöé               Γöéany character that is within the range.      Γöé
  1931. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1932. Γöé[^string]      ΓöéA string (or range) enclosed in square       Γöé
  1933. Γöé               Γöébrackets and preceded by a caret (^) matches Γöé
  1934. Γöé               Γöéany character except for the character in theΓöé
  1935. Γöé               Γöéstring (or range). Strings and ranges may be Γöé
  1936. Γöé               Γöécombined as needed, as in: [a-m0-9xyz], whichΓöé
  1937. Γöé               Γöématches a thru m, 0 thru 9, x, y, or, z.     Γöé
  1938. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1939. Γöé\c             ΓöéThe backslash (\) character followed by any  Γöé
  1940. Γöé               Γöécharacter matches that character. This is    Γöé
  1941. Γöé               Γöéuseful for matching the following special    Γöé
  1942. Γöé               Γöécharacters;    . *{ } ^  \                   Γöé
  1943. Γöé               ΓöéThe dollar ($) sign must be preceded by a    Γöé
  1944. Γöé               Γöécaret (^) character so it will not be        Γöé
  1945. Γöé               Γöéinterpreted as a macro. The characters [, ], Γöé
  1946. Γöé               Γöéand comma (,) cannot be used in pattern      Γöé
  1947. Γöé               Γöématching.                                    Γöé
  1948. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1949.  
  1950. The single-character expressions can be combined into regular expressions as 
  1951. follows: 
  1952.  
  1953.  *              Match zero or more occurrences of the previous character. 
  1954.  
  1955.  A regular expression can be restricted to match text that begins on the first 
  1956.  character of the string, ends on the last character of the string, or both, as 
  1957.  follows: 
  1958.  
  1959.  ^pattern       The pattern matches text that begins on the first character of 
  1960.                 the string. 
  1961.  
  1962.  Example: 
  1963.  
  1964.  This example is the same as the filename pattern matching example, but the 
  1965.  pattern is written as a regular expression: 
  1966.  
  1967.        $[mr,.*\.c,x.c a.h b.h c.h]
  1968.  
  1969.  returns: 
  1970.  
  1971.        x.c
  1972.  
  1973.  
  1974. ΓòÉΓòÉΓòÉ 2.9.7.9. Path Transformation ΓòÉΓòÉΓòÉ
  1975.  
  1976. Syntax: 
  1977.  
  1978.      $[p,string]
  1979.  
  1980. In this transformation, NMAKE32 will return the path portion of string. If 
  1981. there is no drive or path specified in string, this transformation will return 
  1982. an empty string; otherwise, it may contain a drive specifier, a path 
  1983. specification, or both. 
  1984.  
  1985. Example: 
  1986.  
  1987. The following path transformation: 
  1988.  
  1989.      $[p,D:\MAKE\TEST.FIL]
  1990.  
  1991. returns: 
  1992.  
  1993.      D:\MAKE\
  1994.  
  1995. Note:  Unlike the directory transformation, the path transformation always ends 
  1996. with a path separator (if path information is present in string) 
  1997.  
  1998.  
  1999. ΓòÉΓòÉΓòÉ 2.9.7.10. Root Transformation ΓòÉΓòÉΓòÉ
  2000.  
  2001. Syntax: 
  2002.  
  2003.      $[r,string]
  2004.  
  2005. In this transformation, NMAKE32 will return the base file name portion of 
  2006. string. If there is no file name specified in string, this transformation will 
  2007. return an empty string. 
  2008.  
  2009. Example: 
  2010.  
  2011. The following root transformation: 
  2012.  
  2013.      $[r,D:\MAKE\TEST.FIL]
  2014.  
  2015. returns: 
  2016.  
  2017.      TEST
  2018.  
  2019.  
  2020. ΓòÉΓòÉΓòÉ 2.9.7.11. Separator Transformation ΓòÉΓòÉΓòÉ
  2021.  
  2022. Syntax: 
  2023.  
  2024.      $[s,separator,string]
  2025.  
  2026. In this transformation, NMAKE32 will place the separator text between every two 
  2027. words in string. This transformation is useful when a character other than a 
  2028. space is required to separate multiple words on a program's command lines, or 
  2029. when writing in-line files. 
  2030.  
  2031. The separator text can be enclosed in quotes, and if so, can contain special 
  2032. characters such as spaces, commas, and the following escape sequences: 
  2033.  
  2034.  Escape Sequence     Description 
  2035.  
  2036.  \"                  Double quote 
  2037.  
  2038.  \n                  New line 
  2039.  
  2040.  \r                  Carriage return 
  2041.  
  2042.  \t                  Tab 
  2043.  
  2044.  \\                  Backslash 
  2045.  
  2046.  \nnn                Character with octal value nnn 
  2047.  
  2048.  \xnn                Character with hex value xnn 
  2049.  
  2050.  Example: 
  2051.  
  2052.  When creating a response file for a program, such as LINK386 which has a limit 
  2053.  to the length of any single line in the response file, and a method for 
  2054.  continuing that single logical line across several physical lines, the 
  2055.  following transformation macro should be used. Assuming the line continuation 
  2056.  character is a plus sign(+), and there is a long list of object modules in the 
  2057.  macro OBJS: 
  2058.  
  2059.        OBJS = p1.obj p2.obj p3.obj
  2060.  
  2061.  The transformation: 
  2062.  
  2063.        $[s,"+\n",$(OBJS)]
  2064.  
  2065.  would return 
  2066.  
  2067.        p1.obj+
  2068.        p2.obj+
  2069.        p3.obj
  2070.  
  2071.  Using this macro, the line limit will not be exceeded, and they can be put 
  2072.  together in one logical line. 
  2073.  
  2074.  In the above example, NMAKE32 will take a list of object file specifications 
  2075.  and place one per line in a response file. However, since NMAKE32 never 
  2076.  changes the text, the file specifications will end up as they were specified, 
  2077.  without information such as paths. 
  2078.  
  2079.  Since the expansion of the built-in macros can yield path information, the 
  2080.  separate and pattern matching transformations can be nested for more 
  2081.  flexibility. 
  2082.  
  2083.  If the following line was in a description file: 
  2084.  
  2085.        prog.exe: $(OBJS) prof.def other.lib
  2086.  
  2087.  The following transformation: 
  2088.  
  2089.        $[s,"+\n",$[m,*.obj,$**]]
  2090.  
  2091.  would return only those dependents of prog.exe that are object modules,  but 
  2092.  with any path information that NMAKE32 was able to determine, and write them 
  2093.  one per line. 
  2094.  
  2095.        <path for p1>\p1.obj+
  2096.        <path for p2>\p2.obj+
  2097.        <path for p3>\p3.obj
  2098.  
  2099.  
  2100. ΓòÉΓòÉΓòÉ 2.9.7.12. Translation Transformation ΓòÉΓòÉΓòÉ
  2101.  
  2102. Syntax: 
  2103.  
  2104.      $[t,input,output,string]
  2105.  
  2106. In this transformation, NMAKE32 will examine the contents of string and 
  2107. translate all occurrences of the characters in input to the corresponding 
  2108. characters in output. 
  2109.  
  2110. If output is null, all characters in input are removed from string. If output 
  2111. is shorter than input, the characters of output are reused. 
  2112.  
  2113. Examples: 
  2114.  
  2115. The following transformations: 
  2116.  
  2117.      $[t,/\,\/,d:\make\makemac.c]
  2118.      $[t,13579,*,1234567890]
  2119.      $[t,13579,,1234567890]
  2120.  
  2121. return 
  2122.  
  2123.      d:/make/makemac.c
  2124.      *2*4*6*8*0
  2125.      24680
  2126.  
  2127. The input and output strings can be enclosed in quotes and, if so, can contain 
  2128. special characters such as spaces, commas, and escape sequences as in the 
  2129. separate transformations ($[s,...]). 
  2130.  
  2131.  
  2132. ΓòÉΓòÉΓòÉ 2.9.7.13. Uppercase Transformation ΓòÉΓòÉΓòÉ
  2133.  
  2134. Syntax: 
  2135.  
  2136.      $[u,string]
  2137.  
  2138. In this transformation, NMAKE32 will return the uppercase equivalent of string, 
  2139. based on the current locale. 
  2140.  
  2141. Example: 
  2142.  
  2143. The following transformation: 
  2144.  
  2145.      $[u,upper]
  2146.  
  2147. returns: 
  2148.  
  2149.      UPPER
  2150.  
  2151.  
  2152. ΓòÉΓòÉΓòÉ 2.9.8. Macro Expansion and Nesting ΓòÉΓòÉΓòÉ
  2153.  
  2154. To fully understand the effects of macros in a description file it is useful to 
  2155. know a little about how NMAKE32 operates. During read-time, NMAKE32 expands all 
  2156. macros except those occurring within a command block. Macros used in command 
  2157. blocks are expanded at run-time, and they will have the last value defined at 
  2158. read-time. 
  2159.  
  2160. Example: 
  2161.  
  2162. Given the following description file excerpt: 
  2163.  
  2164.      MAC = 1
  2165.      !IF "$(MAC)" == "1"
  2166.      target0:
  2167.         @ECHO The value was 1
  2168.         @ECHO $$(MAC) is $(MAC)
  2169.      !ENDIF
  2170.      MAC = 2
  2171.  
  2172. returns: 
  2173.  
  2174.      The value was 1
  2175.      $(MAC) is 2
  2176.  
  2177. The !IF directive will evaluate to non-zero and execute the command block for 
  2178. target0 because directives are processed at read-time, and at this time the 
  2179. value of MAC is 1. Since MAC is redefined at the end of the description file, 
  2180. the run-time value is now changed to 2. The target0 command block is executed 
  2181. at run-time so the value displayed for the definition of MAC is 2. 
  2182.  
  2183. Macro references may also be nested. Macros are said to be nested if an 
  2184. expanded macro is used as part of another macro reference. 
  2185.  
  2186. Example: 
  2187.  
  2188. If the following macros are defined: 
  2189.  
  2190.    A = X
  2191.    B = Y
  2192.    C = Z
  2193.    $XYZ = hello
  2194.  
  2195. then a reference to the following macro: 
  2196.  
  2197.    $($A$B$C)
  2198.  
  2199. would have the definition hello. 
  2200.  
  2201.  
  2202. ΓòÉΓòÉΓòÉ 2.10. Directives ΓòÉΓòÉΓòÉ
  2203.  
  2204. NMAKE32 provides directives that: 
  2205.  
  2206.      Conditionally execute commands 
  2207.  
  2208.      Display error messages 
  2209.  
  2210.      Include the contents of other files 
  2211.  
  2212.      Turn some NMAKE32 options on or off 
  2213.  
  2214.  Each of these directives controls description file processing, rather than 
  2215.  target processing.  Read-time directives should begin with an exclamation 
  2216.  point (!) and must start in column one.  Run-time directives must be preceded 
  2217.  by one or more spaces and must start with a percent sign (%).  Spaces may 
  2218.  exist between the conditional character and the rest of the line.  For 
  2219.  example, "!  if expression" is the same as "!if expression". 
  2220.  
  2221.  The list below describes the directives: 
  2222.  
  2223.  Note:  This table shows directives defined using an exclamation point. 
  2224.  
  2225.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2226.   ΓöéDirective syntax              ΓöéUsage                         Γöé
  2227.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2228.   Γöé!if expression                ΓöéProcesses the statements      Γöé
  2229.   Γöé                              Γöébetween the !if keyword and   Γöé
  2230.   Γöé                              Γöéthe next !else, !elif, or     Γöé
  2231.   Γöé                              Γöé!endif directive if expressionΓöé
  2232.   Γöé                              Γöéevaluates to a non-zero value Γöé
  2233.   Γöé                              Γöé(TRUE). Otherwise, the lines  Γöé
  2234.   Γöé                              Γöéare ignored.                  Γöé
  2235.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2236.   Γöé!else                         ΓöéProcesses the statements      Γöé
  2237.   Γöé                              Γöébetween the !else and the     Γöé
  2238.   Γöé                              Γöé!elif or !endif directive if  Γöé
  2239.   Γöé                              Γöéthe preceeding !if, !elif,    Γöé
  2240.   Γöé                              Γöé!ifdef, or !ifndef expression Γöé
  2241.   Γöé                              Γöéevaluated to zero (FALSE).    Γöé
  2242.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2243.   Γöé!elif expression              ΓöéIs identical to !else         Γöé
  2244.   Γöé                              Γöéprocessing except that the    Γöé
  2245.   Γöé                              Γöélines which follow are        Γöé
  2246.   Γöé                              Γöéprocessed only if the new     Γöé
  2247.   Γöé                              Γöéexpression evaluates to a     Γöé
  2248.   Γöé                              Γöénon-zero value.               Γöé
  2249.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2250.   Γöé !elseif expression           ΓöéIs a synonym for !elif        Γöé
  2251.   Γöé                              Γöéexpression.                   Γöé
  2252.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2253.   Γöé!endif                        ΓöéMarks the end of a !if,       Γöé
  2254.   Γöé                              Γöé!ifdef, or !ifndef block of   Γöé
  2255.   Γöé                              Γöéstatements.                   Γöé
  2256.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2257.   Γöé!foreach var [in] word_list   ΓöéProcesses all statements up   Γöé
  2258.   Γöé                              Γöéthrough the ending !endfor    Γöé
  2259.   Γöé                              Γöéonce for each word in         Γöé
  2260.   Γöé                              Γöéword_list. During each        Γöé
  2261.   Γöé                              Γöéiteration the variable var    Γöé
  2262.   Γöé                              Γöéwill be set to the            Γöé
  2263.   Γöé                              Γöécorresponding word from the   Γöé
  2264.   Γöé                              Γöélist. This macro can be       Γöé
  2265.   Γöé                              Γöéreferenced as any other macro Γöé
  2266.   Γöé                              Γöéwould be referenced, via      Γöé
  2267.   Γöé                              Γöé$(var). After all iterations  Γöé
  2268.   Γöé                              Γöéare complete, the macro will  Γöé
  2269.   Γöé                              Γöéretain the last value.        Γöé
  2270.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2271.   Γöé!endfor                       ΓöéMarks the end of a !foreach   Γöé
  2272.   Γöé                              Γöéblock of statements.          Γöé
  2273.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2274.   Γöé!ifdef macro                  ΓöéIs identical to !if           Γöé
  2275.   Γöé                              Γöéprocessing, except that the   Γöé
  2276.   Γöé                              Γöéstatements which follow are   Γöé
  2277.   Γöé                              Γöéprocessed only if the macro   Γöé
  2278.   Γöé                              Γöévariable is currently defined.Γöé
  2279.   Γöé                              ΓöéNote that variables defined toΓöé
  2280.   Γöé                              Γöébe the null string are still  Γöé
  2281.   Γöé                              Γöéconsidered to be defined for  Γöé
  2282.   Γöé                              Γöé!ifdef processing. For        Γöé
  2283.   Γöé                              Γöécompatibility with previous   Γöé
  2284.   Γöé                              Γöéversions of MAKE, the form    Γöé
  2285.   Γöé                              Γöé!ifdef $(macro) is still      Γöé
  2286.   Γöé                              Γöésupported.                    Γöé
  2287.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2288.   Γöé!ifndef macro                 ΓöéIs identical to !ifdef        Γöé
  2289.   Γöé                              Γöéprocessing, except that the   Γöé
  2290.   Γöé                              Γöélines which follow are        Γöé
  2291.   Γöé                              Γöéprocessed only if the macro   Γöé
  2292.   Γöé                              Γöévariable is not currently     Γöé
  2293.   Γöé                              Γöédefined. Note that variables  Γöé
  2294.   Γöé                              Γöédefined to be the null string Γöé
  2295.   Γöé                              Γöéare still considered to be    Γöé
  2296.   Γöé                              Γöédefined for !ifndef           Γöé
  2297.   Γöé                              Γöéprocessing.                   Γöé
  2298.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2299.   Γöé!undef macro                  ΓöéUndefines a previously definedΓöé
  2300.   Γöé                              Γöémacro. Subsequent references  Γöé
  2301.   Γöé                              Γöéto $(macro) will return an    Γöé
  2302.   Γöé                              Γöéempty string, and !ifdef macroΓöé
  2303.   Γöé                              Γöéwill evaluate to zero.        Γöé
  2304.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2305.   Γöé!error text                   ΓöéPrints out text (macros are   Γöé
  2306.   Γöé                              Γöéexpanded) and then immediatelyΓöé
  2307.   Γöé                              Γöéterminates NMAKE32 with a     Γöé
  2308.   Γöé                              Γöéreturn code of 1.             Γöé
  2309.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2310.   Γöé!include [<filename>]         ΓöéReads and evaluates the file  Γöé
  2311.   Γöé                              Γöéfilename before continuing    Γöé
  2312.   Γöé                              Γöéwith the current description  Γöé
  2313.   Γöé                              Γöéfile. If filename is enclosed Γöé
  2314.   Γöé                              Γöéby angle brackets (<>),       Γöé
  2315.   Γöé                              ΓöéNMAKE32 searches for the file Γöé
  2316.   Γöé                              Γöéin the directories specified  Γöé
  2317.   Γöé                              Γöéby the INCLUDE macro;         Γöé
  2318.   Γöé                              Γöéotherwise, it looks only in   Γöé
  2319.   Γöé                              Γöéthe directory specified. The  Γöé
  2320.   Γöé                              ΓöéINCLUDE macro is initially setΓöé
  2321.   Γöé                              Γöéto the value of the INCLUDE   Γöé
  2322.   Γöé                              Γöéenvironment variable.         Γöé
  2323.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2324.   Γöé!tryinclude [<filename>]      ΓöéSimilar to !include, except ifΓöé
  2325.   Γöé                              Γöéthe file does not exist,      Γöé
  2326.   Γöé                              ΓöéNMAKE32 will ignore the error Γöé
  2327.   Γöé                              Γöéand continue.                 Γöé
  2328.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2329.   Γöé!cmdswitches {+|-}<opt>       ΓöéTurns on or off one of four   Γöé
  2330.   Γöé                              ΓöéNMAKE32 options: /D, /I, /N,  Γöé
  2331.   Γöé                              Γöéand /S. If no options are     Γöé
  2332.   Γöé                              Γöéspecified, the options are    Γöé
  2333.   Γöé                              Γöéreset to the values they had  Γöé
  2334.   Γöé                              Γöéwhen NMAKE32 was started. To  Γöé
  2335.   Γöé                              Γöéturn an option on, precede it Γöé
  2336.   Γöé                              Γöéwith a plus sign (+); to turn Γöé
  2337.   Γöé                              Γöéit off precede it with a minusΓöé
  2338.   Γöé                              Γöésign (-). This directive      Γöé
  2339.   Γöé                              Γöéupdates the MAKEFLAGS macro.  Γöé
  2340.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2341.  
  2342.  
  2343. ΓòÉΓòÉΓòÉ 2.10.1. Expressions Supported by NMAKE32 ΓòÉΓòÉΓòÉ
  2344.  
  2345. The expression used with the !if, !elif, and !elseif directives can consist of 
  2346. integer constants, string constants, built-in functions, or exit codes returned 
  2347. by programs. Integer constants can use the  C unary operators for numerical 
  2348. negation (-), one's complement (~), and logical negation (!). Any of the C 
  2349. binary operators listed below any also be used: 
  2350.  
  2351.  Operator    Description 
  2352.  
  2353.  +           Addition 
  2354.  
  2355.  -           Subtraction 
  2356.  
  2357.  *           Multiplication 
  2358.  
  2359.  /           Division 
  2360.  
  2361.  %           Modulus 
  2362.  
  2363.  ^           Exponentiation 
  2364.  
  2365.  &&          Logical AND 
  2366.  
  2367.  ||          Logical OR 
  2368.  
  2369.  ==          Equality 
  2370.  
  2371.  !=          Inequality 
  2372.  
  2373.  <           Less than 
  2374.  
  2375.  >           Greater than 
  2376.  
  2377.  <=          Less than or equal to 
  2378.  
  2379.  >=          Greater than or equal to 
  2380.  
  2381.  
  2382. ΓòÉΓòÉΓòÉ 2.10.2. Directive Notes ΓòÉΓòÉΓòÉ
  2383.  
  2384.      Directives can be nested to any depth, limited only by available memory. 
  2385.  
  2386.      Included files can include other files as well, loops are not detected. 
  2387.  
  2388.      Parentheses must be used to group expressions if a directive contains 
  2389.       multiple expressions. 
  2390.  
  2391.      Values are assumed to be decimal values unless specified with a leading 0 
  2392.       (octal) or a leading 0x (hexadecimal). 
  2393.  
  2394.      Strings are enclosed by double quotes ("). You can use the equality (==) 
  2395.       and inequality (!=) operators to compare two strings. 
  2396.  
  2397.      A program can be invoked in an expression by enclosing the program name 
  2398.       in square brackets ([ ]). The exit code returned by the program is used 
  2399.       in the expression. Such programs will always be invoked if the directive 
  2400.       is evaluated, even if -N has been specified. 
  2401.  
  2402.  Example 
  2403.  
  2404.  Using the following description file excerpt: 
  2405.  
  2406.        !INCLUDE <INFRULES.TXT>
  2407.        !CMDSWITCHES +D
  2408.        WINNER.EXE: WINNER.OBJ
  2409.        !IFDEF DEBUG
  2410.        !   IF "$(DEBUG)" == "y"
  2411.               ilink /DE WINNER.OBJ;
  2412.        !   ELSE
  2413.               ilink WINNER.OBJ
  2414.        !   ENDIF
  2415.        !ELSE
  2416.        !    ERROR Macro named DEBUG is not defined.
  2417.        !ENDIF
  2418.  
  2419.  The !INCLUDE directive causes the file INFRULES.TXT to be read and evaluated 
  2420.  as if it were part of the description file. 
  2421.  
  2422.  The !CMDSWITCHES directive turns on the /D option, which displays the dates of 
  2423.  the files as they are checked. 
  2424.  
  2425.  The !IFDEF directive checks to see whether the macro DEBUG is defined. If it 
  2426.  is defined, the !IF directive checks to see whether it is set to 'y'. If it 
  2427.  is, the linker is invoked with the /DE option; otherwise, it is invoked 
  2428.  without the /DE. If the DEBUG macro is not defined, the !ERROR directive 
  2429.  prints out the message and NMAKE32 stops executing. 
  2430.  
  2431.  
  2432. ΓòÉΓòÉΓòÉ 2.10.3. Built-in Functions ΓòÉΓòÉΓòÉ
  2433.  
  2434. Built-in functions test certain conditions at either read-time or run-time. 
  2435. They are used in expressions with the conditional constructs. The following 
  2436. built-in functions are available: 
  2437.  
  2438. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2439. ΓöéFunction Name                 ΓöéDescription                   Γöé
  2440. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2441. Γöé%defined(macro)               ΓöéReturns 1 if macro is defined;Γöé
  2442. Γöé                              Γöé0 otherwise                   Γöé
  2443. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2444. Γöé%dir(dirspec)                 ΓöéReturns 1 if dirspec specifiesΓöé
  2445. Γöé                              Γöéa valid and existing          Γöé
  2446. Γöé                              Γöédirectory; 0 otherwise        Γöé
  2447. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2448. Γöé%exist(filespec)              ΓöéReturns 1 if filespec exists  Γöé
  2449. Γöé                              Γöé(as a file or directory); 0   Γöé
  2450. Γöé                              Γöéotherwise                     Γöé
  2451. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2452. Γöé%exists(filespec)             ΓöéIs a synonym for %exist(      Γöé
  2453. Γöé                              Γöéfilespec)                     Γöé
  2454. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2455. Γöé%file(filespec)               ΓöéReturns 1 if filespec         Γöé
  2456. Γöé                              Γöéspecifies a valid and existingΓöé
  2457. Γöé                              Γöéfile; 0 otherwise             Γöé
  2458. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2459. Γöé%member(word, word_list)      ΓöéReturns 1 if word is containedΓöé
  2460. Γöé                              Γöé-- as a separate, blank       Γöé
  2461. Γöé                              Γöédelimited word -- in word_listΓöé
  2462. Γöé                              Γöé; 0 otherwise. The search is  Γöé
  2463. Γöé                              Γöécase-insensitive.             Γöé
  2464. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2465. Γöé%status()                     ΓöéReturns the return code of theΓöé
  2466. Γöé                              Γöélast user command invoked.    Γöé
  2467. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2468. Γöé%writable(filespec)           ΓöéReturns 1 if filespec         Γöé
  2469. Γöé                              Γöéspecifies a valid and existingΓöé
  2470. Γöé                              Γöédirectory or file that is not Γöé
  2471. Γöé                              Γöéread-only; 0 otherwise.       Γöé
  2472. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2473.  
  2474. Example: 
  2475.  
  2476. Built-in functions can be used just like other values in expressions: 
  2477.  
  2478.      !if %defined(macro1) && ("$(macro2)" == "ON") &&
  2479.          %exists($(target))
  2480.  
  2481. This directive is evaluated to non-zero if macro1 is defined, macro2 has the 
  2482. definition "ON", and the file name defined in the macro target exists as a file 
  2483. or directory. 
  2484.  
  2485.  
  2486. ΓòÉΓòÉΓòÉ 2.10.4. Other Commands used in !IF Expressions ΓòÉΓòÉΓòÉ
  2487.  
  2488. The operating system commands SET, CD, and <drive>: can also be used in !IF 
  2489. expressions. Specifying these commands within !IF statements will guarantee 
  2490. that they are executed before any compile is processed at read-time. 
  2491.  
  2492. The syntax for this type of !if expression is: 
  2493.  
  2494.       !if [command]
  2495.  
  2496. where the commands set, cd, and <drive>: are enclosed in square brackets. 
  2497.  
  2498. Example: 
  2499.  
  2500. The following line in a description file: 
  2501.  
  2502.      !if [cd \] == 0
  2503.  
  2504. will change the directory to the root directory and execute the statement(s) 
  2505. after the !if, if the return code from the command is 0. 
  2506.  
  2507.  
  2508. ΓòÉΓòÉΓòÉ 2.11. In-Line Files ΓòÉΓòÉΓòÉ
  2509.  
  2510. Occasionally, the commands given in a description file exceed the command-line 
  2511. limit of the operating system. To avoid this, NMAKE32 allows the user to 
  2512. generate in-line files which can be read as response files by other programs. 
  2513.  
  2514. The syntax to generate an in-line file is: 
  2515.  
  2516.      target: dependents
  2517.         command  <<[filename]
  2518.  
  2519.      <any text>
  2520.      <any text>
  2521.      .
  2522.      .
  2523.      .
  2524.      <<[KEEP | NOKEEP]
  2525.  
  2526. where <any text> can be text, macros, file names, predefined macros, or 
  2527. anything valid for the command executing. 
  2528.  
  2529. Note:  Loops are not detected. 
  2530.  
  2531. All of the text between the two sets of double less than signs (<<) is placed 
  2532. into an in-line file and given the name filename. The inline file can be 
  2533. referred to later by using filename, providing the keep option is specified. If 
  2534. filename is not given, NMAKE32 gives the file a unique name in the directory 
  2535. specified by the TMP environment variable. This temporary file is erased after 
  2536. NMAKE32 has processed the command block. The in-line file can be temporary or 
  2537. permanent. If you do not specify otherwise, or if you specify the keyword 
  2538. NOKEEP, the in-line is temporary. Specify KEEP to retain the file. If the -N 
  2539. flag was specified, NMAKE32 will display the contents of the in-line file. 
  2540.  
  2541. Note:  Blank lines and comments are not ignored if they occur in an in-line 
  2542. file. 
  2543.  
  2544. Example: 
  2545.  
  2546. Below is a description file excerpt which shows how to create an in-line file 
  2547. for the link program: 
  2548.  
  2549.      target.exe: file1.obj file2.obj file3.obj file4.obj lib1.lib lib2.lib
  2550.          ilink @<<
  2551.       $[s,"+\n",$[m,*.obj,$**]]
  2552.       $@
  2553.       $*.map
  2554.       $[s,"+",$[m,*.lib,$**]]
  2555.       ;
  2556.       <<
  2557.  
  2558. NMAKE32 creates a file, in this case the file name is determined at run-time, 
  2559. and places the following lines into it. 
  2560.  
  2561.      file1.obj+
  2562.      file2.obj+
  2563.      file3.obj+
  2564.      file4.obj+
  2565.      target.exe
  2566.      target.map
  2567.      lib1+lib2
  2568.      ;
  2569.  
  2570. NMAKE32 executes the command ilink with a response file using the name 
  2571. determined by NMAKE32, and erases the file. 
  2572.  
  2573.  
  2574. ΓòÉΓòÉΓòÉ 2.12. Escape Characters ΓòÉΓòÉΓòÉ
  2575.  
  2576. Several control characters are used by NMAKE32 in its syntax. These characters 
  2577. are: 
  2578.  
  2579. (          )     #     $     ^     \
  2580. {          }     !     @     -     [newline]
  2581.  
  2582. To use one of these characters in a command and not have it interpreted by 
  2583. NMAKE32,  a caret (^) is used in front of the character. 
  2584.  
  2585. Examples: 
  2586.  
  2587. The string: 
  2588.  
  2589.      BIG^#.C
  2590.  
  2591. is treated as 
  2592.  
  2593.      BIG#.C
  2594.  
  2595. With the caret, you can include a literal newline character in a description 
  2596. file. This capability is useful in macro definitions, as in the following 
  2597. example: 
  2598.  
  2599.      XYZ=abc^<enter>
  2600.      def
  2601.  
  2602. where <enter> is a newline character. 
  2603.  
  2604. The effect is equivalent to the effect of assigning the C-style string abc\ndef 
  2605. to the XYZ macro. Note that this effect differs from the effect of using the 
  2606. backslash (\) to continue a line. A newline character that follows a backslash 
  2607. is replaced with a space, unless the -\ option is specified. NMAKE32 ignores a 
  2608. caret that is not followed by any of the characters it sees in its syntax. 
  2609.  
  2610. Note:  Control characters in the makefile that are used in filenames, 
  2611. pathnames, and so on, that are not to be evaluated by NMAKE32 must be preceded 
  2612. by the caret (^) character.  For example, to define a macro which contains the 
  2613. root directory specifier C:\, the backslash character must be preceded by a 
  2614. caret character, since the backslash character is used to concatenate lines in 
  2615. NMAKE32.  The proper way to define this macro is: 
  2616.  
  2617.   root=C:^\
  2618.  
  2619. If the macro was coded without the caret character, such as in: 
  2620.  
  2621.   root=C:\
  2622.   !ifdef root
  2623.       .
  2624.       .
  2625.       .
  2626.  
  2627. an error would result, since NMAKE32 would concatenate the root macro 
  2628. definition with the next line in the makefile.  Placing a caret character 
  2629. before the backslash character prevents NMAKE32 from processing the backslash 
  2630. as a control character. 
  2631.  
  2632.  
  2633. ΓòÉΓòÉΓòÉ 3. Notices ΓòÉΓòÉΓòÉ
  2634.  
  2635. May 1999 
  2636.  
  2637. The following paragraph does not apply to the United Kingdom or any country 
  2638. where such provisions are inconsistent with local law:  INTERNATIONAL BUSINESS 
  2639. MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY 
  2640. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  2641. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states 
  2642. do not allow disclaimer of express or implied warranties in certain 
  2643. transactions, therefore, this statement may not apply to you. 
  2644.  
  2645. This publication could include technical inaccuracies or typographical errors. 
  2646. Changes are periodically made to the information herein; these changes will be 
  2647. incorporated in new editions of the publication. IBM may make improvements 
  2648. and/or changes in the product(s) and/or the program(s) described in this 
  2649. publication at any time. 
  2650.  
  2651. This publication was developed for products and services offered in the United 
  2652. States of America.  IBM may not offer the products, services, or features 
  2653. discussed in this document in other countries, and the information is subject 
  2654. to change without notice. Consult your local IBM representative for information 
  2655. on the products, services, and features available in your area. 
  2656.  
  2657. Requests for technical information about IBM products should be made to your 
  2658. IBM reseller or IBM marketing representative. 
  2659.  
  2660.  
  2661. ΓòÉΓòÉΓòÉ 3.1. Copyright Notices ΓòÉΓòÉΓòÉ
  2662.  
  2663. COPYRIGHT LICENSE: This publication contains printed sample application 
  2664. programs in source language, which illustrate OS/2 programming techniques. You 
  2665. may copy, modify, and distribute these sample programs in any form without 
  2666. payment to IBM, for the purposes of developing, using, marketing or 
  2667. distributing application programs conforming to the OS/2 application 
  2668. programming interface. 
  2669.  
  2670. Each copy of any portion of these sample programs or any derivative work, which 
  2671. is distributed to others, must include a copyright notice as follows: "(C) 
  2672. (your company name) (year).  All rights reserved." 
  2673.  
  2674. (C)Copyright International Business Machines Corporation 1994, 1999. All rights 
  2675. reserved. 
  2676. Note to U.S. Government Users - Documentation related to restricted rights - 
  2677. Use, duplication or disclosure is subject to restrictions set forth in GSA ADP 
  2678. Schedule Contract with IBM Corp. 
  2679.  
  2680.  
  2681. ΓòÉΓòÉΓòÉ 3.2. Disclaimers ΓòÉΓòÉΓòÉ
  2682.  
  2683. References in this publication to IBM products, programs, or services do not 
  2684. imply that IBM intends to make these available in all countries in which IBM 
  2685. operates. Any reference to an IBM product, program, or service is not intended 
  2686. to state or imply that only that IBM product, program, or service may be used. 
  2687. Subject to IBM's valid intellectual property or other legally protectable 
  2688. rights, any functionally equivalent product, program, or service may be used 
  2689. instead of the IBM product, program, or service. The evaluation and 
  2690. verification of operation in conjunction with other products, except those 
  2691. expressly designated by IBM, are the responsibility of the user. 
  2692.  
  2693. IBM may have patents or pending patent applications covering subject matter in 
  2694. this document. The furnishing of this document does not give you any license to 
  2695. these patents. You can send license inquiries, in writing, to: 
  2696.  
  2697.       IBM Director of Licensing 
  2698.       IBM Corporation 
  2699.       500 Columbus Avenue 
  2700.       Thornwood, NY  10594 
  2701.       U.S.A. 
  2702.  
  2703.  Asia-Pacific users can inquire, in writing, to the IBM Director of 
  2704.  Intellectual Property and Licensing, IBM World Trade Asia Corporation, 2-31 
  2705.  Roppongi 3-chome, Minato-ku, Tokyo 106, Japan. 
  2706.  
  2707.  Licensees of this program who wish to have information about it for the 
  2708.  purpose of enabling: (i) the exchange of information between independently 
  2709.  created programs and other programs (including this one) and (ii) the mutual 
  2710.  use of the information which has been exchanged, should contact IBM 
  2711.  Corporation, Department LZKS, 11400 Burnet Road, Austin, TX 78758 U.S.A.  Such 
  2712.  information may be available, subject to appropriate terms and conditions, 
  2713.  including in some cases, payment of a fee. 
  2714.  
  2715.  
  2716. ΓòÉΓòÉΓòÉ 3.3. Trademarks ΓòÉΓòÉΓòÉ
  2717.  
  2718. The following terms are trademarks of the IBM Corporation in the United States 
  2719. or other countries or both: 
  2720.  
  2721.  AIX                           PowerPC 
  2722.  C Set ++                      Presentation Manager 
  2723.  Common User Access            SAA 
  2724.  CUA                           System Application Architecture 
  2725.  IBM                           WIN-OS/2 
  2726.  Operating System/2            Workplace Shell 
  2727.  OS/2                          XGA 
  2728.  Personal System/2 
  2729.  
  2730.  The following terms are trademarks of other companies: 
  2731.  
  2732.  CL, CL386                Pentium 
  2733.  Intel                    X/Open Company Ltd. 
  2734.  Intel Corporation        /X/Opend 
  2735.  MASM, MASM386 
  2736.  
  2737.  PC Direct is a trademark of Ziff Communications Company and is used by IBM 
  2738.  Corporation under license. 
  2739.  
  2740.  UNIX is a registered trademark in the United States and other countries 
  2741.  licensed exclusively through X/Open Company Limited. 
  2742.  
  2743.  C-bus is a trademark of Corollary, Inc. 
  2744.  
  2745.  Microsoft, Windows, and the Windows 95 logo are trademarks or registered 
  2746.  trademarks of Microsoft Corporation. 
  2747.  
  2748.  Java and HotJava are trademarks of Sun Microsystems, Inc. 
  2749.  
  2750.  Other company, product, and service names may be trademarks or service marks 
  2751.  of others.