comparison bin/idea.sh @ 48657:ed1bb7743b3e

8193363: TestDumpReplay.java fails with product builds Summary: Added missing -XX:+IgnoreUnrecognizedVMOptions Reviewed-by: kvn
author thartmann
date Tue, 12 Dec 2017 19:05:02 +0100
parents 71c04702a3d5
children f2344724a475
comparison
equal deleted inserted replaced
0:19a8ea8643bb 1:9da2f29d47be
23 # 23 #
24 24
25 # Shell script for generating an IDEA project from a given list of modules 25 # Shell script for generating an IDEA project from a given list of modules
26 26
27 usage() { 27 usage() {
28 echo "usage: $0 [-h|--help] [-v|--verbose] [-o|--output <path>] [modules]+" 28 echo "usage: $0 [-h|--help] [-v|--verbose] [-o|--output <path>] [modules]+"
29 exit 1 29 exit 1
30 } 30 }
31 31
32 SCRIPT_DIR=`dirname $0` 32 SCRIPT_DIR=`dirname $0`
33 PWD=`pwd` 33 PWD=`pwd`
34 cd $SCRIPT_DIR; SCRIPT_DIR=`pwd` 34 cd $SCRIPT_DIR; SCRIPT_DIR=`pwd`
35 cd ../../; TOP=`pwd`; cd $PWD 35 cd ../; TOP=`pwd`; cd $PWD
36 36
37 IDEA_OUTPUT=$TOP/.idea 37 IDEA_OUTPUT=$TOP/.idea
38 VERBOSE="false" 38 VERBOSE="false"
39 while [ $# -gt 0 ] 39 while [ $# -gt 0 ]
40 do 40 do
68 68
69 IDEA_MAKE="$TOP/make/idea" 69 IDEA_MAKE="$TOP/make/idea"
70 IDEA_TEMPLATE="$IDEA_MAKE/template" 70 IDEA_TEMPLATE="$IDEA_MAKE/template"
71 IML_TEMPLATE="$IDEA_TEMPLATE/jdk.iml" 71 IML_TEMPLATE="$IDEA_TEMPLATE/jdk.iml"
72 ANT_TEMPLATE="$IDEA_TEMPLATE/ant.xml" 72 ANT_TEMPLATE="$IDEA_TEMPLATE/ant.xml"
73 MISC_TEMPLATE="$IDEA_TEMPLATE/misc.xml"
73 IDEA_IML="$IDEA_OUTPUT/jdk.iml" 74 IDEA_IML="$IDEA_OUTPUT/jdk.iml"
74 IDEA_ANT="$IDEA_OUTPUT/ant.xml" 75 IDEA_ANT="$IDEA_OUTPUT/ant.xml"
76 IDEA_MISC="$IDEA_OUTPUT/misc.xml"
75 77
76 if [ "$VERBOSE" = "true" ] ; then 78 if [ "$VERBOSE" = "true" ] ; then
77 echo "output dir: $IDEA_OUTPUT" 79 echo "output dir: $IDEA_OUTPUT"
78 echo "idea template dir: $IDEA_TEMPLATE" 80 echo "idea template dir: $IDEA_TEMPLATE"
79 fi 81 fi
118 folder="`echo "$SOURCE_FOLDER" | sed -e s@"\(.*/\)####\(.*\)"@"\1$relativePath\2"@`" 120 folder="`echo "$SOURCE_FOLDER" | sed -e s@"\(.*/\)####\(.*\)"@"\1$relativePath\2"@`"
119 printf "%s\n" "$folder" >> $IDEA_IML 121 printf "%s\n" "$folder" >> $IDEA_IML
120 } 122 }
121 123
122 ### Generate project iml 124 ### Generate project iml
123 RELATIVE_BUILD_DIR="`dirname $SPEC | sed -e s@"$TOP/\(.*$\)"@"\1"@`"
124 rm -f $IDEA_IML 125 rm -f $IDEA_IML
125 while IFS= read -r line 126 while IFS= read -r line
126 do 127 do
127 if echo "$line" | egrep "^ .* <sourceFolder.*####" > /dev/null ; then 128 if echo "$line" | egrep "^ .* <sourceFolder.*####" > /dev/null ; then
128 if [ "$SOURCE_FOLDERS_DONE" = "false" ] ; then 129 if [ "$SOURCE_FOLDERS_DONE" = "false" ] ; then
129 SOURCE_FOLDERS_DONE="true" 130 SOURCE_FOLDERS_DONE="true"
130 for root in $MODULE_ROOTS; do 131 for root in $MODULE_ROOTS; do
131 addSourceFolder $root 132 addSourceFolder $root
132 done 133 done
133 fi 134 fi
134 elif echo "$line" | egrep "^ .* <excludeFolder.*####" > /dev/null ; then
135 ul="`echo "$line" | sed -e s@"\(.*/\)####\(.*\)"@"\1$RELATIVE_BUILD_DIR\2"@`"
136 printf "%s\n" "$ul" >> $IDEA_IML
137 else 135 else
138 printf "%s\n" "$line" >> $IDEA_IML 136 printf "%s\n" "$line" >> $IDEA_IML
139 fi 137 fi
140 done < "$IML_TEMPLATE" 138 done < "$IML_TEMPLATE"
141 139
153 DIR=`dirname $SPEC` 151 DIR=`dirname $SPEC`
154 mn="`echo "$BUILD_DIR" | sed -e s@"\(.*\)####\(.*\)"@"\1$DIR\2"@`" 152 mn="`echo "$BUILD_DIR" | sed -e s@"\(.*\)####\(.*\)"@"\1$DIR\2"@`"
155 printf "%s\n" "$mn" >> $IDEA_ANT 153 printf "%s\n" "$mn" >> $IDEA_ANT
156 } 154 }
157 155
158 JTREG_HOME=" <property name=\"jtreg.home\" value=\"####\" />"
159
160 addJtregHome() {
161 DIR=`dirname $SPEC`
162 mn="`echo "$JTREG_HOME" | sed -e s@"\(.*\)####\(.*\)"@"\1$JT_HOME\2"@`"
163 printf "%s\n" "$mn" >> $IDEA_ANT
164 }
165
166 ### Generate ant.xml 156 ### Generate ant.xml
167 157
168 rm -f $IDEA_ANT 158 rm -f $IDEA_ANT
169 while IFS= read -r line 159 while IFS= read -r line
170 do 160 do
171 if echo "$line" | egrep "^ .* <property name=\"module.name\"" > /dev/null ; then 161 if echo "$line" | egrep "^ .* <property name=\"module.name\"" > /dev/null ; then
172 addModuleName 162 addModuleName
173 elif echo "$line" | egrep "^ .* <property name=\"jtreg.home\"" > /dev/null ; then
174 addJtregHome
175 elif echo "$line" | egrep "^ .* <property name=\"build.target.dir\"" > /dev/null ; then 163 elif echo "$line" | egrep "^ .* <property name=\"build.target.dir\"" > /dev/null ; then
176 addBuildDir 164 addBuildDir
177 else 165 else
178 printf "%s\n" "$line" >> $IDEA_ANT 166 printf "%s\n" "$line" >> $IDEA_ANT
179 fi 167 fi
180 done < "$ANT_TEMPLATE" 168 done < "$ANT_TEMPLATE"
169
170 ### Generate misc.xml
171
172 rm -f $IDEA_MISC
173
174 JTREG_HOME=" <path>####</path>"
175
176 IMAGES_DIR=" <jre alt=\"true\" value=\"####\" />"
177
178 addImagesDir() {
179 DIR=`dirname $SPEC`/images/jdk
180 mn="`echo "$IMAGES_DIR" | sed -e s@"\(.*\)####\(.*\)"@"\1$DIR\2"@`"
181 printf "%s\n" "$mn" >> $IDEA_MISC
182 }
183
184 addJtregHome() {
185 DIR=`dirname $SPEC`
186 mn="`echo "$JTREG_HOME" | sed -e s@"\(.*\)####\(.*\)"@"\1$JT_HOME\2"@`"
187 printf "%s\n" "$mn" >> $IDEA_MISC
188 }
189
190 rm -f $MISC_ANT
191 while IFS= read -r line
192 do
193 if echo "$line" | egrep "^ .*<path>jtreg_home</path>" > /dev/null ; then
194 addJtregHome
195 elif echo "$line" | egrep "^ .*<jre alt=\"true\" value=\"images_jdk\"" > /dev/null ; then
196 addImagesDir
197 else
198 printf "%s\n" "$line" >> $IDEA_MISC
199 fi
200 done < "$MISC_TEMPLATE"
181 201
182 ### Compile the custom Logger 202 ### Compile the custom Logger
183 203
184 CLASSES=$IDEA_OUTPUT/classes 204 CLASSES=$IDEA_OUTPUT/classes
185 205