kbuild: specify FORCE in Makefile.headersinst as .PHONY target

Swap the order of ".PHONY: $(PHONY)" and "PHONY += FORCE"
so that FORCE is correctly specified as a .PHONY target.

Use a preferred way for specifying $(subdirs) as .PHONY targets.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
Masahiro Yamada 2017-11-13 19:33:19 +09:00
parent 4173cbac80
commit e474ed4577
1 changed files with 3 additions and 2 deletions

View File

@ -26,7 +26,7 @@ subdirs := $(patsubst $(srcdir)/%/,%,\
# Recursion
__headers: $(subdirs)
.PHONY: $(subdirs)
PHONY += $(subdirs)
$(subdirs):
$(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(dst)/$@
@ -123,6 +123,7 @@ endif
endif # skip-inst
.PHONY: $(PHONY)
PHONY += FORCE
FORCE: ;
.PHONY: $(PHONY)