KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q68658: NMK Displays Only First of Multiple Commands

Article: Q68658
Product(s): See article
Version(s): 1.11
Operating System(s): MS-DOS
Keyword(s): ENDUSER | buglist1.11 S_C S_NMK | mspl13_basic
Last Modified: 1-FEB-1991

NMK version 1.11 displays only the first of multiple commands it is
executing when the exclamation point (!) command modifier is used with
the predefined macro $? or $**.

The ! command modifier executes the command for each dependent file if
the command uses the predefined macro $? or $**. The $? macro refers
to all dependent files that are out-of-date with respect to the
target. The $** macro refers to all dependent files in the description
block.

The sample makefile below echoes each filename to the screen. The
NMAKE output shows the correct result; each ECHO command is displayed
and executed. Likewise, the NMK output executes each ECHO command;
however, only the first command is displayed to the screen.

Sample Makefile
---------------

ALL: foo1.c foo2.c foo3.c
      !ECHO $**

Output:

      NMAKE                      NMK
-----------------         -----------------
      ECHO foo1.c               ECHO foo1.c
foo1.c                    foo1.c
      ECHO foo2.c         foo2.c
foo2.c                    foo3.c
      ECHO foo3.c
foo3.c

Microsoft has confirmed this to be a problem in NMK version 1.11. We
are researching this problem and will post new information here as it
becomes available.

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.