|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.babel.backend.Dependencies
Make depends info calculator for all languages. We have a nested map structure: s_dirMap contains elements indexed by dirname and with hashmaps as values. The hashmap values are themselves hashmaps keyed by filename with a value the vector of filenames of prerequisites. Note on terminology: this is about makefile dependency rules of the form output : input where input and output may be lists and may be path qualified or not. It turns out that without a more restrictive definition of the C/C++/fortran code generation, we cannot determine the directory in which the included headers will exist because, for example, the IOR headers may be kept canonically elsewhere and generated by an alternate invocation of babel. Similarly, headers from other sidl packages not included in the same generation step be be anywhere in the filesystem. Thus, the best dependency we can generate is by filenames only on the rhs of the : in a make rule and the rest of the work must be provided by VPATH in gnu make or equivalent. On the whole, the difficulties stem from a deep inconsistency in how various languages are handled. E.g. xml files can always determine the full path to other xml files at babel invocation time. In python and java there is some package structure, but not enough to guarantee anything. In C, etc, the user can pretty much do anything they want.
Field Summary | |
static Dependencies |
s_deps
|
Constructor Summary | |
protected |
Dependencies()
|
Method Summary | |
static void |
addInput(java.lang.String input)
|
static void |
addTargetFile(java.lang.String dirName,
java.lang.String fileName)
|
void |
createAll()
Generate the files needed to support the building of Babel generated files. |
static void |
dumpData()
|
static java.util.HashMap |
getDirectoryData(java.lang.String dirName)
|
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 by the FileManager
for each new file it creates. |
static void |
recordDependency(Symbol symbol)
|
static void |
recordDependency(SymbolID id)
Method for recording makefile dependencies. |
static void |
setOutputDir(java.lang.String outdir)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static Dependencies s_deps
Constructor Detail |
protected Dependencies()
Method Detail |
public static void setOutputDir(java.lang.String outdir)
public static void addTargetFile(java.lang.String dirName, java.lang.String fileName)
public static void addInput(java.lang.String input)
public static java.util.HashMap getDirectoryData(java.lang.String dirName)
public static void dumpData()
public static void recordDependency(SymbolID id)
public static void recordDependency(Symbol symbol)
public void newFile(SymbolID id, int type, java.lang.String role, java.lang.String dir, java.lang.String name)
FileListener
FileManager
for each new file it creates.
newFile
in interface FileListener
id
- 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()
BuildGenerator
babel.make
files
or a Python setup.py for distutils.
createAll
in interface BuildGenerator
public java.util.Set getLanguages()
BuildGenerator
getLanguages
in interface BuildGenerator
Set
of strings. Each string in the set
represents a language supported by the build generator.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |