changeset 815:0c540b1505e3

8016520: jdk native build does not fail on compilation error on windows Reviewed-by: tbell
author erikj
date Fri, 14 Jun 2013 13:30:14 +0200
parents c961c8972485
children 0d1e8518c722
files common/makefiles/NativeCompilation.gmk
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/common/makefiles/NativeCompilation.gmk	Thu Jun 13 14:04:32 2013 +0200
+++ b/common/makefiles/NativeCompilation.gmk	Fri Jun 14 13:30:14 2013 +0200
@@ -108,7 +108,11 @@
         # setting -showIncludes, all included files are printed. These are filtered out and 
         # parsed into make dependences.
         ifeq ($(COMPILER_TYPE),CL)
-		$$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2 | $(TEE) $$($1_$2_DEP).raw | $(GREP) -v "^Note: including file:"
+		($$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) \
+			$(CC_OUT_OPTION)$$($1_$2_OBJ) $2 ; echo $$$$? > $$($1_$2_DEP).exitvalue) \
+			| $(TEE) $$($1_$2_DEP).raw | $(GREP) -v "^Note: including file:" \
+			&& exit `cat $$($1_$2_DEP).exitvalue`
+		$(RM) $$($1_$2_DEP).exitvalue
 		($(ECHO) $$@: \\ \
 		 && $(SED) -e '/^Note: including file:/!d' \
 			-e 's|Note: including file: *||' \