BUG: Inference Rules Not Invoked on Multiple Targets

Last reviewed: January 24, 1995
Article ID: Q75206
The information in this article applies to:
  • Microsoft NMAKE Utility for MS-DOS, versions 1.1x, 1.2, 1.3, and 1.4
  • Microsoft NMAKE Utility for OS/2, versions 1.1x and 1.21
  • Microsoft NMAKE Utility for Windows NT, versions 1.4 and 1.5

SYMPTOMS

The Microsoft NMAKE utility may not invoke inference rules when multiple dependency lines are used for a single target as illustrated in the sample makefile below.

RESOLUTION

To work around this problem, either avoid the use of multiple dependency lines for a single target, or do not use inference rules.

STATUS

Microsoft has confirmed this to be a problem in NMAKE versions noted above. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

When NMAKE processes the following sample makefile, the inference rule to build the executable file is not executed. However, the inference rule to build the object file is executed correctly because the object files are build as one target. Also, the commands stated explicitly for multiple targets are executed correctly.

Sample Makefile

# NMAKE options needed: none

# inference rule that should be invoked .obj.exe:

    LINK /INFO TEST.OBJ;

all : test.exe

# default inference rule executed for single target test.obj : test.c

# inference rule not executed for multiple targets test.exe :: test.obj

test.exe :: test.def

    echo Not using .DEF file


Additional reference words: 1.11 1.12 1.13 1.20 1.21 1.30 1.40 1.50
KBCategory: kbtool kbbuglist
KBSubcategory: NmakeIss


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.

Last reviewed: January 24, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.