# HG changeset patch # User apetrusenko # Date 1246033339 25200 # Node ID 00f7ec32f2909d54d897776d494c36874304f1dd # Parent 30b9b25b9cc17147a896d72eaf8b9c3395ab2993 6854027: Precompiled headers are not being updated in Linux/GCC builds Summary: Fixes incorrect handling of precompiled headers in diff mode. Reviewed-by: never, twisti diff -r 30b9b25b9cc1 -r 00f7ec32f290 src/share/tools/MakeDeps/Database.java --- a/src/share/tools/MakeDeps/Database.java Wed Jun 24 11:42:03 2009 -0400 +++ b/src/share/tools/MakeDeps/Database.java Fri Jun 26 09:22:19 2009 -0700 @@ -1,5 +1,5 @@ /* - * Copyright 1999-2005 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1999-2009 Sun Microsystems, Inc. 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 @@ -39,7 +39,6 @@ private HashMap platformDepFiles; private long threshold; private int nOuterFiles; - private int nPrecompiledFiles; private boolean missingOk; private Platform plat; /** These allow you to specify files not in the include database @@ -62,7 +61,6 @@ threshold = t; nOuterFiles = 0; - nPrecompiledFiles = 0; missingOk = false; firstFile = null; lastFile = null; @@ -343,7 +341,6 @@ plat.getGIFileTemplate().getInvDir() + list.getName() + "\""); - nPrecompiledFiles += 1; } } inclFile.println(); @@ -408,22 +405,22 @@ gd.println(); } - if (nPrecompiledFiles > 0) { - // write Precompiled_Files = ... - gd.println("Precompiled_Files = \\"); - for (Iterator iter = grandInclude.iterator(); iter.hasNext(); ) { - FileList list = (FileList) iter.next(); + // write Precompiled_Files = ... + gd.println("Precompiled_Files = \\"); + for (Iterator iter = grandInclude.iterator(); iter.hasNext(); ) { + FileList list = (FileList) iter.next(); + if (list.getCount() >= threshold) { 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 + " \\"); + // make sure changes to the platform dependent file will + // cause regeneration of the pch file. + gd.println(platformDep + " \\"); } } - gd.println(); - gd.println(); } + gd.println(); + gd.println(); gd.println("DTraced_Files = \\"); for (Iterator iter = outerFiles.iterator(); iter.hasNext(); ) { @@ -483,7 +480,6 @@ } if (plat.includeGIDependencies() - && nPrecompiledFiles > 0 && anII.getUseGrandInclude()) { gd.println(" $(Precompiled_Files) \\"); }