please see my response/clarification below in bold with ----> >>> "Paul D. Smith" <[EMAIL PROTECTED]> 01/05/04 10:08AM >>> %% "Sandeep Nema" <[EMAIL PROTECTED]> writes:
sn> GNU make version: 3.80 sn> O/S: AIX 5.0 sn> We used "?:" macro substitution on tru64 platform with their make, and sn> it works as following: sn> X= $(EXCLUDE_X?:$(TMP_ADD_X)) sn> in the above if EXCLUDE_X is defined then X will be empty, if not sn> defined it will be equal to TMP_ADD_X. What does "defined" mean here? Does it mean "has some non-empty value", or does it mean "has been set in any way, including to the empty value"? -----> has been set in any way, including to the empty value sn> This does not give any error while making with GNU make on AIX, sn> but does not work, i.e. does not substitute X with TMP_ADD_X. Correct. This syntax is not supported by GNU make. sn> I feel, if there is no "?:" operator, it should give a syntax sn> error. Why would it give a syntax error, when that's not a syntax error? -----> You mentione in your previous answer that "?:" is not supported syntax, shouldn't it give any kind of error if its used in the makefile. sn> Do you have any shorter alternative in GNU make other than sn> "ifdef". Since you didn't specify exactly what behavior "?:" provides I can't say for sure, but look up the ?= assignment operator in the GNU make manual. -----> X = $(EX_X?:ADD_X)) if EX_X is NOT defined, X = ADD_X else X contains an empty value. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-make