makefile - Why doesn't GNU make output the execution of my command? -
i have gnu makefile target (simplified) looks this:
determineversion: $(eval gitdescribe := $(shell git describe --dirty)) anothertarget: determineversion do-something $(gitdescribe) when run make anothertarget, works expected (i value of git describe passed do-something expected). however, see no output git describe command. assume because capturing output := operator? how can echo output part of expression?
update 2015-07-13: fixed code. sorry, missed out dependency anothertarget, crucial understanding question.
if reformulate makefile such:
gitdescribe := $(shell git --describe) determineversion: [tab]@echo "gitdescribe: '${gitdescribe}'" anothertarget: [tab]do-something ${gitdescribe} you'll successful. alternatively,
determineversion: [tab]$(eval gitdescribe := $(shell git --describe)) anothertarget: determineversion [tab]do-something ${gitdescribe} might magic you're looking for.
Comments
Post a Comment