src/share/tools/ProjectCreator/ProjectCreator.java

Wed, 19 Dec 2012 10:35:08 -0800

author
dcubed
date
Wed, 19 Dec 2012 10:35:08 -0800
changeset 4392
7d42f3b08300
parent 4153
b9a9ed0f8eeb
child 5500
31f3b1e1c5e5
permissions
-rw-r--r--

8005044: remove crufty '_g' support from HS runtime code
Summary: Phase 2 is removing '_g' support from the Runtime code.
Reviewed-by: dcubed, coleenp, hseigel
Contributed-by: ron.durbin@oracle.com

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

mercurial