GNU Make 3.79
Lets say I have a Makefile like this
FOO:=<some_dir>
all: target_1 target_2
target_1:
cd ${FOO}
ls
targe_2:
cd ${FOO}
ls
Now I want to ensure that for FOO is set to different directory for
target_1 and target_2
so I added following to this Makefile
ifeq(${MAKECMDGOALS}, target_1)
FOO = dir_1
endif
ifeq (${MAKECMDGOALS}, target_2)
FOO = dir_2
endif
but if I execute gmake all then I want FOO to be changed to dir_1
while it is making target_1 and dir_2 while it is making target_2
That doesnt happen with above code.
Ideas?
--
Aditya Kher
http://kher.org
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make