Thu, 12 Jun 2008 16:13:01 -0700
6697238: missing dependencies for precompiled headers with platform dependent includes
Reviewed-by: kvn
src/share/tools/MakeDeps/Database.java | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/tools/MakeDeps/Database.java Thu Jun 12 09:47:55 2008 -0700 1.2 +++ b/src/share/tools/MakeDeps/Database.java Thu Jun 12 16:13:01 2008 -0700 1.3 @@ -36,6 +36,7 @@ 1.4 private FileList outerFiles; 1.5 private FileList indivIncludes; 1.6 private FileList grandInclude; // the results for the grand include file 1.7 + private HashMap<String,String> platformDepFiles; 1.8 private long threshold; 1.9 private int nOuterFiles; 1.10 private int nPrecompiledFiles; 1.11 @@ -57,6 +58,7 @@ 1.12 outerFiles = new FileList("outerFiles", plat); 1.13 indivIncludes = new FileList("IndivIncludes", plat); 1.14 grandInclude = new FileList(plat.getGIFileTemplate().nameOfList(), plat); 1.15 + platformDepFiles = new HashMap<String,String>(); 1.16 1.17 threshold = t; 1.18 nOuterFiles = 0; 1.19 @@ -209,6 +211,10 @@ 1.20 FileList p = allFiles.listForFile(includer); 1.21 p.setPlatformDependentInclude(pdName.dirPreStemSuff()); 1.22 1.23 + // Record the implicit include of this file so that the 1.24 + // dependencies for precompiled headers can mention it. 1.25 + platformDepFiles.put(newIncluder, includer); 1.26 + 1.27 // Add an implicit dependency on platform 1.28 // specific file for the generic file 1.29 1.30 @@ -408,6 +414,12 @@ 1.31 for (Iterator iter = grandInclude.iterator(); iter.hasNext(); ) { 1.32 FileList list = (FileList) iter.next(); 1.33 gd.println(list.getName() + " \\"); 1.34 + String platformDep = platformDepFiles.get(list.getName()); 1.35 + if (platformDep != null) { 1.36 + // make sure changes to the platform dependent file will 1.37 + // cause regeneration of the pch file. 1.38 + gd.println(platformDep + " \\"); 1.39 + } 1.40 } 1.41 gd.println(); 1.42 gd.println();