[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Two Level Assignment
From: |
J.T. Conklin |
Subject: |
Re: Two Level Assignment |
Date: |
Thu, 08 Dec 2011 16:56:25 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, berkeley-unix) |
Ajay Jain <address@hidden> writes:
> I would llike to accomplish the following:
>
> INFO=4
> LOG_LEVEL=INFO
>
> Using the single variable - LOG_LEVEL, I want to get INFO and 4 in two
> situations:
>
> 1. When I print in a Makefile rule, I need to print INFO. This can be
> easily done by using echo $LOG_LEVEL (which evaluates to INFO.
>
> 2. When I need to update CFLAGS, I need to give CFLAGS+=-DLOG_LEVEL=4. I
> fail to do this. I tried using eval etc. but could not achieve. Can
> somebody suggest?
Use: CFLAGS+=-DLOGLEVEL=$($(LOG_LEVEL))
--jtc
--
J.T. Conklin