patch for include/Makefile.am

Patrick Tullmann tullmann at cs.utah.edu
Mon Apr 1 16:47:33 PST 2002


The attached patch causes the Make to abort if kaffeh has a problem.
Currently an error return from kaffeh is ignored.  (I was getting
errors because my Klasses.jar was badly corrupted.)

I "fixed" the problem by including a 'set -e' in the complex shell
sequence that invokes kaffeh.  -e should cause the shell to bail on an
unchecked error.  I'm not sure if this is portable, or if there is an
alternative automake/autoconf/libtool approved way of getting this
behavior.

If someone applies this patch, don't forget to regen Makefile.in, too.

-Pat

----- ----- ---- ---  ---  --   -    -      -         -               -
Pat Tullmann                                       tullmann at cs.utah.edu
  If Gates got a dime each time Windows crashed... Oh, nevermind...

Index: Makefile.am
===================================================================
RCS file: /cvs/kaffe/kaffe/include/Makefile.am,v
retrieving revision 1.25
diff -u -b -r1.25 Makefile.am
--- Makefile.am 19 Aug 2001 20:32:47 -0000      1.25
+++ Makefile.am 2 Apr 2002 00:38:16 -0000
@@ -126,7 +126,7 @@
 stamp-h0all: stamp-kaffeh $(KLASSES_JAR)
 ## Then, generate each header file,
 ## but if it does not change, do not touch it
-       @for f in $(DERIVED_HDRS); do \
+       @set -e; for f in $(DERIVED_HDRS); do \
          class=`echo $$f | sed -e 's%.*/%%g' -e 's%\.h$$%%' -e 's%_%/%g'`; \
          echo "$(KAFFEH) -classpath $(KLASSES_JAR) -o $$f $$class"; \
          $(KAFFEH) -classpath $(KLASSES_JAR) -o stamp-h0$$f $$class; \
@@ -148,7 +148,7 @@
 stamp-h1all: stamp-kaffeh $(KLASSES_JAR)
 ## Then, generate each header file,
 ## but if it does not change, do not touch it
-       @for f in $(JNI_DERIVED_HDRS); do \
+       @set -e; for f in $(JNI_DERIVED_HDRS); do \
          class=`echo $$f | sed -e 's%.*/%%g' -e 's%\.h$$%%' -e 's%_%/%g'`; \
          echo "$(KAFFEH) -jni -classpath $(KLASSES_JAR) -o $$f $$class"; \
          $(KAFFEH) -jni -classpath $(KLASSES_JAR) -o stamp-h1$$f $$class; \


More information about the kaffe mailing list