author | duke |
Wed, 05 Jul 2017 22:53:30 +0200 | |
changeset 43880 | b5015f742ba6 |
parent 38247 | 6ff550a6307e |
permissions | -rw-r--r-- |
1 | 1 |
/* |
38247
6ff550a6307e
8156018: Hotspot visual studio project generation broken
erikj
parents:
19270
diff
changeset
|
2 |
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved. |
1 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1
diff
changeset
|
21 |
* questions. |
1 | 22 |
* |
23 |
*/ |
|
24 |
||
38247
6ff550a6307e
8156018: Hotspot visual studio project generation broken
erikj
parents:
19270
diff
changeset
|
25 |
package build.tools.projectcreator; |
6ff550a6307e
8156018: Hotspot visual studio project generation broken
erikj
parents:
19270
diff
changeset
|
26 |
|
7397 | 27 |
public class ProjectCreator { |
1 | 28 |
|
13892 | 29 |
public static void usage() { |
30 |
System.out.println("ProjectCreator options:"); |
|
31 |
System.err.println("WinGammaPlatform platform-specific options:"); |
|
32 |
System.err.println(" -sourceBase <path to directory (workspace) " |
|
33 |
+ "containing source files; no trailing slash>"); |
|
34 |
System.err.println(" -dspFileName <full pathname to which .dsp file " |
|
35 |
+ "will be written; all parent directories must " |
|
36 |
+ "already exist>"); |
|
37 |
System.err.println(" -envVar <environment variable to be inserted " |
|
38 |
+ "into .dsp file, substituting for path given in " |
|
39 |
+ "-sourceBase. Example: HotSpotWorkSpace>"); |
|
40 |
System.err.println(" -dllLoc <path to directory in which to put " |
|
15096
3db45569f8c0
8005044: remove crufty '_g' support from HS runtime code
dcubed
parents:
13963
diff
changeset
|
41 |
+ "jvm.dll; no trailing slash>"); |
13892 | 42 |
System.err.println(" If any of the above are specified, " |
43 |
+ "they must all be."); |
|
19270
607d97508c60
8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents:
15096
diff
changeset
|
44 |
System.err.println(" Note: if '-altRelativeInclude' option below is " |
607d97508c60
8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents:
15096
diff
changeset
|
45 |
+ "used, then the '-relativeAltSrcInclude' option must be used " |
607d97508c60
8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents:
15096
diff
changeset
|
46 |
+ "to specify the alternate source dir, e.g., 'src\\closed'"); |
13892 | 47 |
System.err.println(" Additional, optional arguments, which can be " |
48 |
+ "specified multiple times:"); |
|
49 |
System.err.println(" -absoluteInclude <string containing absolute " |
|
50 |
+ "path to include directory>"); |
|
19270
607d97508c60
8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents:
15096
diff
changeset
|
51 |
System.err.println(" -altRelativeInclude <string containing " |
607d97508c60
8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents:
15096
diff
changeset
|
52 |
+ "alternate include directory relative to -envVar>"); |
13892 | 53 |
System.err.println(" -relativeInclude <string containing include " |
54 |
+ "directory relative to -envVar>"); |
|
55 |
System.err.println(" -define <preprocessor flag to be #defined " |
|
56 |
+ "(note: doesn't yet support " + "#define (flag) (value))>"); |
|
57 |
System.err.println(" -perFileLine <file> <line>"); |
|
58 |
System.err.println(" -conditionalPerFileLine <file> <line for " |
|
59 |
+ "release build> <line for debug build>"); |
|
60 |
System.err.println(" (NOTE: To work around a bug in nmake, where " |
|
61 |
+ "you can't have a '#' character in a quoted " |
|
62 |
+ "string, all of the lines outputted have \"#\"" + "prepended)"); |
|
63 |
System.err.println(" -startAt <subdir of sourceBase>"); |
|
64 |
System.err.println(" -ignoreFile <file which won't be able to be " |
|
65 |
+ "found in the sourceBase because it's generated " + "later>"); |
|
66 |
System.err.println(" -additionalFile <file not in database but " |
|
67 |
+ "which should show up in .dsp file>"); |
|
68 |
System.err |
|
69 |
.println(" -additionalGeneratedFile <environment variable of " |
|
70 |
+ "generated file's location> <relative path to " |
|
71 |
+ "directory containing file; no trailing slash> " |
|
72 |
+ "<name of file generated later in the build process>"); |
|
73 |
System.err.println(" -prelink <build> <desc> <cmds>:"); |
|
74 |
System.err |
|
75 |
.println(" Generate a set of prelink commands for the given BUILD"); |
|
76 |
System.err |
|
77 |
.println(" (\"Debug\" or \"Release\"). The prelink description and commands"); |
|
78 |
System.err.println(" are both quoted strings."); |
|
79 |
System.err.println(" Default includes: \".\""); |
|
80 |
System.err |
|
81 |
.println(" Default defines: WIN32, _WINDOWS, \"HOTSPOT_BUILD_USER=$(USERNAME)\""); |
|
82 |
} |
|
1 | 83 |
|
13892 | 84 |
public static void main(String[] args) { |
85 |
try { |
|
86 |
if (args.length < 3) { |
|
87 |
usage(); |
|
88 |
System.exit(1); |
|
89 |
} |
|
1 | 90 |
|
13892 | 91 |
String platformName = args[0]; |
92 |
Class platformClass = Class.forName(platformName); |
|
93 |
WinGammaPlatform platform = (WinGammaPlatform) platformClass |
|
94 |
.newInstance(); |
|
1 | 95 |
|
13892 | 96 |
String[] platformArgs = new String[args.length - 1]; |
97 |
System.arraycopy(args, 1, platformArgs, 0, platformArgs.length); |
|
1 | 98 |
|
13892 | 99 |
// Allow the platform to write platform-specific files |
100 |
platform.createVcproj(platformArgs); |
|
101 |
} catch (Exception e) { |
|
102 |
e.printStackTrace(); |
|
103 |
System.exit(1); |
|
104 |
} |
|
105 |
} |
|
1 | 106 |
} |