makefile phony target 問題 - Linux
By Valerie
at 2021-01-25T18:06
at 2021-01-25T18:06
Table of Contents
# Subdirectories to build
SUBDIRS = \
radio \
video \
# RULES
.PHONY : $(SUBDIRS) $(MAKEFILE_LIST)
all : $(SUBDIRS) $(MAKEFILE_LIST)
$(SUBDIRS) :
@echo "Building $@"
$(A)$(MAKE) -C $@
請教一下
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 $@"
$(A)$(MAKE) -C $@
video :
@echo "Building $@"
$(A)$(MAKE) -C $@
請問這樣的理解正確嗎?
謝謝
--
SUBDIRS = \
radio \
video \
# RULES
.PHONY : $(SUBDIRS) $(MAKEFILE_LIST)
all : $(SUBDIRS) $(MAKEFILE_LIST)
$(SUBDIRS) :
@echo "Building $@"
$(A)$(MAKE) -C $@
請教一下
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 $@"
$(A)$(MAKE) -C $@
video :
@echo "Building $@"
$(A)$(MAKE) -C $@
請問這樣的理解正確嗎?
謝謝
--
Tags:
Linux
All Comments
By Quintina
at 2021-01-27T22:59
at 2021-01-27T22:59
By Callum
at 2021-01-30T13:58
at 2021-01-30T13:58
By Anonymous
at 2021-02-03T04:47
at 2021-02-03T04:47
Related Posts
RHEL 8.2 pacemaker
By Rachel
at 2021-01-20T23:27
at 2021-01-20T23:27
20年前red hat linux書是否還有用處?
By Donna
at 2021-01-17T15:56
at 2021-01-17T15:56
Linux opensource LICENSE 問題
By Doris
at 2021-01-16T20:27
at 2021-01-16T20:27
Linux opensource LICENSE 問題
By Xanthe
at 2021-01-16T11:39
at 2021-01-16T11:39
Linux opensource LICENSE 問題
By Enid
at 2021-01-16T10:22
at 2021-01-16T10:22