|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator
public class GnuMakefileGenerator
This is a specialized makefile generator that takes advantage of the extensions present in Gnu Make.
Nested Class Summary | |
---|---|
class |
GnuMakefileGenerator.ResourceDeltaVisitor
This class walks the delta supplied by the build system to determine what resources have been changed. |
Field Summary | |
---|---|
static int |
ABSOLUTE
|
static java.lang.String |
ECHO_BLANK_LINE
|
static int |
PROJECT_RELATIVE
|
static int |
PROJECT_SUBDIR_RELATIVE
|
Fields inherited from interface org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator |
---|
AT, COLON, COLS_PER_LINE, COMMENT_SYMBOL, DASH, DEP_EXT, DEPFILE_NAME, DOLLAR_SYMBOL, DOT, ECHO, IN_MACRO, LINEBREAK, LOGICAL_AND, MAKE, MAKEFILE_DEFS, MAKEFILE_INIT, MAKEFILE_NAME, MAKEFILE_TARGETS, MODFILE_NAME, NEWLINE, NO_PRINT_DIR, NO_SOURCE_FOLDERS, OBJECTS_MAKFILE, OUT_MACRO, ROOT, SEPARATOR, SINGLE_QUOTE, SPACES_IN_PATH, SRCSFILE_NAME, TAB, WHITESPACE, WILDCARD |
Constructor Summary | |
---|---|
GnuMakefileGenerator()
|
Method Summary | |
---|---|
void |
addMacroAdditionFiles(java.util.HashMap map,
java.lang.String macroName,
java.util.Vector filenames)
|
static boolean |
containsSpecialCharacters(java.lang.String path)
|
java.lang.String |
ensurePathIsGNUMakeTargetRuleCompatibleSyntax(java.lang.String path)
Process a String denoting a filepath in a way compatible for GNU Make rules, handling windows drive letters and whitespace appropriately. |
static java.lang.String |
ensureUnquoted(java.lang.String path)
Strips outermost quotes of Strings of the form "a" and 'a' or returns the original string if the input is not of this form. |
static java.lang.String |
escapedEcho(java.lang.String string)
prepend all instanced of '\' or '"' with a backslash |
static java.lang.String |
escapeWhitespaces(java.lang.String path)
|
void |
generateDependencies()
|
org.eclipse.core.runtime.MultiStatus |
generateMakefiles(org.eclipse.core.resources.IResourceDelta delta)
Clients call this method when an incremental rebuild is required. |
java.util.HashMap |
getBuildOutputVars()
|
java.util.List |
getBuildVariableList(org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator.ToolInfoHolder h,
java.lang.String variable,
int locationType,
org.eclipse.core.runtime.IPath directory,
boolean getAll)
|
org.eclipse.core.runtime.IPath |
getBuildWorkingDir()
Answers the path of the top directory generated for the build output, or null if none has been generated. |
java.lang.StringBuffer |
getDepMacroName(java.lang.String extensionName)
|
java.lang.String |
getMakefileName()
Answers the name of the top-level makefile generated by the receiver. |
java.util.Set |
getOutputExtensions(org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator.ToolInfoHolder h)
|
java.lang.StringBuffer |
getSourceMacroName(java.lang.String extensionName)
M A K E F I L E G E N E R A T I O N C O M M O N M E T H O D S |
org.eclipse.core.runtime.IPath |
getTopBuildDir()
Return the configuration's top build directory as an absolute path |
java.util.LinkedHashMap |
getTopBuildOutputVars()
|
java.util.List |
getTopBuildVariableList(java.lang.String variable)
|
void |
initialize(int buildKind,
IConfiguration cfg,
IBuilder builder,
org.eclipse.core.runtime.IProgressMonitor monitor)
|
void |
initialize(org.eclipse.core.resources.IProject project,
IManagedBuildInfo info,
org.eclipse.core.runtime.IProgressMonitor monitor)
IManagedBuilderMakefileGenerator M E T H O D S |
boolean |
isGeneratedResource(org.eclipse.core.resources.IResource resource)
Answers true if the argument is a resource created by the generator |
static boolean |
populateDummyTargets(IConfiguration cfg,
org.eclipse.core.resources.IFile makefile,
boolean force)
This method postprocesses a .d file created by a build. |
static boolean |
populateDummyTargets(IResourceInfo rcInfo,
org.eclipse.core.resources.IFile makefile,
boolean force)
|
void |
regenerateDependencies(boolean force)
|
org.eclipse.core.runtime.MultiStatus |
regenerateMakefiles()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PROJECT_RELATIVE
public static final int PROJECT_SUBDIR_RELATIVE
public static final int ABSOLUTE
public static java.lang.String ECHO_BLANK_LINE
Constructor Detail |
---|
public GnuMakefileGenerator()
Method Detail |
---|
public void initialize(org.eclipse.core.resources.IProject project, IManagedBuildInfo info, org.eclipse.core.runtime.IProgressMonitor monitor)
initialize
in interface IManagedBuilderMakefileGenerator
public void generateDependencies() throws org.eclipse.core.runtime.CoreException
generateDependencies
in interface IManagedBuilderMakefileGenerator
org.eclipse.core.runtime.CoreException
public org.eclipse.core.runtime.MultiStatus generateMakefiles(org.eclipse.core.resources.IResourceDelta delta) throws org.eclipse.core.runtime.CoreException
IManagedBuilderMakefileGenerator
generateMakefiles
in interface IManagedBuilderMakefileGenerator
org.eclipse.core.runtime.CoreException
public org.eclipse.core.runtime.IPath getBuildWorkingDir()
IManagedBuilderMakefileGenerator
null
if none has been generated.
getBuildWorkingDir
in interface IManagedBuilderMakefileGenerator
IPath
to the working directory of the buildpublic java.lang.String getMakefileName()
IManagedBuilderMakefileGenerator
getMakefileName
in interface IManagedBuilderMakefileGenerator
public boolean isGeneratedResource(org.eclipse.core.resources.IResource resource)
IManagedBuilderMakefileGenerator
true
if the argument is a resource created by the generator
isGeneratedResource
in interface IManagedBuilderMakefileGenerator
public void regenerateDependencies(boolean force) throws org.eclipse.core.runtime.CoreException
regenerateDependencies
in interface IManagedBuilderMakefileGenerator
org.eclipse.core.runtime.CoreException
public org.eclipse.core.runtime.MultiStatus regenerateMakefiles() throws org.eclipse.core.runtime.CoreException
regenerateMakefiles
in interface IManagedBuilderMakefileGenerator
org.eclipse.core.runtime.CoreException
public java.lang.StringBuffer getSourceMacroName(java.lang.String extensionName)
public java.lang.StringBuffer getDepMacroName(java.lang.String extensionName)
public java.util.Set getOutputExtensions(org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator.ToolInfoHolder h)
public static boolean populateDummyTargets(IConfiguration cfg, org.eclipse.core.resources.IFile makefile, boolean force) throws org.eclipse.core.runtime.CoreException, java.io.IOException
true
if the dependency file is modified
org.eclipse.core.runtime.CoreException
java.io.IOException
public static boolean populateDummyTargets(IResourceInfo rcInfo, org.eclipse.core.resources.IFile makefile, boolean force) throws org.eclipse.core.runtime.CoreException, java.io.IOException
org.eclipse.core.runtime.CoreException
java.io.IOException
public static java.lang.String escapedEcho(java.lang.String string)
string
-
public static boolean containsSpecialCharacters(java.lang.String path)
public static java.lang.String escapeWhitespaces(java.lang.String path)
public void addMacroAdditionFiles(java.util.HashMap map, java.lang.String macroName, java.util.Vector filenames)
public java.util.List getBuildVariableList(org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator.ToolInfoHolder h, java.lang.String variable, int locationType, org.eclipse.core.runtime.IPath directory, boolean getAll)
public java.util.List getTopBuildVariableList(java.lang.String variable)
public java.util.HashMap getBuildOutputVars()
public java.util.LinkedHashMap getTopBuildOutputVars()
public org.eclipse.core.runtime.IPath getTopBuildDir()
public java.lang.String ensurePathIsGNUMakeTargetRuleCompatibleSyntax(java.lang.String path)
The context these paths appear in is on the right hand side of a rule header. i.e.
target : dep1 dep2 dep3
path
- the String denoting the path to process
java.lang.NullPointerException
- is path is nullpublic static java.lang.String ensureUnquoted(java.lang.String path)
path
-
java.lang.NullPointerException
- if path is nullpublic void initialize(int buildKind, IConfiguration cfg, IBuilder builder, org.eclipse.core.runtime.IProgressMonitor monitor)
initialize
in interface IManagedBuilderMakefileGenerator2
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |