diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-26 04:00:18 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-26 04:00:18 +0300 |
commit | 80f09cf5c14017f98c2e2eaea49ad5d2f5a1399f (patch) | |
tree | 7a249d8140addd38ef17de655e427e6892674a8f /scripts | |
parent | 77cd3d0c43b7e6c0bb49ca641cf936891f6e1766 (diff) | |
parent | cda2c65f981d0c29805fd01ffce441c650ffe6cf (diff) | |
download | linux-80f09cf5c14017f98c2e2eaea49ad5d2f5a1399f.tar.xz |
Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 build updates from Ingo Molnar:
"A build system fix and a cleanup"
* 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
kbuild: Remove stale asm-generic wrappers
kbuild, x86: Track generated headers with generated-y
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.asm-generic | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/scripts/Makefile.asm-generic b/scripts/Makefile.asm-generic index 045e0098e962..e4d017d53819 100644 --- a/scripts/Makefile.asm-generic +++ b/scripts/Makefile.asm-generic @@ -13,11 +13,26 @@ include scripts/Kbuild.include # Create output directory if not already present _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) +# Stale wrappers when the corresponding files are removed from generic-y +# need removing. +generated-y := $(generic-y) $(genhdr-y) $(generated-y) +all-files := $(patsubst %, $(obj)/%, $(generated-y)) +old-headers := $(wildcard $(obj)/*.h) +unwanted := $(filter-out $(all-files),$(old-headers)) + quiet_cmd_wrap = WRAP $@ cmd_wrap = echo "\#include <asm-generic/$*.h>" >$@ -all: $(patsubst %, $(obj)/%, $(generic-y)) +quiet_cmd_remove = REMOVE $(unwanted) +cmd_remove = rm -f $(unwanted) + +all: $(patsubst %, $(obj)/%, $(generic-y)) FORCE + $(if $(unwanted),$(call cmd,remove),) @: $(obj)/%.h: $(call cmd,wrap) + +PHONY += FORCE +.PHONY: $(PHONY) +FORCE: ; |