make/CompileJavaModulesNashorn.gmk
author plevart
Sat, 13 Jul 2019 10:43:45 +0000
changeset 55697 7fd4446c02ee
parent 50315 ae67f5db7469
permissions -rw-r--r--
8227368: EnumSet.class serialization broken in JDK 9+ Reviewed-by: smarks
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16198
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
     1
#
50313
7c40e39e38a1 8203945: Cleanup nashorn build
erikj
parents: 47398
diff changeset
     2
# Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
16198
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
     4
#
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    10
#
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    15
# accompanied this code).
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    16
#
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    20
#
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    23
# questions.
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    24
#
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    25
47217
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    26
NASGEN_SRC := $(TOPDIR)/make/nashorn/buildtools/nasgen/src
72e3ae9a25eb 8187444: Forest Consolidation: Make build work
erikj
parents: 47216
diff changeset
    27
ASM_SRC := $(TOPDIR)/src/java.base/share/classes/jdk/internal/org/objectweb/asm
16265
bd8e2707574a 8009021: nasgen should be run on boot jdk rather than currenly built jdk
sundar
parents: 16261
diff changeset
    28
16198
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    29
# Build nasgen
43554
a6f3b6d1c9b0 8173822: Remove dead code in BuildNashorn.gmk
ihse
parents: 41500
diff changeset
    30
$(eval $(call SetupJavaCompilation, BUILD_NASGEN, \
26892
97093836f3b7 8059135: New Nasgen dependencies to Nashorn breaks the JDK 9 build - bootstrapping problem?
erikj
parents: 25865
diff changeset
    31
    SETUP := GENERATE_OLDBYTECODE, \
20576
1763ed231bda 8001931: The new build system whitespace cleanup
ihse
parents: 18856
diff changeset
    32
    SRC := $(NASGEN_SRC) $(ASM_SRC), \
50313
7c40e39e38a1 8203945: Cleanup nashorn build
erikj
parents: 47398
diff changeset
    33
    BIN := $(BUILDTOOLS_OUTPUTDIR)/nasgen_classes, \
7c40e39e38a1 8203945: Cleanup nashorn build
erikj
parents: 47398
diff changeset
    34
))
16198
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    35
50313
7c40e39e38a1 8203945: Cleanup nashorn build
erikj
parents: 47398
diff changeset
    36
NASHORN_CLASSES_DIR := $(JDK_OUTPUTDIR)/modules/$(MODULE)
25865
d38d876f1654 8054834: Modular Source Code
chegar
parents: 23367
diff changeset
    37
NASGEN_RUN_FILE := $(NASHORN_CLASSES_DIR)/_the.nasgen.run
d38d876f1654 8054834: Modular Source Code
chegar
parents: 23367
diff changeset
    38
47364
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47274
diff changeset
    39
NASGEN_OPTIONS := \
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47274
diff changeset
    40
    -cp $(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47274
diff changeset
    41
    --patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/nasgen_classes \
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47274
diff changeset
    42
    --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47274
diff changeset
    43
    --add-exports java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED \
6b3389375f31 8189094: Change required boot jdk to JDK 9
erikj
parents: 47274
diff changeset
    44
    #
36517
41a1c20eb619 8142968: Module System implementation
alanb
parents: 34456
diff changeset
    45
50313
7c40e39e38a1 8203945: Cleanup nashorn build
erikj
parents: 47398
diff changeset
    46
# Run nasgen to modify classes in jdk.nashorn.internal.objects package
7c40e39e38a1 8203945: Cleanup nashorn build
erikj
parents: 47398
diff changeset
    47
$(NASGEN_RUN_FILE): $(BUILD_NASGEN) $($(MODULE))
16198
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    48
	$(ECHO) Running nasgen
41240
1c5f97d2d3fb 8166965: Some small java build tools are still running with big JVM configuration
erikj
parents: 40286
diff changeset
    49
	$(JAVA_SMALL) $(NASGEN_OPTIONS) \
50313
7c40e39e38a1 8203945: Cleanup nashorn build
erikj
parents: 47398
diff changeset
    50
	    jdk.nashorn.internal.tools.nasgen.Main $(@D) \
7c40e39e38a1 8203945: Cleanup nashorn build
erikj
parents: 47398
diff changeset
    51
	    jdk.nashorn.internal.objects $(@D)
16198
1cfb1fbab2dc 8006676: Integrate Nashorn into new build system
jlaskey
parents:
diff changeset
    52
	$(TOUCH) $@
50315
ae67f5db7469 8204109: JDK-8203945 broke nashorn
erikj
parents: 50313
diff changeset
    53
ae67f5db7469 8204109: JDK-8203945 broke nashorn
erikj
parents: 50313
diff changeset
    54
TARGETS += $(NASGEN_RUN_FILE)