kbuild: error out early in make headers_install
authorSam Ravnborg <sam@ravnborg.org>
Sun, 8 Jun 2008 10:28:22 +0000 (12:28 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Fri, 25 Jul 2008 20:08:41 +0000 (22:08 +0200)
Fix the a.out.h case by setting SRCARCH and error
out early in case of an error.
The a.out.h case failed with the *_all targets.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Makefile

index f95066176ddf9e1edebfd3eb2a919cb2677777b6..33e735c906550731cb89299c83174641a4375f23 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1026,8 +1026,9 @@ __headers: include/linux/version.h scripts_basic FORCE
 
 PHONY += headers_install_all
 headers_install_all: __headers
-       $(Q)for arch in $(hdr-archs); do \
-        $(MAKE) ARCH=$$arch $(hdr-inst)=include BIASMDIR=-bi-$$arch ;\
+       $(Q)set -e; for arch in $(hdr-archs); do \
+        $(MAKE) ARCH=$$arch SRCARCH=$$arch $(hdr-inst)=include \
+                BIASMDIR=-bi-$$arch ;\
         done
 
 PHONY += headers_install
@@ -1040,8 +1041,9 @@ headers_install: __headers
 
 PHONY += headers_check_all
 headers_check_all: headers_install_all
-       $(Q)for arch in $(hdr-archs); do \
-        $(MAKE) ARCH=$$arch $(hdr-inst)=include BIASMDIR=-bi-$$arch HDRCHECK=1 ;\
+       $(Q)set -e; for arch in $(hdr-archs); do \
+        $(MAKE) ARCH=$$arch SRCARCH=$$arch $(hdr-inst)=include \
+                BIASMDIR=-bi-$$arch HDRCHECK=1 ;\
         done
 
 PHONY += headers_check