11#! /bin/sh
22#
3- # Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
3+ # Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
44# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55#
66# This code is free software; you can redistribute it and/or modify it
5252# include the SCM state that was used to build it, which can be found in ${JDK_N_INSTALL}/release,
5353# in property "SOURCE".
5454
55+ source_path=" $( dirname ${0} ) "
56+ this_script_dir=" $( cd -- " ${source_path} " > /dev/null && pwd) "
57+ if test -z " ${this_script_dir} " ; then
58+ echo " Error: Could not determine location of this script"
59+ exit 1
60+ fi
61+
62+ symbols_dir=" $( dirname $this_script_dir ) /src/jdk.compiler/share/data/symbols"
63+ if [ ! -d $symbols_dir ] ; then
64+ echo " Cannot locate symbols directory: $symbols_dir " >&2
65+ exit 1
66+ fi
67+
68+ generator_dir=" $( dirname $this_script_dir ) /make/langtools/src/classes/build/tools/symbolgenerator"
69+
5570if [ " $1 x" = " x" ] ; then
5671 echo " Must provide the target JDK as a parameter:" >&2
5772 echo " $0 <target-jdk>" >&2
5873 exit 1
5974fi ;
6075
76+ if [ ! -d $1 ] ; then
77+ echo " Target JDK argument is not a directory:" $1 >&2
78+ exit 1
79+ fi ;
80+
81+ if [ ! -x $1 /bin/java ] ; then
82+ echo " Target JDK argument is not a valid JDK: $1 " >&2
83+ exit 1
84+ fi ;
85+
86+ cd $symbols_dir
87+
6188if [ ! -f symbols ] ; then
6289 echo " Must run inside the src/jdk.compiler/share/data/symbols directory" >&2
6390 exit 1
@@ -72,5 +99,5 @@ $1/bin/java --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
7299 --add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
73100 --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
74101 --add-modules jdk.jdeps \
75- ../../../../../make/langtools/src/classes/build/tools/symbolgenerator /CreateSymbols.java \
102+ $generator_dir /CreateSymbols.java \
76103 build-description-incremental symbols include.list
0 commit comments