Tried to get GNU make 3.81 Built-in Function to work but kept getting an error message.
I built a simple makefile:
FOO=bar
$(info $(FOO) $(origin FOO))
$(firstword $(origin FOO))
and ran it. The first function works but second will not.
Error message is:
...
$ make -d
GNU Make 3.81 Copyright (C) 2006 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.
This program built for i686-pc-linux-gnu
Reading makefiles...
Reading makefile `makefile'...
bar file
makefile:6: *** missing separator. Stop.
...
First two functions work correctly so why is this happening? Am I not seeing something obvious or is this $(firstword) function not supported in this version of make? Thanks for any help.
MY_LIST = a program for directed compilation $(info The first word is $(firstword $(MY_LIST)))
This solves part of my question that $(firstword ...) function does actually work. So the real question is "Why is the function $(origin ..) not outputting a compliant string?" – timohmake: *** No targets. Stop.
. It should however still print the$(info ...)
message though.... Could you try to add an empty target at the end, i.e. just add the lineall:
at the end? – jmon12