annotate make/CompileJavaModulesNashorn.gmk @ 50897:7c40e39e38a1

8203945: Cleanup nashorn build Reviewed-by: tbell
author erikj
date Wed, 30 May 2018 10:23:45 -0700
parents make/BuildNashorn.gmk@1fd27535bc57
children ae67f5db7469
rev   line source
jlaskey@16198 1 #
erikj@50897 2 # Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
jlaskey@16198 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jlaskey@16198 4 #
jlaskey@16198 5 # This code is free software; you can redistribute it and/or modify it
jlaskey@16198 6 # under the terms of the GNU General Public License version 2 only, as
jlaskey@16198 7 # published by the Free Software Foundation. Oracle designates this
jlaskey@16198 8 # particular file as subject to the "Classpath" exception as provided
jlaskey@16198 9 # by Oracle in the LICENSE file that accompanied this code.
jlaskey@16198 10 #
jlaskey@16198 11 # This code is distributed in the hope that it will be useful, but WITHOUT
jlaskey@16198 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jlaskey@16198 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
jlaskey@16198 14 # version 2 for more details (a copy is included in the LICENSE file that
jlaskey@16198 15 # accompanied this code).
jlaskey@16198 16 #
jlaskey@16198 17 # You should have received a copy of the GNU General Public License version
jlaskey@16198 18 # 2 along with this work; if not, write to the Free Software Foundation,
jlaskey@16198 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jlaskey@16198 20 #
jlaskey@16198 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jlaskey@16198 22 # or visit www.oracle.com if you need additional information or have any
jlaskey@16198 23 # questions.
jlaskey@16198 24 #
jlaskey@16198 25
erikj@47217 26 NASGEN_SRC := $(TOPDIR)/make/nashorn/buildtools/nasgen/src
erikj@47217 27 ASM_SRC := $(TOPDIR)/src/java.base/share/classes/jdk/internal/org/objectweb/asm
sundar@16265 28
jlaskey@16198 29 # Build nasgen
ihse@43554 30 $(eval $(call SetupJavaCompilation, BUILD_NASGEN, \
erikj@26892 31 SETUP := GENERATE_OLDBYTECODE, \
ihse@20576 32 SRC := $(NASGEN_SRC) $(ASM_SRC), \
erikj@50897 33 BIN := $(BUILDTOOLS_OUTPUTDIR)/nasgen_classes, \
erikj@50897 34 ))
jlaskey@16198 35
erikj@50897 36 NASHORN_CLASSES_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)
chegar@25865 37 NASGEN_RUN_FILE := $(NASHORN_CLASSES_DIR)/_the.nasgen.run
chegar@25865 38
erikj@47474 39 NASGEN_OPTIONS := \
erikj@47474 40 -cp $(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
erikj@47474 41 --patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
erikj@47474 42 --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
erikj@47474 43 --add-exports java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED \
erikj@47474 44 #
alanb@36517 45
erikj@50897 46 # Run nasgen to modify classes in jdk.nashorn.internal.objects package
erikj@50897 47 $(NASGEN_RUN_FILE): $(BUILD_NASGEN) $($(MODULE))
jlaskey@16198 48 $(ECHO) Running nasgen
erikj@41240 49 $(JAVA_SMALL) $(NASGEN_OPTIONS) \
erikj@50897 50 jdk.nashorn.internal.tools.nasgen.Main $(@D) \
erikj@50897 51 jdk.nashorn.internal.objects $(@D)
jlaskey@16198 52 $(TOUCH) $@