Review Request: 6911737: Module build: generate modules with native libraries and any other files
Mandy.Chung at Sun.COM
Fri Dec 18 21:06:47 UTC 2009
A updated webrev against the the changeset I just pushed to the tl repo
and also include some minor fixes:
Mandy Chung wrote:
> This is the next step toward modularizing the jdk:
> 6911737: Module build: generate modules with native libraries and
> any other files
> Webrev at:
> For classes and other resource files in jar files, we use simple
> patterns to match what classes/resources in which module (most cases
> can simply use the package name as the pattern). The module
> definitions are defined in make/modules/modules.config.
> For native libraries and any other files, pattern matching approach
> won't work well and keeping the mapping of native libs and other files
> to which module is hard to maintain and also error-prone. Instead, I
> add a new MODULE variable and modify install-file macro in Defs.gmk so
> that for any file is installed in the build image, the file will be
> installed in its corresponding module in the module image. I also
> add a few new macros in Defs.gmk such as install-non-module-file,
> chmod-file, etc to handle different cases.
> This change modifies > 120 makefiles and most of them are added one
> line to define its module. The main change is in Defs.gmk.
> > cd make/modules; gnumake all
> This command will generate one directory per module,
> $OUTPUTDIR/modules/<module>. It will consist of the jar file
> containing its classes and resource files as well as any native
> libraries, binaries, executables, etc.
> For example, the base module is under $OUTPUTDIR/modules/base
> > find base -print
> > find nio -print
> The base module itself can be used to run applications that don't
> depend on other modules.
> > base/bin/java helloworld
> To add the nio module on the top of the base module, you can do:
> > cp -rf base myJRE
> > cp -rf nio/* myJRE
More information about the build-dev