help-make
[Top][All Lists]
Advanced

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

MAKEFILE_LIST doesn't work on Linux 9, need help!!!!


From: Wei Qian
Subject: MAKEFILE_LIST doesn't work on Linux 9, need help!!!!
Date: Tue, 01 Nov 2005 03:41:52 +0800

I used MAKEFILE_LIST variable in the Makefile, executed on Linux 9. But it seems it is always empty.

For instance, in the following simple makefile, it always echoes nothing. I should be at least current Makefile.

all:
       @echo $(MAKEFILE_LIST)

I also tried the following example from gnu website, it always complain "the first argument to 'word' function must be greater than 0." The cause is still empty MAKEFILE_LIST.

Can somebody advice me on this?

Thanks!



name1 := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))

include inc.mk

name2 := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))

all:
       @echo name1 = $(name1)
       @echo name2 = $(name2)




then you would expect to see this output:

name1 = Makefile
name2 = inc.mk






reply via email to

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