[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Two Level Assignment
From: |
Ajay Jain |
Subject: |
Two Level Assignment |
Date: |
Fri, 9 Dec 2011 05:10:18 +0530 |
Hello,
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?
Regards.
- Two Level Assignment,
Ajay Jain <=