Mercurial > hg > graal-compiler
comparison src/share/tools/MakeDeps/Database.java @ 840:218f6b67f9c5
Merge
author | trims |
---|---|
date | Sat, 11 Jul 2009 03:18:30 -0700 |
parents | 00f7ec32f290 |
children | c18cbe5936b8 |
comparison
equal
deleted
inserted
replaced
817:45c4b1fe45e4 | 840:218f6b67f9c5 |
---|---|
1 /* | 1 /* |
2 * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. | 2 * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 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 | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
37 private FileList indivIncludes; | 37 private FileList indivIncludes; |
38 private FileList grandInclude; // the results for the grand include file | 38 private FileList grandInclude; // the results for the grand include file |
39 private HashMap<String,String> platformDepFiles; | 39 private HashMap<String,String> platformDepFiles; |
40 private long threshold; | 40 private long threshold; |
41 private int nOuterFiles; | 41 private int nOuterFiles; |
42 private int nPrecompiledFiles; | |
43 private boolean missingOk; | 42 private boolean missingOk; |
44 private Platform plat; | 43 private Platform plat; |
45 /** These allow you to specify files not in the include database | 44 /** These allow you to specify files not in the include database |
46 which are prepended and appended to the file list, allowing | 45 which are prepended and appended to the file list, allowing |
47 you to have well-known functions at the start and end of the | 46 you to have well-known functions at the start and end of the |
60 grandInclude = new FileList(plat.getGIFileTemplate().nameOfList(), plat); | 59 grandInclude = new FileList(plat.getGIFileTemplate().nameOfList(), plat); |
61 platformDepFiles = new HashMap<String,String>(); | 60 platformDepFiles = new HashMap<String,String>(); |
62 | 61 |
63 threshold = t; | 62 threshold = t; |
64 nOuterFiles = 0; | 63 nOuterFiles = 0; |
65 nPrecompiledFiles = 0; | |
66 missingOk = false; | 64 missingOk = false; |
67 firstFile = null; | 65 firstFile = null; |
68 lastFile = null; | 66 lastFile = null; |
69 }; | 67 }; |
70 | 68 |
341 if (list.getCount() >= threshold) { | 339 if (list.getCount() >= threshold) { |
342 inclFile.println("# include \"" + | 340 inclFile.println("# include \"" + |
343 plat.getGIFileTemplate().getInvDir() + | 341 plat.getGIFileTemplate().getInvDir() + |
344 list.getName() + | 342 list.getName() + |
345 "\""); | 343 "\""); |
346 nPrecompiledFiles += 1; | |
347 } | 344 } |
348 } | 345 } |
349 inclFile.println(); | 346 inclFile.println(); |
350 inclFile.close(); | 347 inclFile.close(); |
351 } | 348 } |
406 } | 403 } |
407 gd.println(); | 404 gd.println(); |
408 gd.println(); | 405 gd.println(); |
409 } | 406 } |
410 | 407 |
411 if (nPrecompiledFiles > 0) { | 408 // write Precompiled_Files = ... |
412 // write Precompiled_Files = ... | 409 gd.println("Precompiled_Files = \\"); |
413 gd.println("Precompiled_Files = \\"); | 410 for (Iterator iter = grandInclude.iterator(); iter.hasNext(); ) { |
414 for (Iterator iter = grandInclude.iterator(); iter.hasNext(); ) { | 411 FileList list = (FileList) iter.next(); |
415 FileList list = (FileList) iter.next(); | 412 if (list.getCount() >= threshold) { |
416 gd.println(list.getName() + " \\"); | 413 gd.println(list.getName() + " \\"); |
417 String platformDep = platformDepFiles.get(list.getName()); | 414 String platformDep = platformDepFiles.get(list.getName()); |
418 if (platformDep != null) { | 415 if (platformDep != null) { |
419 // make sure changes to the platform dependent file will | 416 // make sure changes to the platform dependent file will |
420 // cause regeneration of the pch file. | 417 // cause regeneration of the pch file. |
421 gd.println(platformDep + " \\"); | 418 gd.println(platformDep + " \\"); |
422 } | 419 } |
423 } | 420 } |
424 gd.println(); | 421 } |
425 gd.println(); | 422 gd.println(); |
426 } | 423 gd.println(); |
427 | 424 |
428 gd.println("DTraced_Files = \\"); | 425 gd.println("DTraced_Files = \\"); |
429 for (Iterator iter = outerFiles.iterator(); iter.hasNext(); ) { | 426 for (Iterator iter = outerFiles.iterator(); iter.hasNext(); ) { |
430 FileList anOuterFile = (FileList) iter.next(); | 427 FileList anOuterFile = (FileList) iter.next(); |
431 | 428 |
481 } | 478 } |
482 } | 479 } |
483 } | 480 } |
484 | 481 |
485 if (plat.includeGIDependencies() | 482 if (plat.includeGIDependencies() |
486 && nPrecompiledFiles > 0 | |
487 && anII.getUseGrandInclude()) { | 483 && anII.getUseGrandInclude()) { |
488 gd.println(" $(Precompiled_Files) \\"); | 484 gd.println(" $(Precompiled_Files) \\"); |
489 } | 485 } |
490 gd.println(); | 486 gd.println(); |
491 gd.println(); | 487 gd.println(); |