ebb27ad595
Reviewed-by: erikj
123 lines
4.2 KiB
Plaintext
123 lines
4.2 KiB
Plaintext
#
|
|
# 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/jdk.vm.ci
|
|
SRC_DIR := $(HOTSPOT_TOPDIR)/src/jdk.vm.ci/share/classes
|
|
|
|
################################################################################
|
|
# Compile the annotation processor
|
|
|
|
$(eval $(call SetupJavaCompilation, BUILD_JVMCI_OPTIONS, \
|
|
SETUP := GENERATE_OLDBYTECODE, \
|
|
SRC := $(SRC_DIR)/jdk.vm.ci.options/src \
|
|
$(SRC_DIR)/jdk.vm.ci.options.processor/src \
|
|
$(SRC_DIR)/jdk.vm.ci.inittimer/src, \
|
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/jvmci_options, \
|
|
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.ci.options.jar, \
|
|
))
|
|
|
|
$(eval $(call SetupJavaCompilation, BUILD_JVMCI_SERVICE, \
|
|
SETUP := GENERATE_OLDBYTECODE, \
|
|
SRC := $(SRC_DIR)/jdk.vm.ci.service/src \
|
|
$(SRC_DIR)/jdk.vm.ci.service.processor/src, \
|
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/jvmci_service, \
|
|
JAR := $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.ci.service.jar, \
|
|
))
|
|
|
|
################################################################################
|
|
|
|
PROC_SRC_SUBDIRS := \
|
|
jdk.vm.ci.compiler \
|
|
jdk.vm.ci.hotspot \
|
|
jdk.vm.ci.hotspot.amd64 \
|
|
jdk.vm.ci.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.vm.ci.options.jar \
|
|
$(BUILDTOOLS_OUTPUTDIR)/jdk.vm.ci.service.jar)
|
|
|
|
$(GENSRC_DIR)/_gensrc_proc_done: $(PROC_SRCS) \
|
|
$(BUILD_JVMCI_OPTIONS) $(BUILD_JVMCI_SERVICE)
|
|
$(MKDIR) -p $(@D)
|
|
$(eval $(call ListPathsSafely,PROC_SRCS,$(@D)/_gensrc_proc_files))
|
|
$(JAVA_SMALL) $(NEW_JAVAC) \
|
|
-XDignore.symbol.file \
|
|
-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.vm.ci.options.OptionDescriptors: \
|
|
$(GENSRC_DIR)/_gensrc_proc_done
|
|
$(MKDIR) -p $(@D)
|
|
($(CD) $(GENSRC_DIR)/META-INF/jvmci.options && \
|
|
$(RM) -f $@; \
|
|
for i in $$(ls); do \
|
|
echo $${i}_OptionDescriptors >> $@; \
|
|
done)
|
|
|
|
TARGETS += $(GENSRC_DIR)/META-INF/services/jdk.vm.ci.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
|