diff --git a/build/org.eclipse.cdt.managedbuilder.core/ChangeLog b/build/org.eclipse.cdt.managedbuilder.core/ChangeLog index 10e93913c77..da23a568865 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/ChangeLog +++ b/build/org.eclipse.cdt.managedbuilder.core/ChangeLog @@ -1,3 +1,13 @@ +2004-03-09 Sean Evoy + Fix for bugzilla 45311: "CVS tries to check in contents of build output" + + The managed make builder generates the output directories, and the makefiles + for those directories. Those files should be tagged as "derived" so that the + CM system will ignore the files on check-in. Now, that is done when a new + build directory or file is added to the project. The workspace will take care + of files created by the build process through the Ignored Resources + extension point. + 2004-03-08 Sean Evoy Committing the changes needed by our partners to better support a variety of tool references. A class hierarchy of tool references has been introduced. diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java index 7c1a6f5eb89..a7730b7eb5e 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java @@ -877,7 +877,12 @@ public class MakefileGenerator { return subdirList; } - /* (non-javadoc) + /* (non-Javadoc) + * Return or create the folder needed for the build output. If we are + * creating the folder, set the derived bit to true so the CM system + * ignores the contents. If the resource exists, respect the existing + * derived setting. + * * @param string * @return IPath */ @@ -885,7 +890,6 @@ public class MakefileGenerator { // Create or get the handle for the build directory IFolder folder = project.getFolder(dirName); if (!folder.exists()) { - // Make sure that parent folders exist IPath parentPath = (new Path(dirName)).removeLastSegments(1); // Assume that the parent exists if the path is empty @@ -906,11 +910,22 @@ public class MakefileGenerator { else throw e; } + + // Make sure the folder is marked as derived so it is not added to CM + if (!folder.isDerived()) { + folder.setDerived(true); + } } + return folder.getFullPath(); } - /* (non-javadoc) + /* (non-Javadoc) + * Return or create the makefile needed for the build. If we are creating + * the resource, set the derived bit to true so the CM system ignores + * the contents. If the resource exists, respect the existing derived + * setting. + * * @param makefilePath * @param monitor * @return IFile @@ -926,6 +941,11 @@ public class MakefileGenerator { ByteArrayInputStream contents = new ByteArrayInputStream(new byte[0]); try { newFile.create(contents, false, monitor); + // Make sure the new file is marked as derived + if (!newFile.isDerived()) { + newFile.setDerived(true); + } + } catch (CoreException e) { // If the file already existed locally, just refresh to get contents @@ -934,7 +954,7 @@ public class MakefileGenerator { else throw e; } - + return newFile; }