patch for include/Makefile.am

Jim Pick kaffe@rufus.w3.org
Wed, 3 Apr 2002 08:28:54 -0800


Yeah, that's obviously bad.  I committed the fix.

The makefiles go a bit overboard in generating headers - I'm pretty sure the
PocketLinux version doesn't do that.  When we get the stable release out,
I'm going to take a fresh look at the whole build system.

Cheers,

 - Jim

----- Original Message -----
From: "Patrick Tullmann" <tullmann@cs.utah.edu>
To: "Kaffe" <kaffe@rufus.w3.org>
Sent: Monday, April 01, 2002 4:47 PM
Subject: patch for include/Makefile.am


>
> 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@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;
\
>