From 9d022c540606a5a8ae5d1cc02fc12de362ba4585 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 4 Oct 2017 12:56:04 +0900 Subject: kbuild: replace $(hdr-arch) with $(SRCARCH) Since commit 5e53879008b9 ("sparc,sparc64: unify Makefile"), hdr-arch and SRCARCH always match. Signed-off-by: Masahiro Yamada Reviewed-by: Douglas Anderson --- scripts/Makefile.headersinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/Makefile.headersinst') diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index 343d586e566e..5692d7a66163 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst @@ -30,7 +30,7 @@ __headers: $(subdirs) $(subdirs): $(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(dst)/$@ -# Skip header install/check for include/uapi and arch/$(hdr-arch)/include/uapi. +# Skip header install/check for include/uapi and arch/$(SRCARCH)/include/uapi. # We have only sub-directories there. skip-inst := $(if $(filter %/uapi,$(obj)),1) -- cgit v1.2.3 From 2982c953570b2bced858613d70443c2c6a90587b Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 13 Nov 2017 19:29:35 +0900 Subject: kbuild: remove redundant $(wildcard ...) for cmd_files calculation I do not see any reason why $(wildcard ...) needs to be called twice for computing cmd_files. Remove the first one. Signed-off-by: Masahiro Yamada --- Makefile | 3 +-- scripts/Makefile.build | 3 +-- scripts/Makefile.headersinst | 3 +-- scripts/Makefile.modpost | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) (limited to 'scripts/Makefile.headersinst') diff --git a/Makefile b/Makefile index a7476e6934f1..58dd24520c9e 100644 --- a/Makefile +++ b/Makefile @@ -1693,8 +1693,7 @@ cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR) \ # read all saved command lines -targets := $(wildcard $(sort $(targets))) -cmd_files := $(wildcard .*.cmd $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) +cmd_files := $(wildcard .*.cmd $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd)) ifneq ($(cmd_files),) $(cmd_files): ; # Do not try to update included dependency files diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 061d0c3a420a..62d5314c3b71 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -583,8 +583,7 @@ FORCE: # optimization, we don't need to read them if the target does not # exist, we will rebuild anyway in that case. -targets := $(wildcard $(sort $(targets))) -cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) +cmd_files := $(wildcard $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd)) ifneq ($(cmd_files),) include $(cmd_files) diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index 5692d7a66163..c6fb2b75d813 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst @@ -114,9 +114,8 @@ $(check-file): scripts/headers_check.pl $(output-files) FORCE endif -targets := $(wildcard $(sort $(targets))) cmd_files := $(wildcard \ - $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) + $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd)) ifneq ($(cmd_files),) include $(cmd_files) diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 16923ba4b5b1..cf125c11ca41 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -143,8 +143,7 @@ FORCE: # optimization, we don't need to read them if the target does not # exist, we will rebuild anyway in that case. -targets := $(wildcard $(sort $(targets))) -cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) +cmd_files := $(wildcard $(foreach f,$(sort $(targets)),$(dir $(f)).$(notdir $(f)).cmd)) ifneq ($(cmd_files),) include $(cmd_files) -- cgit v1.2.3 From e474ed45777bc230648186c0db990bd290383ada Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 13 Nov 2017 19:33:19 +0900 Subject: 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 --- scripts/Makefile.headersinst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts/Makefile.headersinst') diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index c6fb2b75d813..086a821ba8f5 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst @@ -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) -- cgit v1.2.3