[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
@echo name1 = $(name1) does not work
From: |
Morten Gulbrandsen |
Subject: |
@echo name1 = $(name1) does not work |
Date: |
Sat, 28 Jan 2006 21:50:53 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050927 Debian/1.7.8-1sarge3 |
uname -a
Linux debian 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i686 GNU/Linux
make -v
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
make
cc -c -o helloworld.o helloworld.c
cc -o helloworld helloworld.o
####### Unexpected result #####$
according to the manual
http://www.gnu.org/software/make/manual/html_chapter/make_3.html#SEC13
then you would expect to see this output:
name1 = Makefile
name2 = inc.mk
cat inc.mk
helloworld: helloworld.o
cc -o $@ $<
helloworld.o: helloworld.c
cc -c -o $@ $<
.PHONY: clean
clean:
-rm -f helloworld helloworld.o
cat Makefile
name1 := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
include inc.mk
name2 := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
all:
@echo name1 = $(name1)
@echo name2 = $(name2)
what can I do ?
Am I doing something wrong or is the manual
not up to date ?
best regards
Morten Gulbrandsen
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
- @echo name1 = $(name1) does not work,
Morten Gulbrandsen <=