From 120e2a97268c312bf81ee3d8cacc75d1f75ef8b5 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Tue, 12 Sep 2006 20:36:00 -0700 Subject: [PATCH] headers_check: improve #include regexp The following combinations of pp-tokens are used #include #include # include so, script'd better check for all of them. Signed-off-by: Alexey Dobriyan Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/hdrcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/hdrcheck.sh b/scripts/hdrcheck.sh index b3bb683b56b6..cbf650dbc7d7 100755 --- a/scripts/hdrcheck.sh +++ b/scripts/hdrcheck.sh @@ -1,6 +1,6 @@ #!/bin/sh -for FILE in `grep '^#include <' $2 | cut -f2 -d\< | cut -f1 -d\> | egrep ^linux\|^asm` ; do +for FILE in `grep '^[ \t]*#[ \t]*include[ \t]*<' $2 | cut -f2 -d\< | cut -f1 -d\> | egrep ^linux\|^asm` ; do if [ ! -r $1/$FILE ]; then echo $2 requires $FILE, which does not exist exit 1 -- cgit v1.2.2 From d5e064a6c733d3902302dbaca33dd3c76af77f38 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Tue, 12 Sep 2006 20:36:01 -0700 Subject: [PATCH] headers_check: clarify error message Signed-off-by: Alexey Dobriyan Cc: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/hdrcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/hdrcheck.sh b/scripts/hdrcheck.sh index cbf650dbc7d7..b5ca35aa1741 100755 --- a/scripts/hdrcheck.sh +++ b/scripts/hdrcheck.sh @@ -2,7 +2,7 @@ for FILE in `grep '^[ \t]*#[ \t]*include[ \t]*<' $2 | cut -f2 -d\< | cut -f1 -d\> | egrep ^linux\|^asm` ; do if [ ! -r $1/$FILE ]; then - echo $2 requires $FILE, which does not exist + echo $2 requires $FILE, which does not exist in exported headers exit 1 fi done -- cgit v1.2.2 From 8f5cbd7e4810df382029ecaaa98535452da5d15e Mon Sep 17 00:00:00 2001 From: Ross Biro Date: Sat, 16 Sep 2006 12:15:39 -0700 Subject: [PATCH] Add a missing space that prevents building modules that require host programs Signed-off-by: Ross Biro Acked-by: Sam Ravnborg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/Makefile.host | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 18ecd4d5df7f..060f4c563a5c 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -30,7 +30,7 @@ # libkconfig.so as the executable conf. # Note: Shared libraries consisting of C++ files are not supported -__hostprogs := $(sort $(hostprogs-y)$(hostprogs-m)) +__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) # hostprogs-y := tools/build may have been specified. Retreive directory host-objdirs := $(foreach f,$(__hostprogs), $(if $(dir $(f)),$(dir $(f)))) -- cgit v1.2.2 From b512217736049cef3e681bbd3ff6696c1cca567d Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 16 Sep 2006 12:15:45 -0700 Subject: [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(-) (limited to 'scripts') diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst index aa9990a3ccd6..12e1daf875c8 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 -- cgit v1.2.2