From f68ca9f38768f9428f580d089e72e1068edc2b0c Mon Sep 17 00:00:00 2001 From: never Date: Thu, 12 Jun 2008 16:13:01 -0700 Subject: [PATCH] 6697238: missing dependencies for precompiled headers with platform dependent includes Reviewed-by: kvn --- src/share/tools/MakeDeps/Database.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/share/tools/MakeDeps/Database.java b/src/share/tools/MakeDeps/Database.java index c26ef1d6f..5cec93b7d 100644 --- a/src/share/tools/MakeDeps/Database.java +++ b/src/share/tools/MakeDeps/Database.java @@ -36,6 +36,7 @@ public class Database { private FileList outerFiles; private FileList indivIncludes; private FileList grandInclude; // the results for the grand include file + private HashMap platformDepFiles; private long threshold; private int nOuterFiles; private int nPrecompiledFiles; @@ -57,6 +58,7 @@ public class Database { outerFiles = new FileList("outerFiles", plat); indivIncludes = new FileList("IndivIncludes", plat); grandInclude = new FileList(plat.getGIFileTemplate().nameOfList(), plat); + platformDepFiles = new HashMap(); threshold = t; nOuterFiles = 0; @@ -209,6 +211,10 @@ public class Database { FileList p = allFiles.listForFile(includer); p.setPlatformDependentInclude(pdName.dirPreStemSuff()); + // Record the implicit include of this file so that the + // dependencies for precompiled headers can mention it. + platformDepFiles.put(newIncluder, includer); + // Add an implicit dependency on platform // specific file for the generic file @@ -408,6 +414,12 @@ public class Database { for (Iterator iter = grandInclude.iterator(); iter.hasNext(); ) { FileList list = (FileList) iter.next(); gd.println(list.getName() + " \\"); + String platformDep = platformDepFiles.get(list.getName()); + if (platformDep != null) { + // make sure changes to the platform dependent file will + // cause regeneration of the pch file. + gd.println(platformDep + " \\"); + } } gd.println(); gd.println(); -- GitLab