ubuntu
GCC
# 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]
請問這樣的理解正確嗎?
謝謝