Make target for compiling java classes only?

Kelly O'Hair Kelly.Ohair at Sun.COM
Thu Jan 10 17:42:33 UTC 2008


At one point I was experimenting with an option that would import all the
native libraries (.dll or .so files) from the JDK_IMPORT_PATH area rather
than run the native compiler. The idea was to allow for building the jdk
without having a native compiler. For various reasons I gave up on this.

I originally hoped it would be a build time performance trick a developer
who didn't change native code could use, but the build time benefits on
Linux and Solaris were not that great, and windows has it's own build
complications that didn't allow it to work very well (the separation of the
.lib and .dll files to name one, the Unix .so files serve as both).

Look at the uses of IMPORT_NATIVE_BINARIES in the jdk7/jdk/make files.
The idea was to:
    make IMPORT_NATIVE_BINARIES=true ALT_JDK_IMPORT_PATH=/.../builtjdk7
I doubt that it works anymore, but it might be helpful.

-kto

Max (Weijun) Wang wrote:
> How about providing your own compiler tools (gcc, link, lib) which 
> simply copies the -o target from an existing JDK build?
> 
> Max
> 
> On Jan 10, 2008, at 8:27 PM, Alan Bateman wrote:
> 
>> Roman Kennke wrote:
>>> Hi there,
>>>
>>> I'm looking for a make target, that compiles only the Java classes of
>>> OpenJDK. Is there a way to do that? Thanks,
>>>
>>> /Roman
>>>
>>>
>> I don't think there is one. There are a number of areas where the 
>> source files are generated during the build (nio and jdwp for example) 
>> so compiling just the java classes in the repository wouldn't be 
>> enough (and will probably fail due to missing dependencies). Kelly may 
>> have suggestions but I suspect you'll need to hack the make files to 
>> skip compiling the shared libaries, launchers, etc.
>>
>> -Alan.
> 



More information about the build-dev mailing list