KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q66572: NMAKE 1.11 Fails to Stop If Command Is Redirected

Article: Q66572
Product(s): See article
Version(s): 1.11
Operating System(s): MS-DOS
Keyword(s): ENDUSER | buglist1.11 fixlist1.12 | mspl13_basic
Last Modified: 9-NOV-1990

If the command line that NMAKE invokes is redirected to another
output file and the command returns a non-zero return code, NMAKE
version 1.11 will not stop the build process.

Microsoft has confirmed this to be a problem in the DOS version of
NMAKE.EXE. This problem has been corrected in version 1.12.

The following is a sample make file that, with NMAKE version 1.11,
will fail to stop if the compiler returns an error; with version 1.12,
it correctly stops the build process:

all: foo.exe

foo.obj: foo.c
   cl /c /AS foo.c >foo.err

foo.exe: foo.obj
   link /NOI /NOE foo.obj;

The easiest way to workaround this is to redirect from the command
line, for example:

   nmake /f foo.mak >foo.err

The drawback to this is that you can only have one error log.

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.