List Info

Thread: setting variables within ifeq section doesn't work?




setting variables within ifeq section doesn't work?
user name
2006-05-03 16:24:43
Is this expected behavior?

	$ make --version
	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 i386-pc-linux-gnu
	$ cat Makefile 
	ifeq ($(A),x)
	A:=y
	$(info A set to $(A))
	endif

	.PHONY: default
	default:
		echo A is $(A)
	$ make 
	A is
	$ make A=a
	A is a
	$ make A=x
	A set to x
	A is x

I would expect A to be set to "y" whenever its
previous value is "x",
but that doesn't happen.

Jason



_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )