I have the following Makefile:
all: print1 print2
world=world1
print1:
@echo $(world)
world=world2
print2:
@echo $(world)
.PHONY: all print1 print2
When running with make
I expected to get:
world1
world2
But I got:
world2
world2
Is it possible to get the expected output only with the variable world
?