I am trying to get some dependent install targets to work in my Makefile as follows:
.PHONY: install-everything install-part1 install-part2
install-everything: install-part1 install-part2
install-part1:
$(call part1-function)
install-part2:
$(call part2-function)
This is very similar to that described in the GNU Make manual here: https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
I did
make install-part1
first, then manually (i.e. rm -rf) removed the $(DESTDIR) directory that got created.
Now, every time I try to run any of the targets listed above, I get e.g:
make: nothing to be done for 'install-everything'.
I get the same answer if I try to force make with the '-B' flag. If I add debug info (make --debug) I get
File 'install-everything' does not exist.
Must remake target 'install-everything'.
I thought that using the .PHONY directive would fix this problem - can anyone help?
$(call partX-function)
expand to nothing. If it is the case, all recipes are empty and the message you get is correct: there is nothing to be done. Please show an example of yourpartX-function
macros. – Renaud Pacalet