When writing a well crafted Makefile, one that keeps proper dependencies, and do only the minimum needed if a file has been changed, it seem that the install:
target is often overlooked. More often then not the install target looks something like:
TRG := /trg
BIN_TRG := $(TRG)/bin
ETC_TRG := $(TRG)/etc
BIN_FILES := b1 b2 b3
ETC_FILES := e1 e2 e3
install:
install $(BIN_FILES) $(BIN_TRG)
install $(ETC_FILES) $(ETC_TRG)
.PHONY: install
That is, a phony target with no dependency checking what so ever.
This kind of problem become more serious if instead of simple install there is a need to populate a staging area to prepare a binary package such as RPM packages, or if the next stage of build depends on that staging area. In this case the hole dependency tree break down after that install stage.
The question is: What is the best approach to have install rule that keeps track of dependencies?