%% Jason Lunz <lunz falooley.org> writes:
jl> Is this expected behavior?
jl> $ cat Makefile
jl> ifeq ($(A),x)
jl> A:=y
jl> $(info A set to $(A))
jl> endif
jl> .PHONY: default
jl> default:
jl> echo A is $(A)
jl> $ make
jl> A is
jl> $ make A=a
jl> A is a
jl> $ make A=x
jl> A set to x
jl> A is x
Yes.
jl> I would expect A to be set to "y"
whenever its previous value is "x",
jl> but that doesn't happen.
Variable settings on the command line override any value set
"normally"
in the makefile.
See the GNU make manual, section "Overriding
Variables".
--
------------------------------------------------------------
-------------------
Paul D. Smith <psmith gnu.org> Find
some GNU make tips at:
http://www.gnu.org
http://make.paulandlesl
ey.org
"Please remain calm...I may be mad, but I am a
professional." --Mad Scientist
_______________________________________________
Help-make mailing list
Help-make gnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
|