Reputation: 116958
How do you define dynamic variables in a makefile target? For example:
all:
VAR := $@
@echo $(VAR)
Upvotes: 7
Views: 3861
Reputation: 116958
I realize this is the correct way:
all: VAR = $@
all:
@echo $(VAR)
Upvotes: 11