annotate make/CompileInterimLangtools.gmk @ 48550:b09e56145e11

Added tag jdk-10+46 for changeset 6fa770f9f8ab
author lana
date Thu, 08 Mar 2018 04:23:31 +0000
parents 6b3389375f31
children
rev   line source
ohair@14270 1 #
jjg@44457 2 # Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
ohair@14270 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ohair@14270 4 #
ohair@14270 5 # This code is free software; you can redistribute it and/or modify it
ohair@14270 6 # under the terms of the GNU General Public License version 2 only, as
ohair@14270 7 # published by the Free Software Foundation. Oracle designates this
ohair@14270 8 # particular file as subject to the "Classpath" exception as provided
ohair@14270 9 # by Oracle in the LICENSE file that accompanied this code.
ohair@14270 10 #
ohair@14270 11 # This code is distributed in the hope that it will be useful, but WITHOUT
ohair@14270 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ohair@14270 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ohair@14270 14 # version 2 for more details (a copy is included in the LICENSE file that
ohair@14270 15 # accompanied this code).
ohair@14270 16 #
ohair@14270 17 # You should have received a copy of the GNU General Public License version
ohair@14270 18 # 2 along with this work; if not, write to the Free Software Foundation,
ohair@14270 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ohair@14270 20 #
ohair@14270 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@14270 22 # or visit www.oracle.com if you need additional information or have any
ohair@14270 23 # questions.
ohair@14270 24 #
ohair@14270 25
ohair@14270 26 # This must be the first rule
ohair@14270 27 default: all
ohair@14270 28
ohair@14270 29 include $(SPEC)
ohair@14270 30 include MakeBase.gmk
ohair@14270 31 include JavaCompilation.gmk
chegar@27579 32 include SetupJavaCompilers.gmk
erikj@47364 33 include Modules.gmk
erikj@47364 34
erikj@47364 35 ################################################################################
erikj@47364 36 # Generate interim versions of the module-info.java files for the interim
erikj@47364 37 # langtools modules. Each interim module has ".interim" added as suffix to the
erikj@47364 38 # original module name.
erikj@47364 39
erikj@47364 40 INTERIM_MODULEINFO_PATTERN := \
erikj@47364 41 $(foreach m, $(INTERIM_LANGTOOLS_BASE_MODULES), -e 's/$m\([,; ]\)/$m.interim\1/g')
erikj@47364 42
erikj@47364 43 $(BUILDTOOLS_OUTPUTDIR)/gensrc/%.interim/module-info.java: \
erikj@47364 44 $(TOPDIR)/src/%/share/classes/module-info.java
erikj@47364 45 $(call LogInfo, Generating module-info.java for $*.interim)
erikj@47364 46 $(call MakeDir, $(@D))
erikj@47364 47 $(SED) $(INTERIM_MODULEINFO_PATTERN) $< > $@
erikj@47364 48
erikj@47364 49 TARGETS += $(patsubst %, $(BUILDTOOLS_OUTPUTDIR)/gensrc/%/module-info.java, \
erikj@47364 50 $(INTERIM_LANGTOOLS_MODULES))
ohair@14270 51
chegar@27579 52 ################################################################################
smarks@40596 53 # Setup the rules to build interim langtools, which is compiled by the boot
erikj@47364 54 # javac and can be run on the boot jdk. This will be used to compile the rest of
erikj@47364 55 # the product. Each module is compiled separately because a multi module setup
erikj@47364 56 # would require the source files to be copied into directories named after the
erikj@47364 57 # actual interim modules.
ohair@14270 58
alanb@36526 59 # Param 1 - Name of module to compile
alanb@36526 60 define SetupInterimModule
erikj@47364 61 $$(eval $$(call SetupJavaCompilation, BUILD_$1.interim, \
alanb@36526 62 SETUP := BOOT_JAVAC, \
alanb@36526 63 DISABLE_SJAVAC := true, \
erikj@47364 64 SRC := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim \
erikj@47364 65 $$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$1) \
erikj@47364 66 $(TOPDIR)/src/$1/share/classes, \
erikj@47364 67 EXCLUDES := sun, \
erikj@47364 68 EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
erikj@47364 69 Standard.java, \
erikj@47364 70 EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
alanb@36526 71 COPY := .gif .png .xml .css .js javax.tools.JavaCompilerTool, \
erikj@48068 72 BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \
erikj@48068 73 ADD_JAVAC_FLAGS := --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules \
erikj@47364 74 $$(INTERIM_LANGTOOLS_ADD_EXPORTS) \
erikj@47364 75 -Xlint:-module, \
alanb@36526 76 ))
alanb@36526 77
erikj@47364 78 $1_DEPS_INTERIM := $$(addsuffix .interim, $$(filter \
erikj@47364 79 $$(INTERIM_LANGTOOLS_BASE_MODULES), $$(call FindTransitiveDepsForModule, $1)))
alanb@36526 80
erikj@47364 81 $$(BUILD_$1.interim): $$(foreach d, $$($1_DEPS_INTERIM), $$(BUILD_$$d))
erikj@47364 82
erikj@47364 83 TARGETS += $$(BUILD_$1.interim)
alanb@36526 84 endef
alanb@36526 85
erikj@47364 86 $(foreach m, $(INTERIM_LANGTOOLS_BASE_MODULES), \
erikj@47364 87 $(eval $(call SetupInterimModule,$m)) \
erikj@47364 88 )
erikj@47364 89
erikj@47364 90 ################################################################################
alanb@36526 91
alanb@36526 92 all: $(TARGETS)