help-make
[Top][All Lists]
Advanced

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

Re: define variable in rule


From: Jason Pearce
Subject: Re: define variable in rule
Date: Wed, 08 Jun 2005 17:09:47 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

I think you will find your answer here:
http://www.gnu.org/software/make/manual/html_chapter/make_6.html#SEC67

address@hidden wrote:

Hi

Can the variable be defined in rule ? Like this:

1 target :  $(OBJ_FILE)
2       TMP_LIB := $(shell cat $(OBJ_FILES))
3       $(LD) $(OPT_LD_STD) $(LDFLAGS) -o $@   $(TMP_LIB)
$(EXTERNAL_LIBS) $(SYSTEM_LIBS)
The OBJ_FILE is a text file with .o file list, and I want to translate
it to .o list used as the argument of link, so the variable TMP_LIB is
defined.
But when do Make, syntax error found in line 3. So I doubt the variable
can not be defined within a fule.

Who can help me on this? Thanks.

Frank



_______________________________________________
Help-make mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-make






reply via email to

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