From b512217736049cef3e681bbd3ff6696c1cca567d Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 16 Sep 2006 12:15:45 -0700 Subject: [PATCH] [PATCH] Fix 'make headers_check' on biarch architectures We generate an which includes either or as appropriate. But we were doing this dependent on whether the file in question existed in the _unexported_ tree, not the exported tree. So if a file was exported to userspace in one asm- directory but not the other, the generated file in asm/ was incorrect. This only changed the failure mode if it _was_ included from a nice #error to a less explicable #include failure -- but it also gave false errors in 'make headers_check' output. Fix it by looking in the right place instead. Signed-off-by: David Woodhouse Cc: Sam Ravnborg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/Makefile.headersinst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index aa9990a3ccd..12e1daf875c 100644 --- a/scripts/Makefile.headersinst +++ b/scripts/Makefile.headersinst @@ -93,14 +93,14 @@ STUBDEF=__ASM_STUB_`echo $@ | tr a-z. A-Z_`; \ echo "\#ifndef $$STUBDEF" ; \ echo "\#define $$STUBDEF" ; \ echo "\# if $(ARCHDEF)" ; \ -if [ -r $(srctree)/include/$(archasm)/$@ ]; then \ +if [ -r $(INSTALL_HDR_PATH)/include/$(archasm)/$@ ]; then \ echo "\# include <$(archasm)/$@>" ; \ else \ echo "\# error $(archasm)/$@ does not exist in" \ "the $(ARCH) architecture" ; \ fi ; \ echo "\# elif $(ALTARCHDEF)" ; \ -if [ -r $(srctree)/include/$(altarchasm)/$@ ]; then \ +if [ -r $(INSTALL_HDR_PATH)/include/$(altarchasm)/$@ ]; then \ echo "\# include <$(altarchasm)/$@>" ; \ else \ echo "\# error $(altarchasm)/$@ does not exist in" \ @@ -149,7 +149,9 @@ endif hdrinst := -rR -f $(srctree)/scripts/Makefile.headersinst obj .PHONY: altarch-dir -altarch-dir: +# All the files in the normal arch dir must be created first, since we test +# for their existence. +altarch-dir: $(subdir-y) $(header-y) $(unifdef-y) $(objhdr-y) $(Q)$(MAKE) $(hdrinst)=include/asm-$(ALTARCH) dst=include/asm-$(ALTARCH) $(Q)$(MAKE) $(hdrinst)=include/asm dst=include/asm -- 2.32.0.93.g670b81a890