src/share/tools/ProjectCreator/WinGammaPlatform.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 115,158 **** super(argKey, new SpecificHsArgHandler(argKey, valKey, message, type)); } } ! public abstract class WinGammaPlatform extends Platform { ! public void setupFileTemplates() { ! inclFileTemplate = new FileName(this, ! "incls\\", "_", "", ".incl", "", "" ! ); ! giFileTemplate = new FileName(this, ! "incls\\", "", "_precompiled", ".incl", "", "" ! ); ! gdFileTemplate = new FileName(this, ! "", "", "Dependencies", "", "", "" ! ); ! } ! ! private static String[] suffixes = { ".cpp", ".c" }; ! ! public String[] outerSuffixes() { ! return suffixes; ! } ! ! public String objFileSuffix() { ! return ".obj"; ! } ! ! public String asmFileSuffix() { ! return ".i"; ! } ! ! public String dependentPrefix() { ! return "$(VM_PATH)"; ! } ! ! public boolean includeGIInEachIncl() { ! return false; ! } public boolean fileNameStringEquality(String s1, String s2) { return s1.equalsIgnoreCase(s2); } --- 115,125 ---- super(argKey, new SpecificHsArgHandler(argKey, valKey, message, type)); } } ! public abstract class WinGammaPlatform { public boolean fileNameStringEquality(String s1, String s2) { return s1.equalsIgnoreCase(s2); }
*** 174,185 **** System.err.println(" -define <preprocessor flag to be #defined " + "(note: doesn't yet support " + "#define (flag) (value))>"); System.err.println(" -startAt <subdir of sourceBase>"); System.err.println(" -additionalFile <file not in database but " + ! "which should show up in project file, like " + ! "includeDB_core>"); System.err.println(" -additionalGeneratedFile <absolute path to " + "directory containing file; no trailing slash> " + "<name of file generated later in the build process>"); throw new IllegalArgumentException(); } --- 141,151 ---- System.err.println(" -define <preprocessor flag to be #defined " + "(note: doesn't yet support " + "#define (flag) (value))>"); System.err.println(" -startAt <subdir of sourceBase>"); System.err.println(" -additionalFile <file not in database but " + ! "which should show up in project file>"); System.err.println(" -additionalGeneratedFile <absolute path to " + "directory containing file; no trailing slash> " + "<name of file generated later in the build process>"); throw new IllegalArgumentException(); }
*** 299,329 **** } return name; } - protected boolean databaseAllFilesEqual(Database previousDB, - Database currentDB) { - Iterator i1 = previousDB.getAllFiles().iterator(); - Iterator i2 = currentDB.getAllFiles().iterator(); - - while (i1.hasNext() && i2.hasNext()) { - FileList fl1 = (FileList) i1.next(); - FileList fl2 = (FileList) i2.next(); - if (!fl1.getName().equals(fl2.getName())) { - return false; - } - } - - if (i1.hasNext() != i2.hasNext()) { - // Different lengths - return false; - } - - return true; - } - protected String envVarPrefixedFileName(String fileName, int sourceBaseLen, DirectoryTree tree, Vector preferredPaths, Vector filesNotFound, --- 265,274 ----
*** 372,400 **** return fullPath.substring(len, end); } protected abstract String getProjectExt(); ! public void writePlatformSpecificFiles(Database previousDB, ! Database currentDB, String[] args) throws IllegalArgumentException, IOException { parseArguments(args); String projectFileName = BuildConfig.getFieldString(null, "ProjectFileName"); String ext = getProjectExt(); - // Compare contents of allFiles of previousDB and includeDB. - // If these haven't changed, then skip writing the .vcproj file. - if (false && databaseAllFilesEqual(previousDB, currentDB) && - new File(projectFileName).exists()) { - System.out.println( - " Databases unchanged; skipping overwrite of "+ext+" file." - ); - return; - } - String projectName = getProjectName(projectFileName, ext); writeProjectFile(projectFileName, projectName, createAllConfigs()); } --- 317,334 ---- return fullPath.substring(len, end); } protected abstract String getProjectExt(); ! public void createVcproj(String[] args) throws IllegalArgumentException, IOException { parseArguments(args); String projectFileName = BuildConfig.getFieldString(null, "ProjectFileName"); String ext = getProjectExt(); String projectName = getProjectName(projectFileName, ext); writeProjectFile(projectFileName, projectName, createAllConfigs()); }
*** 405,423 **** } System.err.println(); } - void setInclFileTemplate(FileName val) { - this.inclFileTemplate = val; - } - - void setGIFileTemplate(FileName val) { - this.giFileTemplate = val; - } - - void parseArguments(String[] args) { new ArgsParser(args, new ArgRule[] { new HsArgRule("-sourceBase", --- 339,348 ----
*** 549,558 **** --- 474,489 ---- "IgnoreFile", null, HsArgHandler.HASH ), + new HsArgRule("-ignorePath", + "IgnorePath", + null, + HsArgHandler.VECTOR + ), + new HsArgRule("-additionalFile", "AdditionalFile", null, HsArgHandler.VECTOR ),
*** 563,575 **** String cfg = getCfg(it.get()); if (nextNotKey(it)) { String dir = it.get(); if (nextNotKey(it)) { String fileName = it.get(); - // we ignore files that we know are generated, so we coudn't - // find them in sources - BuildConfig.putFieldHash(cfg, "IgnoreFile", fileName, "1"); BuildConfig.putFieldHash(cfg, "AdditionalGeneratedFile", Util.normalize(dir + Util.sep + fileName), fileName); it.next(); return; --- 494,503 ----
*** 578,593 **** empty(null, "** Error: wrong number of args to -additionalGeneratedFile"); } } ), - new HsArgRule("-includeDB", - "IncludeDB", - null, - HsArgHandler.STRING - ), - new ArgRule("-prelink", new HsArgHandler() { public void handle(ArgIterator it) { if (nextNotKey(it)) { String build = it.get(); --- 506,515 ----