I'm trying to write a Makefile where prerequisites using target specific variables
version=
target1: override version=1
target1: package
target2: override version=2
target2: package
package: dir=package-${version}
package: source
source: src/${version}.c
When i run make the version variable is in target package and source empty.
What I'm doing wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…