# # Copyright (c) 2015, 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 # published by the Free Software Foundation. Oracle designates this # particular file as subject to the "Classpath" exception as provided # by Oracle in the LICENSE file that accompanied this code. # # This code is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # version 2 for more details (a copy is included in the LICENSE file that # accompanied this code). # # You should have received a copy of the GNU General Public License version # 2 along with this work; if not, write to the Free Software Foundation, # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. # # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # default: all include $(SPEC) include MakeBase.gmk include JavaCompilation.gmk include SetupJavaCompilers.gmk GENSRC_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base SRC_DIR := $(HOTSPOT_TOPDIR)/src/java.base/share/classes ################################################################################ # Compile the annotation processor $(eval $(call SetupJavaCompilation, BUILD_JVMCI_OPTIONS, \ SETUP := GENERATE_OLDBYTECODE, \ SRC := $(SRC_DIR)/jdk.internal.jvmci.options/src \ $(SRC_DIR)/jdk.internal.jvmci.options.processor/src \ $(SRC_DIR)/jdk.internal.jvmci.inittimer/src, \ BIN := $(BUILDTOOLS_OUTPUTDIR)/jvmci_options, \ JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.internal.jvmci.options.jar, \ )) $(eval $(call SetupJavaCompilation, BUILD_JVMCI_SERVICE, \ SETUP := GENERATE_OLDBYTECODE, \ SRC := $(SRC_DIR)/jdk.internal.jvmci.service/src \ $(SRC_DIR)/jdk.internal.jvmci.service.processor/src, \ BIN := $(BUILDTOOLS_OUTPUTDIR)/jvmci_service, \ JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.internal.jvmci.service.jar, \ )) ################################################################################ PROC_SRC_SUBDIRS := \ jdk.internal.jvmci.compiler \ jdk.internal.jvmci.hotspot \ jdk.internal.jvmci.hotspot.amd64 \ jdk.internal.jvmci.hotspot.sparc \ # PROC_SRC_DIRS := $(patsubst %, $(SRC_DIR)/%/src, $(PROC_SRC_SUBDIRS)) PROC_SRCS := $(filter %.java, $(call CacheFind, $(PROC_SRC_DIRS))) ALL_SRC_DIRS := $(wildcard $(SRC_DIR)/*/src) SOURCEPATH := $(call PathList, $(ALL_SRC_DIRS)) PROCESSOR_PATH := $(call PathList, \ $(BUILDTOOLS_OUTPUTDIR)/jdk.internal.jvmci.options.jar \ $(BUILDTOOLS_OUTPUTDIR)/jdk.internal.jvmci.service.jar) $(GENSRC_DIR)/_gensrc_proc_done: $(PROC_SRCS) \ $(BUILD_JVMCI_OPTIONS) $(BUILD_JVMCI_SERVICE) $(MKDIR) -p $(@D) $(call ListPathsSafely,PROC_SRCS,\n, >> $(@D)/_gensrc_proc_files) $(JAVA_SMALL) $(NEW_JAVAC) \ -sourcepath $(SOURCEPATH) \ -implicit:none \ -proc:only \ -processorpath $(PROCESSOR_PATH) \ -d $(GENSRC_DIR) \ -s $(GENSRC_DIR) \ @$(@D)/_gensrc_proc_files $(TOUCH) $@ TARGETS += $(GENSRC_DIR)/_gensrc_proc_done ################################################################################ $(GENSRC_DIR)/META-INF/services/jdk.internal.jvmci.options.OptionDescriptors: \ $(GENSRC_DIR)/_gensrc_proc_done $(MKDIR) -p $(@D) ($(CD) $(GENSRC_DIR)/META-INF/jvmci.options && \ for i in $$(ls); do \ echo $${i}_OptionDescriptors >> $@; \ done) TARGETS += $(GENSRC_DIR)/META-INF/services/jdk.internal.jvmci.options.OptionDescriptors ################################################################################ $(GENSRC_DIR)/_providers_converted: $(GENSRC_DIR)/_gensrc_proc_done $(MKDIR) -p $(GENSRC_DIR)/META-INF/services ($(CD) $(GENSRC_DIR)/META-INF/jvmci.providers && \ for i in $$($(LS)); do \ c=$$($(CAT) $$i | $(TR) -d '\n\r'); \ $(ECHO) $$i >> $(GENSRC_DIR)/META-INF/services/$$c; \ done) $(TOUCH) $@ TARGETS += $(GENSRC_DIR)/_providers_converted ################################################################################ all: $(TARGETS) .PHONY: default all