1.1 --- a/src/share/tools/ProjectCreator/WinGammaPlatform.java Thu Feb 10 12:55:56 2011 +0100 1.2 +++ b/src/share/tools/ProjectCreator/WinGammaPlatform.java Thu Feb 10 13:03:22 2011 +0100 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -235,13 +235,6 @@ 1.11 (locationsInTree.size() == 0)) { 1.12 filesNotFound.add(fileName); 1.13 } else if (locationsInTree.size() > 1) { 1.14 - // We shouldn't have duplicate file names in our workspace. 1.15 - System.err.println(); 1.16 - System.err.println("There are multiple files named as: " + fileName); 1.17 - System.exit(-1); 1.18 - // The following code could be safely removed if we don't need duplicate 1.19 - // file names. 1.20 - 1.21 // Iterate through them, trying to find one with a 1.22 // preferred path 1.23 search: 1.24 @@ -336,7 +329,7 @@ 1.25 1.26 String projectName = getProjectName(projectFileName, ext); 1.27 1.28 - writeProjectFile(projectFileName, projectName, createAllConfigs()); 1.29 + writeProjectFile(projectFileName, projectName, createAllConfigs(BuildConfig.getFieldString(null, "PlatformName"))); 1.30 } 1.31 1.32 protected void writePrologue(String[] args) { 1.33 @@ -376,7 +369,13 @@ 1.34 HsArgHandler.STRING 1.35 ), 1.36 1.37 - new HsArgRule("-projectFileName", 1.38 + new HsArgRule("-platformName", 1.39 + "PlatformName", 1.40 + null, 1.41 + HsArgHandler.STRING 1.42 + ), 1.43 + 1.44 + new HsArgRule("-projectFileName", 1.45 "ProjectFileName", 1.46 null, 1.47 HsArgHandler.STRING 1.48 @@ -394,12 +393,6 @@ 1.49 HsArgHandler.STRING 1.50 ), 1.51 1.52 - new HsArgRule("-platform", 1.53 - "Platform", 1.54 - null, 1.55 - HsArgHandler.STRING 1.56 - ), 1.57 - 1.58 new HsArgRule("-absoluteInclude", 1.59 "AbsoluteInclude", 1.60 null, 1.61 @@ -590,28 +583,27 @@ 1.62 BuildConfig.putField(null, "PlatformObject", this); 1.63 } 1.64 1.65 - Vector createAllConfigs() { 1.66 + Vector createAllConfigs(String platform) { 1.67 Vector allConfigs = new Vector(); 1.68 1.69 allConfigs.add(new C1DebugConfig()); 1.70 1.71 - boolean b = true; 1.72 - if (b) { 1.73 - allConfigs.add(new C1FastDebugConfig()); 1.74 - allConfigs.add(new C1ProductConfig()); 1.75 + allConfigs.add(new C1FastDebugConfig()); 1.76 + allConfigs.add(new C1ProductConfig()); 1.77 1.78 - allConfigs.add(new C2DebugConfig()); 1.79 - allConfigs.add(new C2FastDebugConfig()); 1.80 - allConfigs.add(new C2ProductConfig()); 1.81 + allConfigs.add(new C2DebugConfig()); 1.82 + allConfigs.add(new C2FastDebugConfig()); 1.83 + allConfigs.add(new C2ProductConfig()); 1.84 1.85 - allConfigs.add(new TieredDebugConfig()); 1.86 - allConfigs.add(new TieredFastDebugConfig()); 1.87 - allConfigs.add(new TieredProductConfig()); 1.88 + allConfigs.add(new TieredDebugConfig()); 1.89 + allConfigs.add(new TieredFastDebugConfig()); 1.90 + allConfigs.add(new TieredProductConfig()); 1.91 1.92 - allConfigs.add(new CoreDebugConfig()); 1.93 - allConfigs.add(new CoreFastDebugConfig()); 1.94 - allConfigs.add(new CoreProductConfig()); 1.95 + allConfigs.add(new CoreDebugConfig()); 1.96 + allConfigs.add(new CoreFastDebugConfig()); 1.97 + allConfigs.add(new CoreProductConfig()); 1.98 1.99 + if (platform.equals("Win32")) { 1.100 allConfigs.add(new KernelDebugConfig()); 1.101 allConfigs.add(new KernelFastDebugConfig()); 1.102 allConfigs.add(new KernelProductConfig());