Explorar o código

still use tmp.cmi to preserve exit codes

Simon Krajewski %!s(int64=13) %!d(string=hai) anos
pai
achega
29badfc9b0
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      Makefile.win

+ 3 - 2
Makefile.win

@@ -36,6 +36,7 @@ endif
 # this pipes OCaml stdout/stderr through sed
 
 ifeq (${OUTPUT_REWRITE},1)
-CC_CMD=$(OCAMLOPT) $(CFLAGS) -c $< 2>&1 | $(LINEMERGE_FILTER) | $(FILTER) 1>&2
-CC_PARSER_CMD=$(OCAMLOPT) -pp camlp4o $(CFLAGS) -c parser.ml 2>&1 | $(LINEMERGE_FILTER) | $(FILTER) 1>&2
+OUTPUT_PROCESS=2> tmp.cmi && $(LINEMERGE_FILTER) tmp.cmi | $(FILTER) 1>&2 || $(LINEMERGE_FILTER) tmp.cmi | $(FILTER) 1>&2 && exit 1
+CC_CMD=$(OCAMLOPT) $(CFLAGS) -c $< $(OUTPUT_PROCESS)
+CC_PARSER_CMD=$(OCAMLOPT) -pp camlp4o $(CFLAGS) -c parser.ml $(OUTPUT_PROCESS)
 endif