1 #
   2 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 default: all
  27 
  28 include $(SPEC)
  29 include MakeBase.gmk
  30 include JavaCompilation.gmk
  31 include SetupJavaCompilers.gmk
  32 
  33 # Hook to include the corresponding custom file, if present.
  34 $(eval $(call IncludeCustomExtension, , Ctsym.gmk))
  35 
  36 ################################################################################
  37 
  38 CT_DATA_DESCRIPTION ?= $(TOPDIR)/make/data/symbols/symbols
  39 
  40 $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
  41     SETUP := GENERATE_OLDBYTECODE, \
  42     SRC := $(TOPDIR)/make/tools, \
  43     INCLUDES := symbolgenerator, \
  44     ADD_JAVAC_FLAGS := -Xbootclasspath/p:"$(INTERIM_LANGTOOLS_JAR)", \
  45     BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols, \
  46 ))
  47 
  48 $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols: \
  49     $(COMPILE_CREATE_SYMBOLS) \
  50     $(wildcard $(TOPDIR)/make/data/symbols/*)
  51         $(RM) -r $(@D)
  52         $(MKDIR) -p $(@D)
  53         $(ECHO) Creating ct.sym classes
  54         $(JAVA) $(INTERIM_LANGTOOLS_ARGS) \
  55             -classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols \
  56             symbolgenerator.CreateSymbols \
  57             build-ctsym \
  58             $(CT_DATA_DESCRIPTION) \
  59             $(@D)
  60         $(TOUCH) $@
  61 
  62 $(eval $(call SetupArchive, CREATE_CTSYM, \
  63     DEPENDENCIES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols, \
  64     SRCS := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files, \
  65     SUFFIXES := .sig, \
  66     JAR := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \
  67 ))
  68 
  69 # Copy ct.sym to the exploded jdk image
  70 $(eval $(call SetupCopyFiles, COPY_TO_EXPLODED, \
  71     FILES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \
  72     DEST := $(JDK_OUTPUTDIR)/lib, \
  73 ))
  74 
  75 TARGETS += $(CREATE_CTSYM) $(COPY_TO_EXPLODED)
  76 
  77 ################################################################################
  78 
  79 all: $(TARGETS)