public class DependenciesGenerator extends java.lang.Object implements FileListener, BuildGenerator, ContextAware
FileManager. It then create makefilesFileManager| Constructor and Description |
|---|
DependenciesGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
createAll()
Create all Makefiles in all the directories registered
with the
FileManager. |
void |
createMakefileInDirectory(java.lang.String dependfilename,
java.lang.String dirname)
Create a single makefile in a specific directory.
|
protected java.lang.String |
defaultDependencyFilename()
Return the default file name.
|
protected java.lang.String |
defaultFilename()
Return the default file name.
|
protected java.lang.String |
defaultPackageDependencyFilename() |
java.util.Set |
getLanguages()
Return the set of languages that this build generator serves.
|
void |
newFile(SymbolID id,
int type,
java.lang.String role,
java.lang.String dir,
java.lang.String name)
This method is called for each file created by the
FileManager. |
void |
setContext(Context context)
Routine to notify extensions of the context.
|
protected void |
writeMakefile(java.io.PrintWriter pw,
java.util.Map role2files,
java.util.HashMap fileData)
Generate the actual make file.
|
public void newFile(SymbolID id, int type, java.lang.String role, java.lang.String dir, java.lang.String name)
FileManager.newFile in interface FileListenerid - the file is related to this symbol id.type - this indicates the type of the symbol. A constant
from Type.role - this describes the role the file plays. For example,
the file could be a STUBSRCS file or a
IMPLSRCS file. The role strings used
are determined by the backend.dir - the path (relative or absolute) of the directory where
the file will be created.name - the name of the file not including any directory
information. The complete name of the file should
be dir + name.public void createAll()
throws java.io.IOException
FileManager.createAll in interface BuildGeneratorjava.io.IOException - the message contained is the concatenation of
all IOExceptions thrown by createMakefileInDirectoryFileManagerpublic void createMakefileInDirectory(java.lang.String dependfilename,
java.lang.String dirname)
throws java.io.IOException
FileManager class.dependfilename - set makefile name, if null or "", defaults to
<make-prefix> + "babel.make"dirname - directory to look forjava.io.IOException - if problems are encountered with the file system.FileManagerprotected void writeMakefile(java.io.PrintWriter pw,
java.util.Map role2files,
java.util.HashMap fileData)
fileData: - keyed by filename(leaf) and valued by prerequisite filenames
in a List.protected java.lang.String defaultFilename()
protected java.lang.String defaultDependencyFilename()
protected java.lang.String defaultPackageDependencyFilename()
public java.util.Set getLanguages()
BuildGeneratorgetLanguages in interface BuildGeneratorSet of strings. Each string in the set
represents a language supported by the build generator.public void setContext(Context context)
ContextAwaresetContext in interface ContextAware