langtools/make/gendata/Gendata-jdk.compiler.gmk
changeset 31506 4e07f827a794
child 33552 5fac23e49bef
equal deleted inserted replaced
31505:98c52b994430 31506:4e07f827a794
       
     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 include JavaCompilation.gmk
       
    27 include SetupJavaCompilers.gmk
       
    28 
       
    29 ################################################################################
       
    30 
       
    31 CT_DATA_DESCRIPTION ?= $(LANGTOOLS_TOPDIR)/make/data/symbols/symbols
       
    32 
       
    33 $(eval $(call SetupJavaCompilation, COMPILE_CREATE_SYMBOLS, \
       
    34     SETUP := GENERATE_OLDBYTECODE, \
       
    35     SRC := $(LANGTOOLS_TOPDIR)/make/src/classes, \
       
    36     INCLUDES := build/tools/symbolgenerator, \
       
    37     ADD_JAVAC_FLAGS := -Xbootclasspath/p:"$(INTERIM_LANGTOOLS_JAR)", \
       
    38     BIN := $(BUILDTOOLS_OUTPUTDIR)/create_symbols, \
       
    39 ))
       
    40 
       
    41 $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols: \
       
    42     $(COMPILE_CREATE_SYMBOLS) \
       
    43     $(wildcard $(LANGTOOLS_TOPDIR)/make/data/symbols/*)
       
    44 	$(RM) -r $(@D)
       
    45 	$(MKDIR) -p $(@D)
       
    46 	$(ECHO) Creating ct.sym classes
       
    47 	$(JAVA) $(INTERIM_LANGTOOLS_ARGS) \
       
    48 	    -classpath $(BUILDTOOLS_OUTPUTDIR)/create_symbols \
       
    49 	    build.tools.symbolgenerator.CreateSymbols \
       
    50 	    build-ctsym \
       
    51 	    $(CT_DATA_DESCRIPTION) \
       
    52 	    $(@D)
       
    53 	$(TOUCH) $@
       
    54 
       
    55 # Can't generate ct.sym directly into modules libs as the SetupArchive macro
       
    56 # creates meta data files in the output dir.
       
    57 $(eval $(call SetupArchive, CREATE_CTSYM, \
       
    58     DEPENDENCIES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files/_the.symbols, \
       
    59     SRCS := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym-files, \
       
    60     SUFFIXES := .sig, \
       
    61     JAR := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \
       
    62 ))
       
    63 
       
    64 # Copy ct.sym to the modules libs dir
       
    65 $(eval $(call SetupCopyFiles, COPY_TO_LIBS, \
       
    66     FILES := $(SUPPORT_OUTPUTDIR)/symbols/ct.sym, \
       
    67     DEST := $(SUPPORT_OUTPUTDIR)/modules_libs/jdk.compiler, \
       
    68 ))
       
    69 
       
    70 TARGETS += $(CREATE_CTSYM) $(COPY_TO_LIBS)
       
    71 
       
    72 ################################################################################