make/langtools/launcher.sh-template
author prappo
Mon, 05 Feb 2018 11:53:05 +0000
branchhttp-client-branch
changeset 56065 67ca659b649f
parent 47216 71c04702a3d5
permissions -rw-r--r--
http-client-branch: (WebSocket) merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     1
#!/bin/sh
06bc494ca11e Initial load
duke
parents:
diff changeset
     2
06bc494ca11e Initial load
duke
parents:
diff changeset
     3
#
36526
3b41f1c69604 8142968: Module System implementation
alanb
parents: 33362
diff changeset
     4
# Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
     5
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
06bc494ca11e Initial load
duke
parents:
diff changeset
     6
#
06bc494ca11e Initial load
duke
parents:
diff changeset
     7
# This code is free software; you can redistribute it and/or modify it
06bc494ca11e Initial load
duke
parents:
diff changeset
     8
# under the terms of the GNU General Public License version 2 only, as
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 5490
diff changeset
     9
# published by the Free Software Foundation.  Oracle designates this
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    10
# particular file as subject to the "Classpath" exception as provided
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 5490
diff changeset
    11
# by Oracle in the LICENSE file that accompanied this code.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    12
#
06bc494ca11e Initial load
duke
parents:
diff changeset
    13
# This code is distributed in the hope that it will be useful, but WITHOUT
06bc494ca11e Initial load
duke
parents:
diff changeset
    14
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
06bc494ca11e Initial load
duke
parents:
diff changeset
    15
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
06bc494ca11e Initial load
duke
parents:
diff changeset
    16
# version 2 for more details (a copy is included in the LICENSE file that
06bc494ca11e Initial load
duke
parents:
diff changeset
    17
# accompanied this code).
06bc494ca11e Initial load
duke
parents:
diff changeset
    18
#
06bc494ca11e Initial load
duke
parents:
diff changeset
    19
# You should have received a copy of the GNU General Public License version
06bc494ca11e Initial load
duke
parents:
diff changeset
    20
# 2 along with this work; if not, write to the Free Software Foundation,
06bc494ca11e Initial load
duke
parents:
diff changeset
    21
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
06bc494ca11e Initial load
duke
parents:
diff changeset
    22
#
5520
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 5490
diff changeset
    23
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 5490
diff changeset
    24
# or visit www.oracle.com if you need additional information or have any
86e4b9a9da40 6943119: Rebrand source copyright notices
ohair
parents: 5490
diff changeset
    25
# questions.
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    26
#
06bc494ca11e Initial load
duke
parents:
diff changeset
    27
3149
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    28
# tools currently assumes that assertions are enabled in the launcher
3654
bb3c0eeec3cb 6870706: langtools launcher issues
jjg
parents: 3154
diff changeset
    29
ea=-ea:com.sun.tools...
10
06bc494ca11e Initial load
duke
parents:
diff changeset
    30
3149
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    31
# Any parameters starting with -J are passed to the JVM.
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    32
# All other parameters become parameters of #PROGRAM#.
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    33
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    34
# Separate out -J* options for the JVM
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    35
# Unset IFS and use newline as arg separator to preserve spaces in args
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    36
DUALCASE=1  # for MKS: make case statement case-sensitive (6709498)
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    37
saveIFS="$IFS"
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    38
nl='
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    39
'
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    40
for i in "$@" ; do
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    41
   IFS=
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    42
   case $i in
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    43
   -J* )       javaOpts=$javaOpts$nl`echo $i | sed -e 's/^-J//'` ;;
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    44
   *   )       toolOpts=$toolOpts$nl$i ;;
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    45
   esac
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    46
   IFS="$saveIFS"
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    47
done
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    48
unset DUALCASE
0cd06d598d6f 6843077: JSR 308: Annotations on types
jjg
parents: 10
diff changeset
    49
5490
a237b108549d 6948251: need to quote args in langtools launcher script
jjg
parents: 4706
diff changeset
    50
IFS=$nl
38609
a1c0c73078b3 8157895: langtools launcher.sh-template script is broken
mcimadamore
parents: 37851
diff changeset
    51
"#TARGET_JAVA#" #XPATCH# ${ea} ${javaOpts} #PROGRAM# ${toolOpts}