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
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to