Microsoft KB Archive/50383

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Knowledge Base


Inference Rule May Fail When Spaces on Blank Command Line

Article ID: 50383

Article Last Modified on 10/23/2003



APPLIES TO

  • Microsoft Program Maintenance Utility 1.2
  • Microsoft Program Maintenance Utility 1.2
  • Microsoft Program Maintenance Utility 1.2
  • Microsoft Program Maintenance Utility 1.2
  • Microsoft Program Maintenance Utility 1.2
  • Microsoft Program Maintenance Utility 1.2
  • Microsoft Program Maintenance Utility 1.3
  • Microsoft Program Maintenance Utility 1.4
  • Microsoft Program Maintenance Utility 1.4
  • Microsoft Program Maintenance Utility 1.4
  • Microsoft Program Maintenance Utility 1.4
  • Microsoft Program Maintenance Utility 1.4



This article was previously published under Q50383

SUMMARY

When using inference rules in an NMAKE description file, the target/dependency line must be followed by a blank line (no space characters); otherwise, the inference rule commands will not be executed. NMAKE checks this line for any ASCII characters; if ANY characters exist, NMAKE will ignore the inference rule and try to execute the line, even if it contains only a space or spaces.

The following is a simple example, which demonstrates this problem:

.c.exe:
  cl $**
 
ALL : main.exe
 
main.exe : main.c
<space>
                

Nothing happens if this description file is passed to NMAKE because the space character causes NMAKE to assume there are explicit commands following the target/dependency line, causing it to ignore the inference rule. Note that this is expected behavior for NMAKE.

MORE INFORMATION

MAKE version 4.x inference rules/description blocks do not exhibit this behavior. This is something to keep in mind when converting description files from MAKE to NMAKE.


Additional query words: kbinf 1.10 1.20 1.30 1.40

Keywords: kb16bitonly KB50383