[Top][All Lists]

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

Re: Patch: Regenerate JNI headers automatically

From: Thomas Fitzsimmons
Subject: Re: Patch: Regenerate JNI headers automatically
Date: 23 Jul 2003 16:32:23 -0400

On Wed, 2003-07-23 at 13:23, Tom Tromey wrote:
> >>>>> "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.

Ok, I added the targets that were missing.

> 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=""])
> 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, it should rebuild automatically...)

Good point.  I used the existing CREATE_JNI_HEADERS (which was otherwise

> Tom> +$(top_srcdir)/include/gnu_java_awt_image_GdkPixbufDecoder.h: 
> $(top_srcdir)/gnu/java/awt/image/
> 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.


Thanks for the comments.

New patch attached,

2003-07-23  Thomas Fitzsimmons  <address@hidden>

        * (SUBDIRS): Add include.
        * Add --enable-regen-headers flag.
        (AC_OUTPUT): Add include/Makefile.
        * include/ New file.

Attachment: regenheaders2.diff
Description: Text Data

reply via email to

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