Microsoft KB Archive/59141

= Accessing Environment Variables In a Makefile =

Article ID: 59141

Article Last Modified on 12/1/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
 * Microsoft Program Maintenance Utility 1.4
 * Microsoft Program Maintenance Utility 1.4

-



This article was previously published under Q59141



You can access environment variables within a MAKE or NMAKE makefile in the same way that you access user-defined macros. The only difference is that the names of environment variables must be capitalized when used in this manner. For example:


 * 1) the INCLUDE &quot;macro&quot; will pick up your INCLUDE environment variable

file.obj : file.c $(INCLUDE)\file.h

cl /c /Zi /Od file.c

Additional query words: kbinf 1.10 1.20 1.30 1.40 1.50

Keywords: KB59141

-

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

© Microsoft Corporation. All rights reserved.