Skip to contentSkip to conversation

kbuild: Allow header_install to work with O=

PATCH New Ben Collins 1 participant 1 message Oct 10, 2006 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kbuild: Allow header_install to work with O=

Without this patch, doing:

make O=/foo/build INSTALL_HDR_PATH=/foo/install-headers headers_install

Doesn't work.

---
 Makefile                     |    2 +-
 scripts/Makefile.headersinst |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Makefile +1 -1
index 274b780..f9e3f61 100644
@@ -932,7 +932,7 @@ headers_install_all: include/linux/versi
 
 PHONY += headers_install
 headers_install: include/linux/version.h scripts_basic FORCE
-	@if [ ! -r include/asm-$(ARCH)/Kbuild ]; then \
+	@if [ ! -r $(srctree)/include/asm-$(ARCH)/Kbuild ]; then \
 	  echo '*** Error: Headers not exportable for this architecture ($(ARCH))'; \
 	  exit 1 ; fi
 	$(Q)$(MAKE) $(build)=scripts scripts/unifdef
scripts/Makefile.headersinst +1 -1
index 6a026f6..f1c3057 100644
@@ -168,7 +168,7 @@ ifdef GENASM
 	$(call cmd,gen)
 
 else
-$(objhdr-y) :		$(INSTALL_HDR_PATH)/$(_dst)/%.h: $(srctree)/$(obj)/%.h $(KBUILDFILES)
+$(objhdr-y) :		$(INSTALL_HDR_PATH)/$(_dst)/%.h: $(obj)/%.h $(KBUILDFILES)
 	$(call cmd,o_hdr_install)
 
 $(header-y) :		$(INSTALL_HDR_PATH)/$(_dst)/%.h: $(srctree)/$(obj)/%.h $(KBUILDFILES)