Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

<QBSK>NMAKE: Env-Var MACRO Blues

0 views
Skip to first unread message

saifikhan

unread,
Oct 17, 2000, 3:00:00 AM10/17/00
to
Hi:
I am trying to echo the %PATH% information
in my try.mak file.
<CODE FILE="try.mak">
PATH=F:\Code\pointers

INFO:
echo %PATH%

CLEAN:
-@erase ".\*.obj"
-@erase ".\*.exe"

</CODE>
I issue the following command on the CMD prompt
$> nmake /f try.mak INFO

<OUTPUT STREAM="STDOUT">
Microsoft (R) Program Maintenance Utility Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

echo %PATH
%PATH

</OUTPUT>

Can somebody point to me in the right direction ?

best regards
.


Sent via Deja.com http://www.deja.com/
Before you buy.

Alexander Bartolich

unread,
Oct 17, 2000, 3:00:00 AM10/17/00
to

saifikhan wrote:
> [...] Can somebody point to me in the right direction ?

INFO:
echo %PATH%%

Don't know why. I stumbled over this myself some time ago.
It's interesting that this is not documented.

From MSDN:
# For example:
#
# PATH=$(PATH);\nonesuch
#
# all:
# echo %PATH%
#
# In this example, changing PATH changes the corresponding
# environment variable PATH; it appends \nonesuch to your path.
#
# If an environment variable is defined as a string that would
# be syntactically incorrect in a makefile, no macro is created
# and no warning is generated. If a variable's value contains a
# dollar sign ($), NMAKE interprets it as the beginning of a macro
# invocation. Using the macro can cause unexpected behavior.

--
Electron is a fierce god, tolerating neither Dionysos nor Aphrodite.

0 new messages