< prev index next >
make/CreateJmods.gmk
Print this page
rev 2048 : 8150044: Generate classlists at build-time
Reviewed-by: alanb
Contributed-by: claes.redestad@oracle.com, erik.joelsson@oracle.com
*** 1,6 ****
! #
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
--- 1,6 ----
!
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
*** 33,42 ****
--- 33,44 ----
$(error MODULE must be set when calling CreateJmods.gmk)
endif
################################################################################
+ JMODS_DIR := $(IMAGES_OUTPUTDIR)/jmods
+
LIBS_DIR := $(firstword $(wildcard $(addsuffix /$(MODULE), \
$(SUPPORT_OUTPUTDIR)/modules_libs-stripped $(IMPORT_MODULES_LIBS))))
CMDS_DIR := $(firstword $(wildcard $(addsuffix /$(MODULE), \
$(SUPPORT_OUTPUTDIR)/modules_cmds-stripped $(IMPORT_MODULES_CMDS))))
CONF_DIR := $(firstword $(wildcard $(addsuffix /$(MODULE), \
*** 65,104 ****
endif
# Add dependencies on other jmod files. Only java.base needs access to other
# jmods.
ifeq ($(MODULE), java.base)
! DEPS += $(patsubst %, $(IMAGES_OUTPUTDIR)/jmods/%.jmod, \
$(filter-out java.base, $(call FindAllModules)))
! # TODO: find modules that directly and indrectly on upgradeable modules
EXCLUDE_HASH_MODULES := $(UPGRADEABLE_MODULES) \
java.se.ee \
jdk.rmic \
jdk.xml.bind \
jdk.xml.ws \
#
EXCLUDE_PATTERN := $(strip $(subst $(SPACE),|,$(strip $(EXCLUDE_HASH_MODULES))))
! JMOD_FLAGS += --modulepath $(IMAGES_OUTPUTDIR)/jmods \
--hash-modules '^(?!$(EXCLUDE_PATTERN))'
endif
# TODO: What about headers?
# Create jmods in a temp dir and then move them into place to keep the
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
! $(IMAGES_OUTPUTDIR)/jmods/$(MODULE).jmod: $(DEPS)
! $(call LogWarn, Creating $(notdir $@))
$(call MakeDir, $(@D) $(SUPPORT_OUTPUTDIR)/jmods)
$(RM) $@ $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@)
$(JMOD) create \
--module-version $(VERSION_SHORT) \
--os-name $(REQUIRED_OS_NAME) \
--os-arch $(OPENJDK_TARGET_CPU_LEGACY) \
--os-version $(REQUIRED_OS_VERSION) \
! --modulepath $(IMAGES_OUTPUTDIR)/jmods\
--exclude '**{_the.*,*.diz,*.debuginfo,*.dSYM/**,*.pdb,*.map}' \
$(JMOD_FLAGS) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@)
$(MV) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) $@
TARGETS += $(IMAGES_OUTPUTDIR)/jmods/$(MODULE).jmod
--- 67,110 ----
endif
# Add dependencies on other jmod files. Only java.base needs access to other
# jmods.
ifeq ($(MODULE), java.base)
! # When creating a BUILDJDK, we don't need to add hashes to java.base
! ifneq ($(CREATING_BUILDJDK), true)
! DEPS += $(patsubst %, $(JMODS_DIR)/%.jmod, \
$(filter-out java.base, $(call FindAllModules)))
! # TODO: find modules that directly and indirectly depend on upgradeable
! # modules
EXCLUDE_HASH_MODULES := $(UPGRADEABLE_MODULES) \
java.se.ee \
jdk.rmic \
jdk.xml.bind \
jdk.xml.ws \
#
EXCLUDE_PATTERN := $(strip $(subst $(SPACE),|,$(strip $(EXCLUDE_HASH_MODULES))))
! JMOD_FLAGS += --modulepath $(JMODS_DIR) \
--hash-modules '^(?!$(EXCLUDE_PATTERN))'
+ endif
endif
# TODO: What about headers?
# Create jmods in a temp dir and then move them into place to keep the
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
! $(JMODS_DIR)/$(MODULE).jmod: $(DEPS)
! $(call LogWarn, Creating $(patsubst $(OUTPUT_ROOT)/%, %, $@))
$(call MakeDir, $(@D) $(SUPPORT_OUTPUTDIR)/jmods)
$(RM) $@ $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@)
$(JMOD) create \
--module-version $(VERSION_SHORT) \
--os-name $(REQUIRED_OS_NAME) \
--os-arch $(OPENJDK_TARGET_CPU_LEGACY) \
--os-version $(REQUIRED_OS_VERSION) \
! --modulepath $(JMODS_DIR) \
--exclude '**{_the.*,*.diz,*.debuginfo,*.dSYM/**,*.pdb,*.map}' \
$(JMOD_FLAGS) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@)
$(MV) $(SUPPORT_OUTPUTDIR)/jmods/$(notdir $@) $@
TARGETS += $(IMAGES_OUTPUTDIR)/jmods/$(MODULE).jmod
< prev index next >