gnu make - How can default env variable in gnu makefile target -
i want this
test.install: export build_number=${build_number:-$${another_var}} but not working. come blank
edit:
this works fine. provided export build_number in shell before invoking make command
test.install: export build_number=${build_number} these not working . both give blank build_number
test.install: export build_number=${build_number:-$${another_var}} and
test.install: export build_number=${build_number:-55}}
if want expand variables in bash rather in makefile, you'll need escape expansion otherwise make going variable literally called build_number:-${another_var} or build_number:-55
test.install: export build_number=$${build_number:-$${another_var}} test.install: export build_number=$${build_number:-55}}
Comments
Post a Comment