On Sun, 2008-06-08 at 13:14 +0100, David Woodhouse wrote: > I have yet to actually remove $(BIARCH) and just override $(dst), > though. Done that now, although headers_check_all is still not fixed to cope with it... diff --git a/Makefile b/Makefile index eff8fee..1376c33 100644 --- a/Makefile +++ b/Makefile @@ -1012,9 +1012,9 @@ __headers: include/linux/version.h scripts_basic FORCE PHONY += headers_install_all headers_install_all: __headers + $(Q)$(MAKE) ARCH= SRCARCH= $(hdr-inst)=include $(Q)set -e; for arch in $(hdr-archs); do \ - $(MAKE) ARCH=$$arch SRCARCH=$$arch $(hdr-inst)=include \ - BIASMDIR=-bi-$$arch ;\ + $(MAKE) ARCH=$$arch SRCARCH=$$arch $(hdr-inst)=include/asm-$$arch; \ done PHONY += headers_install @@ -1029,7 +1029,7 @@ PHONY += headers_check_all headers_check_all: headers_install_all $(Q)set -e; for arch in $(hdr-archs); do \ $(MAKE) ARCH=$$arch SRCARCH=$$arch $(hdr-inst)=include \ - BIASMDIR=-bi-$$arch HDRCHECK=1 ;\ + HDRCHECK=1 ;\ done PHONY += headers_check diff --git a/include/Kbuild b/include/Kbuild index b522887..9393f7e 100644 --- a/include/Kbuild +++ b/include/Kbuild @@ -5,4 +5,6 @@ header-y += mtd/ header-y += rdma/ header-y += video/ +ifneq ($(ARCH),) header-y += asm-$(ARCH)/ +endif diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index 80df6f3..e96d18e 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst @@ -14,15 +14,6 @@ include $(kbuild-file) include scripts/Kbuild.include -# If this is include/asm-$(ARCH) then override $(_dst) so that -# we install to include/asm directly. -# Unless $(BIASMDIR) is set, in which case we're probably doing -# a 'headers_install_all' build and we should keep the -$(ARCH) -# in the directory name. -ifeq ($(obj),include/asm-$(ARCH)$(BIASMDIR)) - _dst := include/asm -endif - install := $(INSTALL_HDR_PATH)/$(_dst) header-y := $(sort $(header-y) $(unifdef-y)) @@ -88,8 +79,12 @@ endif # Recursion hdr-inst := -rR -f $(srctree)/scripts/Makefile.headersinst obj .PHONY: $(subdirs) + +# If the next directory is include/asm-$(ARCH) then override +# $(_dst) so that we install to include/asm directly. $(subdirs): - $(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(_dst)/$@ + $(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ \ + dst=$(patsubst include/asm-$(ARCH),include/asm,$(_dst)/$@) targets := $(wildcard $(sort $(targets))) cmd_files := $(wildcard \ -- dwmw2 -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html