Review request: Install module content into zip files
Mandy Chung
mandy.chung at oracle.com
Fri May 28 14:08:59 PDT 2010
Mark Reinhold wrote:
>> Date: Mon, 24 May 2010 14:26:45 -0700
>> From: mandy.chung at oracle.com
>>
>
>
>> Mark Reinhold wrote:
>>
>> http://cr.openjdk.java.net/~mr/jigsaw/rev/zip-module-content/
>>
>> Looks good.
>>
>
> Thanks.
>
> I finally nailed down one last (I hope) build failure. The import logic
> in jdk/make/common/internal/ImportComponents.gmk needs to be updated to
> extract classes from jar files rather than than classes directories.
> Does the following look right to you? It works fine on Linux; I haven't
> yet tried it on other platforms but will do so later today.
>
>
>
I missed the impacted build change in my review :( Sorry
about that.
I recently added make/modules/update_module.sh that also
hardcodes the module library format. I can update it
when this changeset is pushed to the jigsaw repo.
>
> @@ -168,28 +168,16 @@
> define import-from-modules-image
> if [ "$3" != "" ] ; then \
> for m in $2 dummy ; do \
> - mdir=$(JDK_MODULES_LIB)/$$m/$(VERSION); \
> - for p in $3 dummy ; do \
> - if [ -d $$mdir/classes/$$p ] ; then \
> - $(ECHO) "Importing $$p classes from $$m module" ; \
> - $(MKDIR) -p $1/$$p; \
> - $(CP) -r $$mdir/classes/$$p/* $1/$$p ; \
> - elif [ -d $$mdir/resources/$$p ] ; then \
> - $(ECHO) "Importing $$p resources from $$m module" ; \
> - $(MKDIR) -p $1/$$p; \
> - $(CP) -r $$mdir/resources/$$p/* $1/$$p ; \
> - elif [ -f $$mdir/classes/$$p ] ; then \
> - $(ECHO) "Importing $$p classes from $$m module" ; \
> - pdir=`$(DIRNAME) $$p`; \
> - $(MKDIR) -p $1/$$pdir; \
> - $(CP) $$mdir/classes/$$p $1/$$pdir ; \
> - elif [ -f $$mdir/resources/$$p ] ; then \
> - $(ECHO) "Importing $$p resources from $$m module" ; \
> - pdir=`$(DIRNAME) $$p`; \
> - $(MKDIR) -p $1/$$pdir; \
> - $(CP) $$mdir/resources/$$p $1/$$pdir ; \
> - fi ; \
> - done ; \
> + mdir=$(JDK_MODULES_LIB)/$$m/$(VERSION) ; \
> + if [ -f $$mdir/classes ] ; then \
> + $(BOOT_JAR_CMD) tf $$mdir/classes >$(TEMPDIR)/$$m.ls ; \
> + for p in $3 dummy ; do \
> + if $(GREP) $$p $(TEMPDIR)/$$m.ls >/dev/null; then \
> + $(ECHO) "Importing $$p from module $$m" ; \
> + (cd $1; $(BOOT_JAR_CMD) xvf $$mdir/classes $$p) ; \
> + fi ; \
> + done ; \
> + fi; \
> done ; \
> fi
> endef
>
I think Unjar should do the work. Something like this:
$(call Unjar,$1,$$mdir/classes,$3);
Mandy
More information about the jigsaw-dev
mailing list