hotspot/make/src/classes/build/tools/projectcreator/BuildConfig.java
author vtewari
Tue, 13 Sep 2016 17:00:06 +0530
changeset 40937 f72e61ec734b
parent 38247 6ff550a6307e
permissions -rw-r--r--
8075484: SocketInputStream.socketRead0 can hang even with soTimeout set Reviewed-by: chegar, dsamersoff, msheppar, clanger
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
     2
 * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 3261
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 3261
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: 3261
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
    25
package build.tools.projectcreator;
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
    26
7452
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
    27
import java.util.Enumeration;
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
    28
import java.util.Hashtable;
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
    29
import java.util.Vector;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
class BuildConfig {
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
    32
    @SuppressWarnings("rawtypes")
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
    Hashtable vars;
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
    34
    Vector<String> basicNames, basicPaths;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
    String[] context;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
    static CompilerInterface ci;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
    static CompilerInterface getCI() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
        if (ci == null) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
            String comp = (String)getField(null, "CompilerVersion");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
            try {
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
    42
                ci = (CompilerInterface)Class.forName("build.tools.projectcreator.CompilerInterface" + comp).newInstance();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
            } catch (Exception cnfe) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
                System.err.println("Cannot find support for compiler " + comp);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
                throw new RuntimeException(cnfe.toString());
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
            }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
        return ci;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
    51
    @SuppressWarnings("rawtypes")
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
    protected void initNames(String flavour, String build, String outDll) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
        if (vars == null) vars = new Hashtable();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
        String flavourBuild =  flavour + "_" + build;
8303
81a0b8663748 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 7452
diff changeset
    56
        String platformName = getFieldString(null, "PlatformName");
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    57
        System.out.println();
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    58
        System.out.println(flavourBuild);
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
    59
8303
81a0b8663748 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 7452
diff changeset
    60
        put("Name", getCI().makeCfgName(flavourBuild, platformName));
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
        put("Flavour", flavour);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
        put("Build", build);
8303
81a0b8663748 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 7452
diff changeset
    63
        put("PlatformName", platformName);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
        // ones mentioned above were needed to expand format
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
        String buildBase = expandFormat(getFieldString(null, "BuildBase"));
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
        String sourceBase = getFieldString(null, "SourceBase");
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
    68
        String buildSpace = getFieldString(null, "BuildSpace");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
        String outDir = buildBase;
17382
bba473b81ec0 8008772: remove gamma launcher
twisti
parents: 16447
diff changeset
    70
        String jdkTargetRoot = getFieldString(null, "JdkTargetRoot");
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
    71
        String makeBinary = getFieldString(null, "MakeBinary");
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
    72
        String makeOutput = expandFormat(getFieldString(null, "MakeOutput"));
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
        put("Id", flavourBuild);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
        put("OutputDir", outDir);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
        put("SourceBase", sourceBase);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
        put("BuildBase", buildBase);
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
    78
        put("BuildSpace", buildSpace);
7452
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
    79
        put("OutputDll", outDir + Util.sep + outDll);
17382
bba473b81ec0 8008772: remove gamma launcher
twisti
parents: 16447
diff changeset
    80
        put("JdkTargetRoot", jdkTargetRoot);
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
    81
        put("MakeBinary", makeBinary);
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
    82
        put("MakeOutput", makeOutput);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
        context = new String [] {flavourBuild, flavour, build, null};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
    87
    protected void init(Vector<String> includes, Vector<String> defines) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
        initDefaultDefines(defines);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
        initDefaultCompilerFlags(includes);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
        initDefaultLinkerFlags();
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
    91
        //handleDB();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
    95
    protected void initDefaultCompilerFlags(Vector<String> includes) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
        Vector compilerFlags = new Vector();
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
        compilerFlags.addAll(getCI().getBaseCompilerFlags(getV("Define"),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
                                                          includes,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
                                                          get("OutputDir")));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
        put("CompilerFlags", compilerFlags);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
    protected void initDefaultLinkerFlags() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
        Vector linkerFlags = new Vector();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
8303
81a0b8663748 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 7452
diff changeset
   108
        linkerFlags.addAll(getCI().getBaseLinkerFlags( get("OutputDir"), get("OutputDll"), get("PlatformName")));
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
        put("LinkerFlags", linkerFlags);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   113
    public boolean matchesIgnoredPath(String path) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   114
        Vector<String> rv = new Vector<String>();
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   115
        collectRelevantVectors(rv, "IgnorePath");
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   116
        for (String pathPart : rv) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   117
            if (path.contains(pathPart))  {
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   118
                return true;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   119
            }
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   120
        }
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   121
        return false;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   122
    }
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   123
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   124
    public boolean matchesHidePath(String path) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   125
        Vector<String> rv = new Vector<String>();
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   126
        collectRelevantVectors(rv, "HidePath");
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   127
        for (String pathPart : rv) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   128
            if (path.contains(Util.normalize(pathPart)))  {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   129
                return true;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   130
            }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   131
        }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   132
        return false;
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   133
    }
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   134
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   135
   public Vector<String> matchesAdditionalGeneratedPath(String fullPath) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   136
        Vector<String> rv = new Vector<String>();
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   137
        Hashtable<String, String> v = (Hashtable<String, String>)BuildConfig.getField(this.toString(), "AdditionalGeneratedFile");
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   138
        if (v != null) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   139
            for (Enumeration<String> e=v.keys(); e.hasMoreElements(); ) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   140
                String key = e.nextElement();
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   141
                String val = v.get(key);
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   142
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   143
                if (fullPath.endsWith(expandFormat(key))) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   144
                    rv.add(expandFormat(val));
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
                }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
            }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
        }
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   148
        return rv;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
19270
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   151
    // Returns true if the specified path refers to a relative alternate
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   152
    // source file. RelativeAltSrcInclude is usually "src\closed".
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   153
    public static boolean matchesRelativeAltSrcInclude(String path) {
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   154
        String relativeAltSrcInclude =
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   155
            getFieldString(null, "RelativeAltSrcInclude");
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   156
        Vector<String> v = getFieldVector(null, "AltRelativeInclude");
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
   157
        if (v != null) {
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
   158
            for (String pathPart : v) {
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
   159
                if (path.contains(relativeAltSrcInclude + Util.sep + pathPart))  {
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
   160
                    return true;
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
   161
                }
19270
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   162
            }
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   163
        }
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   164
        return false;
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   165
    }
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   166
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   167
    // Returns the relative alternate source file for the specified path.
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   168
    // Null is returned if the specified path does not have a matching
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   169
    // alternate source file.
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   170
    public static String getMatchingRelativeAltSrcFile(String path) {
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   171
        Vector<String> v = getFieldVector(null, "RelativeAltSrcFileList");
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   172
        if (v == null) {
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   173
            return null;
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   174
        }
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   175
        for (String pathPart : v) {
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   176
            if (path.endsWith(pathPart)) {
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   177
                String relativeAltSrcInclude =
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   178
                    getFieldString(null, "RelativeAltSrcInclude");
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   179
                return relativeAltSrcInclude + Util.sep + pathPart;
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   180
            }
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   181
        }
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   182
        return null;
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   183
    }
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   184
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   185
    // Returns true if the specified path has a matching alternate
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   186
    // source file.
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   187
    public static boolean matchesRelativeAltSrcFile(String path) {
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   188
        return getMatchingRelativeAltSrcFile(path) != null;
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   189
    }
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   190
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   191
    // Track the specified alternate source file. The source file is
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   192
    // tracked without the leading .*<sep><RelativeAltSrcFileList><sep>
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   193
    // part to make matching regular source files easier.
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   194
    public static void trackRelativeAltSrcFile(String path) {
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   195
        String pattern = getFieldString(null, "RelativeAltSrcInclude") +
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   196
            Util.sep;
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   197
        int altSrcInd = path.indexOf(pattern);
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   198
        if (altSrcInd == -1) {
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   199
            // not an AltSrc path
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   200
            return;
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   201
        }
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   202
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   203
        altSrcInd += pattern.length();
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   204
        if (altSrcInd >= path.length()) {
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   205
            // not a valid AltSrc path
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   206
            return;
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   207
        }
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   208
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   209
        String altSrcFile = path.substring(altSrcInd);
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   210
        Vector v = getFieldVector(null, "RelativeAltSrcFileList");
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   211
        if (v == null || !v.contains(altSrcFile)) {
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   212
            addFieldVector(null, "RelativeAltSrcFileList", altSrcFile);
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   213
        }
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   214
    }
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   215
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   216
    void addTo(Hashtable ht, String key, String value) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   217
        ht.put(expandFormat(key), expandFormat(value));
489c9b5090e2 Initial load
duke
parents:
diff changeset
   218
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   219
489c9b5090e2 Initial load
duke
parents:
diff changeset
   220
    void initDefaultDefines(Vector defines) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   221
        Vector sysDefines = new Vector();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   222
        sysDefines.add("WIN32");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   223
        sysDefines.add("_WINDOWS");
8303
81a0b8663748 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 7452
diff changeset
   224
        sysDefines.add("HOTSPOT_BUILD_USER=\\\""+System.getProperty("user.name")+"\\\"");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   225
        sysDefines.add("HOTSPOT_BUILD_TARGET=\\\""+get("Build")+"\\\"");
18025
b7bcf7497f93 8005849: JEP 167: Event-Based JVM Tracing
sla
parents: 17382
diff changeset
   226
        sysDefines.add("INCLUDE_TRACE=1");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   227
        sysDefines.add("_JNI_IMPLEMENTATION_");
8303
81a0b8663748 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 7452
diff changeset
   228
        if (vars.get("PlatformName").equals("Win32")) {
81a0b8663748 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 7452
diff changeset
   229
            sysDefines.add("HOTSPOT_LIB_ARCH=\\\"i386\\\"");
81a0b8663748 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 7452
diff changeset
   230
        } else {
81a0b8663748 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 7452
diff changeset
   231
            sysDefines.add("HOTSPOT_LIB_ARCH=\\\"amd64\\\"");
81a0b8663748 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 7452
diff changeset
   232
        }
35183
30271b37bd14 8145400: ProjectCreator broken after JEP 223 changes
ctornqvi
parents: 27652
diff changeset
   233
        sysDefines.add("DEBUG_LEVEL=\\\"" + get("Build")+"\\\"");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   234
        sysDefines.addAll(defines);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   235
489c9b5090e2 Initial load
duke
parents:
diff changeset
   236
        put("Define", sysDefines);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   237
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   238
489c9b5090e2 Initial load
duke
parents:
diff changeset
   239
    String get(String key) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   240
        return (String)vars.get(key);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   241
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   242
489c9b5090e2 Initial load
duke
parents:
diff changeset
   243
    Vector getV(String key) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   244
        return (Vector)vars.get(key);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   245
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   246
489c9b5090e2 Initial load
duke
parents:
diff changeset
   247
    Object getO(String key) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   248
        return vars.get(key);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   249
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   250
489c9b5090e2 Initial load
duke
parents:
diff changeset
   251
    Hashtable getH(String key) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   252
        return (Hashtable)vars.get(key);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   253
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   254
489c9b5090e2 Initial load
duke
parents:
diff changeset
   255
    Object getFieldInContext(String field) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   256
        for (int i=0; i<context.length; i++) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   257
            Object rv = getField(context[i], field);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   258
            if (rv != null) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   259
                return rv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   260
            }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   261
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   262
        return null;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   263
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   264
489c9b5090e2 Initial load
duke
parents:
diff changeset
   265
    Object lookupHashFieldInContext(String field, String key) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   266
        for (int i=0; i<context.length; i++) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   267
            Hashtable ht = (Hashtable)getField(context[i], field);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   268
            if (ht != null) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   269
                Object rv = ht.get(key);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   270
                if (rv != null) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   271
                    return rv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   272
                }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   273
            }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   274
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   275
        return null;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   276
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   277
489c9b5090e2 Initial load
duke
parents:
diff changeset
   278
    void put(String key, String value) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   279
        vars.put(key, value);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   280
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   281
489c9b5090e2 Initial load
duke
parents:
diff changeset
   282
    void put(String key, Vector vvalue) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   283
        vars.put(key, vvalue);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   284
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   285
489c9b5090e2 Initial load
duke
parents:
diff changeset
   286
    void add(String key, Vector vvalue) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   287
        getV(key).addAll(vvalue);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   288
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   289
489c9b5090e2 Initial load
duke
parents:
diff changeset
   290
    String flavour() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   291
        return get("Flavour");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   292
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   293
489c9b5090e2 Initial load
duke
parents:
diff changeset
   294
    String build() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   295
        return get("Build");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   296
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   297
489c9b5090e2 Initial load
duke
parents:
diff changeset
   298
    Object getSpecificField(String field) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   299
        return getField(get("Id"), field);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   300
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   301
489c9b5090e2 Initial load
duke
parents:
diff changeset
   302
    void putSpecificField(String field, Object value) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   303
        putField(get("Id"), field, value);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   304
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   305
489c9b5090e2 Initial load
duke
parents:
diff changeset
   306
    void collectRelevantVectors(Vector rv, String field) {
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   307
        for (String ctx : context) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   308
            Vector<String> v = getFieldVector(ctx, field);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   309
            if (v != null) {
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   310
                for (String val : v) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   311
                    rv.add(expandFormat(val).replace('/', '\\'));
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   312
                }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   313
            }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   314
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   315
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   316
489c9b5090e2 Initial load
duke
parents:
diff changeset
   317
    void collectRelevantHashes(Hashtable rv, String field) {
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   318
        for (String ctx : context) {
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   319
            Hashtable v = (Hashtable)getField(ctx, field);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   320
            if (v != null) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   321
                for (Enumeration e=v.keys(); e.hasMoreElements(); ) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   322
                    String key = (String)e.nextElement();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   323
                    String val =  (String)v.get(key);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   324
                    addTo(rv, key, val);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   325
                }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   326
            }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   327
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   328
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   329
489c9b5090e2 Initial load
duke
parents:
diff changeset
   330
489c9b5090e2 Initial load
duke
parents:
diff changeset
   331
    Vector getDefines() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   332
        Vector rv = new Vector();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   333
        collectRelevantVectors(rv, "Define");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   334
        return rv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   335
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   336
489c9b5090e2 Initial load
duke
parents:
diff changeset
   337
    Vector getIncludes() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   338
        Vector rv = new Vector();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   339
        collectRelevantVectors(rv, "AbsoluteInclude");
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   340
        rv.addAll(getSourceIncludes());
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   341
        return rv;
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   342
    }
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   343
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   344
    private Vector getSourceIncludes() {
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   345
        Vector<String> rv = new Vector<String>();
19270
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   346
        String sourceBase = getFieldString(null, "SourceBase");
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   347
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   348
        // add relative alternate source include values:
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   349
        String relativeAltSrcInclude =
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   350
            getFieldString(null, "RelativeAltSrcInclude");
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   351
        Vector<String> asri = new Vector<String>();
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   352
        collectRelevantVectors(asri, "AltRelativeInclude");
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   353
        for (String f : asri) {
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   354
            rv.add(sourceBase + Util.sep + relativeAltSrcInclude +
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   355
                   Util.sep + f);
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   356
        }
607d97508c60 8016601: Unable to build hsx24 on Windows using project creator and Visual Studio
dcubed
parents: 18025
diff changeset
   357
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   358
        Vector<String> ri = new Vector<String>();
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   359
        collectRelevantVectors(ri, "RelativeInclude");
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   360
        for (String f : ri) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   361
            rv.add(sourceBase + Util.sep + f);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   362
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   363
        return rv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   364
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   365
489c9b5090e2 Initial load
duke
parents:
diff changeset
   366
    static Hashtable cfgData = new Hashtable();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   367
    static Hashtable globalData = new Hashtable();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   368
489c9b5090e2 Initial load
duke
parents:
diff changeset
   369
    static boolean appliesToTieredBuild(String cfg) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   370
        return (cfg != null &&
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
   371
                cfg.startsWith("server"));
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   372
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   373
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   374
    // Filters out the IgnoreFile and IgnorePaths since they are
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   375
    // handled specially for tiered builds.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   376
    static boolean appliesToTieredBuild(String cfg, String key) {
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   377
        return (appliesToTieredBuild(cfg))&& (key != null && !key.startsWith("Ignore"));
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   378
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   379
489c9b5090e2 Initial load
duke
parents:
diff changeset
   380
    static String getTieredBuildCfg(String cfg) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   381
        assert appliesToTieredBuild(cfg) : "illegal configuration " + cfg;
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
   382
        return "server";
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   383
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   384
489c9b5090e2 Initial load
duke
parents:
diff changeset
   385
    static Object getField(String cfg, String field) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   386
        if (cfg == null) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   387
            return globalData.get(field);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   388
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   389
489c9b5090e2 Initial load
duke
parents:
diff changeset
   390
        Hashtable ht =  (Hashtable)cfgData.get(cfg);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   391
        return ht == null ? null : ht.get(field);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   392
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   393
489c9b5090e2 Initial load
duke
parents:
diff changeset
   394
    static String getFieldString(String cfg, String field) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   395
        return (String)getField(cfg, field);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   396
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   397
489c9b5090e2 Initial load
duke
parents:
diff changeset
   398
    static Vector getFieldVector(String cfg, String field) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   399
        return (Vector)getField(cfg, field);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   400
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   401
489c9b5090e2 Initial load
duke
parents:
diff changeset
   402
    static void putField(String cfg, String field, Object value) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   403
        putFieldImpl(cfg, field, value);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   404
        if (appliesToTieredBuild(cfg, field)) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   405
            putFieldImpl(getTieredBuildCfg(cfg), field, value);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   406
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   407
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   408
489c9b5090e2 Initial load
duke
parents:
diff changeset
   409
    private static void putFieldImpl(String cfg, String field, Object value) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   410
        if (cfg == null) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   411
            globalData.put(field, value);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   412
            return;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   413
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   414
489c9b5090e2 Initial load
duke
parents:
diff changeset
   415
        Hashtable ht = (Hashtable)cfgData.get(cfg);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   416
        if (ht == null) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   417
            ht = new Hashtable();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   418
            cfgData.put(cfg, ht);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   419
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   420
489c9b5090e2 Initial load
duke
parents:
diff changeset
   421
        ht.put(field, value);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   422
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   423
489c9b5090e2 Initial load
duke
parents:
diff changeset
   424
    static Object getFieldHash(String cfg, String field, String name) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   425
        Hashtable ht = (Hashtable)getField(cfg, field);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   426
489c9b5090e2 Initial load
duke
parents:
diff changeset
   427
        return ht == null ? null : ht.get(name);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   428
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   429
489c9b5090e2 Initial load
duke
parents:
diff changeset
   430
    static void putFieldHash(String cfg, String field, String name, Object val) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   431
        putFieldHashImpl(cfg, field, name, val);
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   432
        if (appliesToTieredBuild(cfg, field)) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   433
            putFieldHashImpl(getTieredBuildCfg(cfg), field, name, val);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   434
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   435
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   436
489c9b5090e2 Initial load
duke
parents:
diff changeset
   437
    private static void putFieldHashImpl(String cfg, String field, String name, Object val) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   438
        Hashtable ht = (Hashtable)getField(cfg, field);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   439
489c9b5090e2 Initial load
duke
parents:
diff changeset
   440
        if (ht == null) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   441
            ht = new Hashtable();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   442
            putFieldImpl(cfg, field, ht);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   443
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   444
489c9b5090e2 Initial load
duke
parents:
diff changeset
   445
        ht.put(name, val);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   446
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   447
489c9b5090e2 Initial load
duke
parents:
diff changeset
   448
    static void addFieldVector(String cfg, String field, String element) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   449
        addFieldVectorImpl(cfg, field, element);
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
   450
        if (appliesToTieredBuild(cfg, field)) {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   451
            addFieldVectorImpl(getTieredBuildCfg(cfg), field, element);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   452
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   453
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   454
489c9b5090e2 Initial load
duke
parents:
diff changeset
   455
    private static void addFieldVectorImpl(String cfg, String field, String element) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   456
        Vector v = (Vector)getField(cfg, field);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   457
489c9b5090e2 Initial load
duke
parents:
diff changeset
   458
        if (v == null) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   459
            v = new Vector();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   460
            putFieldImpl(cfg, field, v);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   461
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   462
489c9b5090e2 Initial load
duke
parents:
diff changeset
   463
        v.add(element);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   464
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   465
489c9b5090e2 Initial load
duke
parents:
diff changeset
   466
    String expandFormat(String format) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   467
        if (format == null) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   468
            return null;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   469
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   470
489c9b5090e2 Initial load
duke
parents:
diff changeset
   471
        if (format.indexOf('%') == -1) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   472
            return format;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   473
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   474
489c9b5090e2 Initial load
duke
parents:
diff changeset
   475
        StringBuffer sb = new StringBuffer();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   476
        int len = format.length();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   477
        for (int i=0; i<len; i++) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   478
            char ch = format.charAt(i);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   479
            if (ch == '%') {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   480
                char ch1 = format.charAt(i+1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   481
                switch (ch1) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   482
                case '%':
489c9b5090e2 Initial load
duke
parents:
diff changeset
   483
                    sb.append(ch1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   484
                    break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   485
                case 'b':
489c9b5090e2 Initial load
duke
parents:
diff changeset
   486
                    sb.append(build());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   487
                    break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   488
                case 'f':
489c9b5090e2 Initial load
duke
parents:
diff changeset
   489
                    sb.append(flavour());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   490
                    break;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   491
                default:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   492
                    sb.append(ch);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   493
                    sb.append(ch1);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   494
                }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   495
                i++;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   496
            } else {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   497
                sb.append(ch);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   498
            }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   499
        }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   500
489c9b5090e2 Initial load
duke
parents:
diff changeset
   501
        return sb.toString();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   502
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   503
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   504
489c9b5090e2 Initial load
duke
parents:
diff changeset
   505
abstract class GenericDebugConfig extends BuildConfig {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   506
    abstract String getOptFlag();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   507
489c9b5090e2 Initial load
duke
parents:
diff changeset
   508
    protected void init(Vector includes, Vector defines) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   509
        defines.add("_DEBUG");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   510
        defines.add("ASSERT");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   511
489c9b5090e2 Initial load
duke
parents:
diff changeset
   512
        super.init(includes, defines);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   513
26293
5c7a054e59fe 8027480: Build Windows x64 fastdebug builds using /homeparams
ctornqvi
parents: 19270
diff changeset
   514
        getV("CompilerFlags").addAll(getCI().getDebugCompilerFlags(getOptFlag(), get("PlatformName")));
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   515
        getV("LinkerFlags").addAll(getCI().getDebugLinkerFlags());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   516
   }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   517
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   518
7452
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   519
abstract class GenericDebugNonKernelConfig extends GenericDebugConfig {
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   520
    protected void init(Vector includes, Vector defines) {
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   521
        super.init(includes, defines);
27652
b07e72c58aef 8043491: warning LNK4197: export '... ...' specified multiple times; using first specification
ccheung
parents: 26293
diff changeset
   522
        if (get("PlatformName").equals("Win32")) {
b07e72c58aef 8043491: warning LNK4197: export '... ...' specified multiple times; using first specification
ccheung
parents: 26293
diff changeset
   523
            getCI().getAdditionalNonKernelLinkerFlags(getV("LinkerFlags"));
b07e72c58aef 8043491: warning LNK4197: export '... ...' specified multiple times; using first specification
ccheung
parents: 26293
diff changeset
   524
        }
7452
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   525
   }
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   526
}
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   527
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   528
class C1DebugConfig extends GenericDebugNonKernelConfig {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   529
    String getOptFlag() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   530
        return getCI().getNoOptFlag();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   531
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   532
489c9b5090e2 Initial load
duke
parents:
diff changeset
   533
    C1DebugConfig() {
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
   534
        initNames("client", "debug", "jvm.dll");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   535
        init(getIncludes(), getDefines());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   536
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   537
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   538
7452
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   539
class C1FastDebugConfig extends GenericDebugNonKernelConfig {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   540
    String getOptFlag() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   541
        return getCI().getOptFlag();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   542
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   543
489c9b5090e2 Initial load
duke
parents:
diff changeset
   544
    C1FastDebugConfig() {
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
   545
        initNames("client", "fastdebug", "jvm.dll");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   546
        init(getIncludes(), getDefines());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   547
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   548
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   549
7452
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   550
class TieredDebugConfig extends GenericDebugNonKernelConfig {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   551
    String getOptFlag() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   552
        return getCI().getNoOptFlag();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   553
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   554
489c9b5090e2 Initial load
duke
parents:
diff changeset
   555
    TieredDebugConfig() {
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
   556
        initNames("server", "debug", "jvm.dll");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   557
        init(getIncludes(), getDefines());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   558
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   559
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   560
7452
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   561
class TieredFastDebugConfig extends GenericDebugNonKernelConfig {
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   562
    String getOptFlag() {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   563
        return getCI().getOptFlag();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   564
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   565
489c9b5090e2 Initial load
duke
parents:
diff changeset
   566
    TieredFastDebugConfig() {
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
   567
        initNames("server", "fastdebug", "jvm.dll");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   568
        init(getIncludes(), getDefines());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   569
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   570
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   571
489c9b5090e2 Initial load
duke
parents:
diff changeset
   572
abstract class ProductConfig extends BuildConfig {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   573
    protected void init(Vector includes, Vector defines) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   574
        defines.add("NDEBUG");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   575
        defines.add("PRODUCT");
489c9b5090e2 Initial load
duke
parents:
diff changeset
   576
489c9b5090e2 Initial load
duke
parents:
diff changeset
   577
        super.init(includes, defines);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   578
489c9b5090e2 Initial load
duke
parents:
diff changeset
   579
        getV("CompilerFlags").addAll(getCI().getProductCompilerFlags());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   580
        getV("LinkerFlags").addAll(getCI().getProductLinkerFlags());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   581
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   582
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   583
489c9b5090e2 Initial load
duke
parents:
diff changeset
   584
class C1ProductConfig extends ProductConfig {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   585
    C1ProductConfig() {
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
   586
        initNames("client", "product", "jvm.dll");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   587
        init(getIncludes(), getDefines());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   588
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   589
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   590
489c9b5090e2 Initial load
duke
parents:
diff changeset
   591
class TieredProductConfig extends ProductConfig {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   592
    TieredProductConfig() {
38247
6ff550a6307e 8156018: Hotspot visual studio project generation broken
erikj
parents: 35183
diff changeset
   593
        initNames("server", "product", "jvm.dll");
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   594
        init(getIncludes(), getDefines());
489c9b5090e2 Initial load
duke
parents:
diff changeset
   595
    }
489c9b5090e2 Initial load
duke
parents:
diff changeset
   596
}
489c9b5090e2 Initial load
duke
parents:
diff changeset
   597
13892
9ba13acea673 7163863: Updated projectcreator
neliasso
parents: 11642
diff changeset
   598
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   599
abstract class CompilerInterface {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   600
    abstract Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir);
8303
81a0b8663748 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 7452
diff changeset
   601
    abstract Vector getBaseLinkerFlags(String outDir, String outDll, String platformName);
26293
5c7a054e59fe 8027480: Build Windows x64 fastdebug builds using /homeparams
ctornqvi
parents: 19270
diff changeset
   602
    abstract Vector getDebugCompilerFlags(String opt, String platformName);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   603
    abstract Vector getDebugLinkerFlags();
7452
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   604
    abstract void   getAdditionalNonKernelLinkerFlags(Vector rv);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   605
    abstract Vector getProductCompilerFlags();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   606
    abstract Vector getProductLinkerFlags();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   607
    abstract String getOptFlag();
489c9b5090e2 Initial load
duke
parents:
diff changeset
   608
    abstract String getNoOptFlag();
8303
81a0b8663748 7017824: Add support for creating 64-bit Visual Studio projects
sla
parents: 7452
diff changeset
   609
    abstract String makeCfgName(String flavourBuild, String platformName);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   610
489c9b5090e2 Initial load
duke
parents:
diff changeset
   611
    void addAttr(Vector receiver, String attr, String value) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   612
        receiver.add(attr); receiver.add(value);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   613
    }
7452
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   614
    void extAttr(Vector receiver, String attr, String value) {
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   615
        int attr_pos=receiver.indexOf(attr) ;
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   616
        if ( attr_pos == -1) {
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   617
          // If attr IS NOT present in the Vector - add it
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   618
          receiver.add(attr); receiver.add(value);
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   619
        } else {
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   620
          // If attr IS present in the Vector - append value to it
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   621
          receiver.set(attr_pos+1,receiver.get(attr_pos+1)+value);
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   622
        }
b3fa838286de 7006354: Updates to Visual Studio project creation and development launcher
sla
parents: 7397
diff changeset
   623
    }
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   624
}