org.eclipse.cdt.managedbuilder.makegen.gnu
Class GnuMakefileGenerator.ResourceDeltaVisitor

java.lang.Object
  extended by org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator.ResourceDeltaVisitor
All Implemented Interfaces:
org.eclipse.core.resources.IResourceDeltaVisitor
Enclosing class:
GnuMakefileGenerator

public class GnuMakefileGenerator.ResourceDeltaVisitor
extends java.lang.Object
implements org.eclipse.core.resources.IResourceDeltaVisitor

This class walks the delta supplied by the build system to determine what resources have been changed. The logic is very simple. If a buildable resource (non-header) has been added or removed, the directories in which they are located are "dirty" so the makefile fragments for them have to be regenerated.

The actual dependencies are recalculated as a result of the build step itself. We are relying on make to do the right things when confronted with a dependency on a moved header file. That said, make will treat the missing header file in a dependency rule as a target it has to build unless told otherwise. These dummy targets are added to the makefile to avoid a missing target error.


Constructor Summary
GnuMakefileGenerator.ResourceDeltaVisitor(GnuMakefileGenerator generator, IConfiguration cfg)
           
GnuMakefileGenerator.ResourceDeltaVisitor(GnuMakefileGenerator generator, IManagedBuildInfo info)
          The constructor
 
Method Summary
 boolean visit(org.eclipse.core.resources.IResourceDelta delta)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GnuMakefileGenerator.ResourceDeltaVisitor

public GnuMakefileGenerator.ResourceDeltaVisitor(GnuMakefileGenerator generator,
                                                 IManagedBuildInfo info)
The constructor


GnuMakefileGenerator.ResourceDeltaVisitor

public GnuMakefileGenerator.ResourceDeltaVisitor(GnuMakefileGenerator generator,
                                                 IConfiguration cfg)
Method Detail

visit

public boolean visit(org.eclipse.core.resources.IResourceDelta delta)
              throws org.eclipse.core.runtime.CoreException
Specified by:
visit in interface org.eclipse.core.resources.IResourceDeltaVisitor
Throws:
org.eclipse.core.runtime.CoreException