|
From: | 조정현 |
Subject: | variable argument of make |
Date: | Tue, 20 Aug 2002 17:56:13 +0900 |
when defining variable at argument of 'make' like below.
(I use GNU make on Windows 2000 platform.)
c:\ABC>make all DIRFLAG=-DDIRNAME=\\"\"ABC"\"\""
---------------------------------------makeifle start-------------------------------------
CC=gcc
all:
@$(CC) $(DIRFLAG) -o test.o test.c
---------------------------------------makeifle end---------------------------------------
I could get same result if change makefile as following
and execute make without argument
---------------------------------------makeifle start-------------------------------------
CC=gcc
DIRFLAG=-DDIRNAME="ABC"
all:
@$(CC) $(DIRFLAG) -o test.o test.c
---------------------------------------makeifle end---------------------------------------
Thanks for reading and hoping your answer.
Jung-hyun Cho.
[Prev in Thread] | Current Thread | [Next in Thread] |