mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 22:51:37 +00:00
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
This commit is contained in:
commit
80f09cf5c1
3 changed files with 36 additions and 1 deletions
|
@ -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: ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue