classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: Regenerate JNI headers automatically


From: Tom Tromey
Subject: Re: Patch: Regenerate JNI headers automatically
Date: 23 Jul 2003 11:23:59 -0600
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Tom" == Thomas Fitzsimmons <address@hidden> writes:

Tom> Currently the list consists of AWT-related headers.  Could someone who
Tom> is more familiar with the other areas of classpath that require JNI
Tom> headers complete the list?  Some headers should probably be removed.

This will get you a list:

find . -name '*.[ch]' -print | xargs egrep -h '#include.*_' | grep -v target_ | 
grep -v native_state | grep -v libart_lgpl | sort -u

So it seems anyway.

Tom> Mark Wielaard suggested that anyone checking in changes to these headers
Tom> should use gcjh, since it is free and produces clean output.  If people
Tom> agree with this, I will regenerate the AWT-headers and check them in.

I like this, but then I would.  One question is about gcjh version
dependency.  Older versions of gcjh don't print JNICALL and JNIEXPORT
stuff -- we want to make sure that everybody is using a new enough
version.

I don't think this is that big a deal, since the target is optional
and we're checking in the canonical headers.  It will only affect
people who need to rebuild the headers and don't want to be bothered
to find gcjh.  But if they just refrain from checking in their
modified versions they can use whatever tool they like...

Tom> +[case "${enableval}" in
Tom> +  yes) HEADER_DIR=include ;;
Tom> +  no) HEADER_DIR="" ;;
Tom> +  *) HEADER_DIR="" ;;
Tom> +esac],
Tom> +[HEADER_DIR=""])
Tom> +AC_SUBST(HEADER_DIR)

It is somewhat more idiomatic to use an AM_CONDITIONAL and then just
wrap the rules in include/ with `if condition...'.  One reason to do
this is that otherwise other built files in include won't be correctly
rebuilt by a simple "make" in the non-header-regenerate case.  (E.g.,
if you touch jni.h.in, it should rebuild automatically...)

Tom> +$(top_srcdir)/include/gnu_java_awt_image_GdkPixbufDecoder.h: 
$(top_srcdir)/gnu/java/awt/image/GdkPixbufDecoder.java
Tom> +  $(JAVAH) -o $@ $(shell basename $@ .h | tr '_' '.')

$(shell...) is a GNU make-ism.  Chances are that nobody will notice,
but it is more portable to write out the name here.

Tom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]