help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to conditionaly set a variable depending on final target?


From: shh
Subject: how to conditionaly set a variable depending on final target?
Date: Tue, 14 Jan 2003 10:58:32 +0900

hi all,
i want to set a variable depending on the value of final target, as follows.

on command line,
    make -f mf.mak t01

in make file,
    ifeq ($(final_targetname), t01)
            ^^^^^^^^^^^^^^^^^^^^
    VAR = T_01
    else
    VAR = T02
    endif

i cannot use $@, because it is substituted for the target of every command 
executed.

thanks
hwan


==================================================================
Shin, Hyung-Hwan
 
Modmen Co., Ltd.
5F. Dongnam Bldg. 105-4 Imae-Dong Bundang-gu,
Seongnam-Si, Gyeonggi-Do, Korea
Tel  : +82-31-701-9394
Fax : +82-31-701-9395
Email : address@hidden
================================================================== 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]