# Subdirectories to build
SUBDIRS = \
radio \
video \
# RULES
.PHONY : $(SUBDIRS) $(MAKEFILE_LIST)
all : $(SUBDIRS) $(MAKEFILE_LIST)
$(SUBDIRS) :
@echo "Building [email protected]"
$(A)$(MAKE) -C [email protected]
请教一下
all 虽然没有宣告成phony,但这种非真实档案的target,是不是还是可以算是phony,
前提是没有档案叫做all的话?
因为在看GNU make 的手册:
"When one phony target is a prerequisite of another, it serves as a subroutine
of the other."
然后再根据多目标规则,可以等效成:
radio :
@echo "Building [email protected]"
$(A)$(MAKE) -C [email protected]
video :
@echo "Building [email protected]"
$(A)$(MAKE) -C [email protected]
请问这样的理解正确吗?
谢谢