Из , относительно VPATH:Make продолжает строить неправильную цель VPATH
После обработки предпосылки, цель может быть или не нужно быть перестроена:
a. If the target does _not_ need to be rebuilt, the path to the file found during directory search is used for any prerequisite lists which contain this target. In short, if 'make' doesn't need to rebuild the target then you use the path found via directory search. b. If the target _does_ need to be rebuilt (is out-of-date), the pathname found during directory search is _thrown away_, and the target is rebuilt using the file name specified in the makefile. In short, if 'make' must rebuild, then the target is rebuilt locally, not in the directory found via directory search.
Приведенное выше, со следующим Makefile - что в основном такая же ситуация, как раздел b.
выше - где VPATH-роскопию цель оказывается аутов быть неприменяющийся, мы пишем Makefile, как:
$(shell rm -rf all D)
$(shell mkdir D)
$(shell touch D/all)
VPATH = D
all: phony
echo '[email protected]'
.SILENT: D/all
.PHONY: phony
Running , я получаю:
echo 'D/all'
D/all
Теперь, учитывая, что выше цитаты, что:
«если цель делает потребности быть восстановлена (это устарелый), путь найден во время поиска каталога является выброшена и цель перестроен, используя имя файла, указанное в Makefile»
Почему же тогда сделать строить D/all
, как видно на выходе команды, а не оригинальный (до того, как был VPATH-роскопию) цель?
Почему вы используете make? Конечно, суммирование, подобное градиенту или SCONS, было бы лучше –