4 ms·
print-%: ; @echo $*=$($*) .PHONY: print-% This way the rule continues to work even if such a file suddenly exists in your repo.
by falcolas 12y ago
print-%: ; @echo $*=$($*)
.PHONY: print-%
This way the rule continues to work even if such a file suddenly exists in your repo.
- raimue 12y agoNo, implicit rules cannot be marked as .PHONY this way. You need to declare an explicit pseudo-target to achieve this. .PHONY: FORCE FORCE: print-%: FORCE ; @echo $*=$($*)
- mannykannot 12y agoI touch make files rarely enough that whenever I do, I have to re-learn most of what I need to know - and when I see phrases like 'explicit pseudo-target', I ask myself if it really has to be this way (but never have the time to answer myself.)