www.digitalmars.com         C & C++   DMDScript  

c++ - env vars as macros in smake

reply Kon Tantos <ksoft1 attglobal.net> writes:
It appears that macros which correspond to predefined env vars are case 
sensititive in smake. Eg the following trivial makefile.
(I am using 8.31 (cd) on W2k sp3)
--
all:	
	REM UPPER case macro expands to $(WXINC1)
	REM MiXed case macro expands to $(WxInC1)
	REM lower case macro expands to $(wxinc1)
--

produces the following output on my system
--
         REM UPPER case macro expands to 
F:\wx2\include;F:\wx2\contrib\include
         REM MiXed case macro expands to
         REM lower case macro expands to
--
WXINC1 is a predefined environmental var.

This is not a problem in itself, but I have tried using env var macros 
in the IDDE to specify include directories. The IDDE converts & stores 
my macro names in lowercase & then the make fails because the macro does 
not expand correctly.
-- 
Regards
Kon Tantos
ksoft1 attglobal.net or kon.tantos tafe.nsw.edu.au
Dec 29 2002
parent "Walter" <walter digitalmars.com> writes:
Sounds like a bug in the IDDE. I'll log it. Thanks, -Walter

"Kon Tantos" <ksoft1 attglobal.net> wrote in message
news:3E0F7705.50004 attglobal.net...
 It appears that macros which correspond to predefined env vars are case
 sensititive in smake. Eg the following trivial makefile.
 (I am using 8.31 (cd) on W2k sp3)
 --
 all:
 REM UPPER case macro expands to $(WXINC1)
 REM MiXed case macro expands to $(WxInC1)
 REM lower case macro expands to $(wxinc1)
 --

 produces the following output on my system
 --
          REM UPPER case macro expands to
 F:\wx2\include;F:\wx2\contrib\include
          REM MiXed case macro expands to
          REM lower case macro expands to
 --
 WXINC1 is a predefined environmental var.

 This is not a problem in itself, but I have tried using env var macros
 in the IDDE to specify include directories. The IDDE converts & stores
 my macro names in lowercase & then the make fails because the macro does
 not expand correctly.
 --
 Regards
 Kon Tantos
 ksoft1 attglobal.net or kon.tantos tafe.nsw.edu.au

Dec 29 2002