Microsoft KB Archive/76741

= Copy with NMAKE, Correction to &quot;Basic 7.0: Programmer's Guide&quot; =

Article ID: 76741

Article Last Modified on 10/20/2003

-

APPLIES TO


 * Microsoft BASIC Professional Development System 7.1
 * Microsoft BASIC Professional Development System 7.0

-



This article was previously published under Q76741



SUMMARY
The following example on page 645 of the &quot;Microsoft Basic 7.0: Programmer's Guide&quot; versions 7.0 and 7.1 manuals is incorrect: # Include files depend on versions in current directory DIR=C:\INCLUDE $(DIR)\GLOBALS.H : GLOBALS.H          COPY GLOBALS.H $@ $(DIR)\TYPES.H : TYPES.H          COPY TYPES.H  $@ $(DIR)\MACROS.H : MACROS.H          COPY MACROS.H $@ When the above example is run under NMAKE, only the first description block will be processed, causing the file GLOBALS.H to be updated. The remaining two description blocks will be ignored such that the files TYPES.H and MACROS.H will never be updated by NMAKE.

This example is missing the ALL target-dependency, which ties multiple, independent targets to a single target. The ALL target-dependency is required by NMAKE so that all of the targets will be made. The example should be changed to read as follows: # Include files depend on versions in current directory DIR=C:\INCLUDE ALL:$(DIR)\GLOBALS.H $(DIR)\TYPES.H $(DIR)\MACROS.H  $(DIR)\GLOBALS.H : GLOBALS.H           COPY GLOBALS.H $@ $(DIR)\TYPES.H : TYPES.H          COPY TYPES.H  $@ $(DIR)\MACROS.H : MACROS.H          COPY MACROS.H $@ Note the addition of the third line.



MORE INFORMATION
For more information on how to copy files with NMAKE, query on the following words:

Copying and Files and NMAKE

Additional query words: BasicCom 7.00 7.10 1.10

Keywords: KB76741

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.