Can I expand macro JUST ONE TIME in specific target?
- by naive231
A = "demo"
%.o:%.cpp
$(CC) -c $^ $(A) -o $@
default:$(all_objs)
game:A = $(shell read -p 'Enter game version: ' gv && echo $$gv)
game:$(all_objs)
Just a snippet makefile above. If I make game, main problem is each compilation of sources will expand $(A) and it will request user to input game version over and over. $(A) has default…