Skip to content
Permalink
Browse files
8206311: Add docs-javase, docs-reference to CI build
Reviewed-by: ihse
  • Loading branch information
erikj79 committed Oct 21, 2020
1 parent 3445031 commit 9ade94b727b54bfff248ef9fdd29d6386aba190c
Showing with 140 additions and 35 deletions.
  1. +38 −9 make/Bundles.gmk
  2. +13 −1 make/CompileModuleTools.gmk
  3. +2 −2 make/Docs.gmk
  4. +35 −12 make/Main.gmk
  5. +14 −5 make/autoconf/spec.gmk.in
  6. +7 −0 make/common/JavaCompilation.gmk
  7. +31 −6 make/conf/jib-profiles.js
@@ -410,17 +410,43 @@ endif

################################################################################

ifneq ($(filter docs-bundles, $(MAKECMDGOALS)), )
DOCS_BUNDLE_FILES := $(call FindFiles, $(DOCS_IMAGE_DIR))
ifneq ($(filter docs-jdk-bundles, $(MAKECMDGOALS)), )
DOCS_JDK_BUNDLE_FILES := $(call FindFiles, $(DOCS_JDK_IMAGE_DIR))

$(eval $(call SetupBundleFile, BUILD_DOCS_BUNDLE, \
BUNDLE_NAME := $(DOCS_BUNDLE_NAME), \
FILES := $(DOCS_BUNDLE_FILES), \
BASE_DIRS := $(DOCS_IMAGE_DIR), \
$(eval $(call SetupBundleFile, BUILD_DOCS_JDK_BUNDLE, \
BUNDLE_NAME := $(DOCS_JDK_BUNDLE_NAME), \
FILES := $(DOCS_JDK_BUNDLE_FILES), \
BASE_DIRS := $(DOCS_JDK_IMAGE_DIR), \
SUBDIR := docs, \
))

DOCS_TARGETS += $(BUILD_DOCS_BUNDLE)
DOCS_JDK_TARGETS += $(BUILD_DOCS_JDK_BUNDLE)
endif

ifneq ($(filter docs-javase-bundles, $(MAKECMDGOALS)), )
DOCS_JAVASE_BUNDLE_FILES := $(call FindFiles, $(DOCS_JAVASE_IMAGE_DIR))

$(eval $(call SetupBundleFile, BUILD_DOCS_JAVASE_BUNDLE, \
BUNDLE_NAME := $(DOCS_JAVASE_BUNDLE_NAME), \
FILES := $(DOCS_JAVASE_BUNDLE_FILES), \
BASE_DIRS := $(DOCS_JAVASE_IMAGE_DIR), \
SUBDIR := docs-javase, \
))

DOCS_JAVASE_TARGETS += $(BUILD_DOCS_JAVASE_BUNDLE)
endif

ifneq ($(filter docs-reference-bundles, $(MAKECMDGOALS)), )
DOCS_REFERENCE_BUNDLE_FILES := $(call FindFiles, $(DOCS_REFERENCE_IMAGE_DIR))

$(eval $(call SetupBundleFile, BUILD_DOCS_REFERENCE_BUNDLE, \
BUNDLE_NAME := $(DOCS_REFERENCE_BUNDLE_NAME), \
FILES := $(DOCS_REFERENCE_BUNDLE_FILES), \
BASE_DIRS := $(DOCS_REFERENCE_IMAGE_DIR), \
SUBDIR := docs-reference, \
))

DOCS_REFERENCE_TARGETS += $(BUILD_DOCS_REFERENCE_BUNDLE)
endif

################################################################################
@@ -469,9 +495,12 @@ $(eval $(call IncludeCustomExtension, Bundles.gmk))
product-bundles: $(PRODUCT_TARGETS)
legacy-bundles: $(LEGACY_TARGETS)
test-bundles: $(TEST_TARGETS)
docs-bundles: $(DOCS_TARGETS)
docs-jdk-bundles: $(DOCS_JDK_TARGETS)
docs-javase-bundles: $(DOCS_JAVASE_TARGETS)
docs-reference-bundles: $(DOCS_REFERENCE_TARGETS)
static-libs-bundles: $(STATIC_LIBS_TARGETS)
jcov-bundles: $(JCOV_TARGETS)

.PHONY: all default product-bundles test-bundles docs-bundles \
.PHONY: all default product-bundles test-bundles \
docs-jdk-bundles docs-javase-bundles docs-reference-bundles \
static-libs-bundles jcov-bundles
@@ -33,8 +33,20 @@ include JavaCompilation.gmk

TOOLS_CLASSES_DIR := $(BUILDTOOLS_OUTPUTDIR)/tools_jigsaw_classes

# When using an external BUILDJDK, make it possible to shortcut building of
# these tools using the BUILD_JAVAC instead of having to build the complete
# exploded image first.
ifeq ($(EXTERNAL_BUILDJDK), true)
COMPILER := buildjdk
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK)
else
COMPILER := interim
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED)
endif

$(eval $(call SetupJavaCompilation, BUILD_JIGSAW_TOOLS, \
TARGET_RELEASE := $(TARGET_RELEASE_NEWJDK_UPGRADED), \
TARGET_RELEASE := $(TARGET_RELEASE), \
COMPILER := $(COMPILER), \
SRC := $(TOPDIR)/make/jdk/src/classes, \
INCLUDES := build/tools/deps \
build/tools/docs \
@@ -458,7 +458,7 @@ $(eval $(call SetupApiDocsGeneration, JAVASE_API, \
MODULES := $(JAVASE_MODULES), \
SHORT_NAME := $(JAVASE_SHORT_NAME), \
LONG_NAME := $(JAVASE_LONG_NAME), \
TARGET_DIR := $(IMAGES_OUTPUTDIR)/javase-docs/api, \
TARGET_DIR := $(DOCS_JAVASE_IMAGE_DIR)/api, \
))

# Targets generated are returned in JAVASE_API_JAVADOC_TARGETS and
@@ -476,7 +476,7 @@ $(eval $(call SetupApiDocsGeneration, REFERENCE_API, \
MODULES := $(JAVASE_MODULES), \
SHORT_NAME := $(JAVASE_SHORT_NAME), \
LONG_NAME := $(JAVASE_LONG_NAME), \
TARGET_DIR := $(IMAGES_OUTPUTDIR)/reference-docs/api, \
TARGET_DIR := $(DOCS_REFERENCE_IMAGE_DIR)/api, \
JAVADOC_CMD := $(JAVADOC), \
OPTIONS := $(REFERENCE_OPTIONS), \
TAGS := $(REFERENCE_TAGS), \
@@ -90,7 +90,6 @@ $(eval $(call SetupTarget, buildtools-jdk, \

$(eval $(call SetupTarget, buildtools-modules, \
MAKEFILE := CompileModuleTools, \
DEPS := exploded-image-base, \
))

$(eval $(call SetupTarget, buildtools-hotspot, \
@@ -469,7 +468,7 @@ $(eval $(call SetupTarget, docs-jdk-api-javadoc, \
$(eval $(call SetupTarget, docs-jdk-api-modulegraph, \
MAKEFILE := Docs, \
TARGET := docs-jdk-api-modulegraph, \
DEPS := exploded-image buildtools-modules, \
DEPS := buildtools-modules, \
))

$(eval $(call SetupTarget, docs-javase-api-javadoc, \
@@ -480,7 +479,7 @@ $(eval $(call SetupTarget, docs-javase-api-javadoc, \
$(eval $(call SetupTarget, docs-javase-api-modulegraph, \
MAKEFILE := Docs, \
TARGET := docs-javase-api-modulegraph, \
DEPS := exploded-image buildtools-modules, \
DEPS := buildtools-modules, \
))

$(eval $(call SetupTarget, docs-reference-api-javadoc, \
@@ -491,7 +490,7 @@ $(eval $(call SetupTarget, docs-reference-api-javadoc, \
$(eval $(call SetupTarget, docs-reference-api-modulegraph, \
MAKEFILE := Docs, \
TARGET := docs-reference-api-modulegraph, \
DEPS := exploded-image buildtools-modules, \
DEPS := buildtools-modules, \
))

# The gensrc steps for jdk.jdi create html spec files.
@@ -749,12 +748,24 @@ $(eval $(call SetupTarget, test-bundles, \
DEPS := test-image, \
))

$(eval $(call SetupTarget, docs-bundles, \
$(eval $(call SetupTarget, docs-jdk-bundles, \
MAKEFILE := Bundles, \
TARGET := docs-bundles, \
TARGET := docs-jdk-bundles, \
DEPS := docs-image, \
))

$(eval $(call SetupTarget, docs-javase-bundles, \
MAKEFILE := Bundles, \
TARGET := docs-javase-bundles, \
DEPS := docs-javase-image, \
))

$(eval $(call SetupTarget, docs-reference-bundles, \
MAKEFILE := Bundles, \
TARGET := docs-reference-bundles, \
DEPS := docs-reference-image, \
))

$(eval $(call SetupTarget, static-libs-bundles, \
MAKEFILE := Bundles, \
TARGET := static-libs-bundles, \
@@ -945,10 +956,13 @@ else
$(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): java.base-libs java.base-copy \
java.base-gendata jdk.jlink-launchers java
endif
else
# The normal non cross compilation case uses needs to wait for the full
else ifeq ($(EXTERNAL_BUILDJDK), false)
# The normal non cross compilation usecase needs to wait for the full
# exploded-image to avoid a race with the optimize target.
$(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): exploded-image
# The buildtools-modules are used for the exploded-image-optimize target,
# but can be built either using the exploded-image or an external BUILDJDK.
buildtools-modules: exploded-image-base
endif

# All modules include the main license files from java.base.
@@ -1122,8 +1136,16 @@ ifeq ($(call isTargetOs, macosx), true)
legacy-images: mac-legacy-jre-bundle
endif

# This target builds the documentation image
docs-image: docs-jdk
# These targets build the various documentation images
docs-jdk-image: docs-jdk
docs-javase-image: docs-javase
docs-reference-image: docs-reference
# The docs-jdk-image is what most users expect to be built
docs-image: docs-jdk-image
all-docs-images: docs-jdk-image docs-javase-image docs-reference-image

docs-bundles: docs-jdk-bundles
all-docs-bundles: docs-jdk-bundles docs-javase-bundles docs-reference-bundles

# This target builds the test image
test-image: prepare-test-image test-image-jdk-jtreg-native \
@@ -1156,7 +1178,7 @@ endif
################################################################################

# all-images builds all our deliverables as images.
all-images: product-images test-image docs-image
all-images: product-images test-image all-docs-images

# all-bundles packages all our deliverables as tar.gz bundles.
all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles
@@ -1167,7 +1189,8 @@ ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \
exploded-image-base exploded-image \
create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
docs-javase docs-reference docs-javadoc mac-bundles product-images legacy-images \
docs-image test-image all-images \
docs-image docs-javase-image docs-reference-image all-docs-images \
docs-bundles all-docs-bundles test-image all-images \
all-bundles

################################################################################
@@ -644,6 +644,7 @@ JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)

BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
BUILD_JAVAC=@FIXPATH@ $(BUILD_JDK)/bin/javac
BUILD_JAR=@FIXPATH@ $(BUILD_JDK)/bin/jar

# Interim langtools modules and arguments
@@ -876,10 +877,14 @@ INTERIM_JMODS_DIR := $(SUPPORT_OUTPUTDIR)/interim-jmods
INTERIM_IMAGE_DIR := $(SUPPORT_OUTPUTDIR)/interim-image

# Docs image
DOCS_IMAGE_SUBDIR := docs
DOCS_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(DOCS_IMAGE_SUBDIR)
DOCS_JDK_IMAGE_SUBDIR := docs
DOCS_JDK_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(DOCS_JDK_IMAGE_SUBDIR)
DOCS_JAVASE_IMAGE_SUBDIR := docs-javase
DOCS_JAVASE_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(DOCS_JAVASE_IMAGE_SUBDIR)
DOCS_REFERENCE_IMAGE_SUBDIR := docs-reference
DOCS_REFERENCE_IMAGE_DIR = $(IMAGES_OUTPUTDIR)/$(DOCS_REFERENCE_IMAGE_SUBDIR)
# Output docs directly into image
DOCS_OUTPUTDIR := $(DOCS_IMAGE_DIR)
DOCS_OUTPUTDIR := $(DOCS_JDK_IMAGE_DIR)

# Static libs image
STATIC_LIBS_IMAGE_SUBDIR := static-libs
@@ -922,7 +927,9 @@ JRE_BUNDLE_NAME := jre-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)
JDK_SYMBOLS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin$(DEBUG_PART)-symbols.tar.gz
TEST_DEMOS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests-demos$(DEBUG_PART).tar.gz
TEST_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-tests$(DEBUG_PART).tar.gz
DOCS_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_JDK_BUNDLE_NAME := jdk-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_JAVASE_BUNDLE_NAME := javase-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
DOCS_REFERENCE_BUNDLE_NAME := jdk-reference-$(BASE_NAME)_doc-api-spec$(DEBUG_PART).tar.gz
STATIC_LIBS_BUNDLE_NAME := jdk-$(BASE_NAME)_bin-static-libs$(DEBUG_PART).tar.gz
JCOV_BUNDLE_NAME := jdk-jcov-$(BASE_NAME)_bin$(DEBUG_PART).$(JDK_BUNDLE_EXTENSION)

@@ -931,7 +938,9 @@ JRE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JRE_BUNDLE_NAME)
JDK_SYMBOLS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JDK_SYMBOLS_BUNDLE_NAME)
TEST_DEMOS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_DEMOS_BUNDLE_NAME)
TEST_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(TEST_BUNDLE_NAME)
DOCS_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_BUNDLE_NAME)
DOCS_JDK_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_JDK_BUNDLE_NAME)
DOCS_JAVASE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_JAVASE_BUNDLE_NAME)
DOCS_REFERENCE_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(DOCS_REFERENCE_BUNDLE_NAME)
JCOV_BUNDLE := $(BUNDLES_OUTPUTDIR)/$(JCOV_BUNDLE_NAME)

# This macro is called to allow inclusion of closed source counterparts.
@@ -202,6 +202,13 @@ define SetupJavaCompilationBody
# If unspecified, default to the new jdk we're building
$1_TARGET_RELEASE := $$(TARGET_RELEASE_BOOTJDK)
endif
else ifeq ($$($1_COMPILER), buildjdk)
$1_JAVAC_CMD := $$(BUILD_JAVAC)

ifeq ($$($1_TARGET_RELEASE), )
# If unspecified, default to the new jdk we're building
$1_TARGET_RELEASE := $$(TARGET_RELEASE_NEWJDK)
endif
else ifeq ($$($1_COMPILER), interim)
# Use java server if it is enabled, and the user does not want a specialized
# class path.
@@ -406,10 +406,9 @@ var getJibProfilesProfiles = function (input, common, data) {
target_cpu: "x64",
dependencies: ["devkit", "gtest", "graphviz", "pandoc", "graalunit_lib"],
configure_args: concat(common.configure_args_64bit,
"--enable-full-docs", "--with-zlib=system",
"--with-zlib=system",
(isWsl(input) ? [ "--host=x86_64-unknown-linux-gnu",
"--build=x86_64-unknown-linux-gnu" ] : [])),
default_make_targets: ["docs-bundles"],
},

"linux-x86": {
@@ -680,20 +679,46 @@ var getJibProfilesProfiles = function (input, common, data) {
common.debug_profile_artifacts(artifactData[name]));
});

profilesArtifacts = {
"linux-x64": {
buildJdkDep = input.build_os + "-" + input.build_cpu + ".jdk";
docsProfiles = {
"docs": {
target_os: input.build_os,
target_cpu: input.build_cpu,
dependencies: [
"boot_jdk", "devkit", "graphviz", "pandoc", buildJdkDep,
],
configure_args: [
"--enable-full-docs",
"--with-build-jdk=" + input.get(buildJdkDep, "home_path")
+ (input.build_os == "macosx" ? "/Contents/Home" : "")
],
default_make_targets: ["all-docs-bundles"],
artifacts: {
doc_api_spec: {
local: "bundles/\\(jdk.*doc-api-spec.tar.gz\\)",
local: "bundles/\\(jdk-" + data.version + ".*doc-api-spec.tar.gz\\)",
remote: [
"bundles/common/jdk-" + data.version + "_doc-api-spec.tar.gz",
"bundles/common/\\1"
],
},
javase_doc_api_spec: {
local: "bundles/\\(javase-" + data.version + ".*doc-api-spec.tar.gz\\)",
remote: [
"bundles/common/javase-" + data.version + "_doc-api-spec.tar.gz",
"bundles/common/\\1"
],
},
reference_doc_api_spec: {
local: "bundles/\\(jdk-reference-" + data.version + ".*doc-api-spec.tar.gz\\)",
remote: [
"bundles/common/jdk-reference-" + data.version + "_doc-api-spec.tar.gz",
"bundles/common/\\1"
],
},
}
}
};
profiles = concatObjects(profiles, profilesArtifacts);
profiles = concatObjects(profiles, docsProfiles);

// Generate open only profiles for all the main and debug profiles.
// Rewrite artifact remote paths by adding "openjdk/GPL".

1 comment on commit 9ade94b

@bridgekeeper

This comment has been minimized.

Copy link

@bridgekeeper bridgekeeper bot commented on 9ade94b Oct 21, 2020

Review

Issues

Please sign in to comment.