Q50693: Special Macros Not Recognized in NMAKE Inline Files
Article: Q50693
Product(s): See article
Version(s): 1.00 1.01 | 1.00 1.01
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | | mspl13_basic
Last Modified: 10-NOV-1989
When you use special macros to indicate targets or dependents in
inline files, NMAKE Version 1.00 will generate the error message
U4108, "special macro undefined." These special macros are $@, $*,
$**, and $?.
To prevent the problem, avoid use of these special macros in inline
files. Instead of using those << inline files, create the response
file in a separate NMAKE target, and redirect TYPE and ECHO commands
to the desired file.
$@ refers to the full name of the target, base plus extension. $*
refers only to the base name of the target.
$** represents the complete list of dependent files for the target. $?
represents only the dependents that are out of date relative to the
target.
The following makefile will generate U4018 for $**:
#makefile test
FOO.EXE: *.OBJ
LINK @<<FOO.LRF
$**;
<<
To avoid the problem, break this up into two steps, the makefile and a
linker response file with output redirected:
#makefile test
FOO.EXE: *.OBJ FOO.LRF
LINK @FOO.LRF
FOO.LRF: *.OBJ
echo $**; >FOO.LRF
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.