|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.babel.backend.PackageMakeInfoGenerator
public class PackageMakeInfoGenerator
This class is used to generate a makefile at the top
of the generated source tree (for an invocation of babel)
that tells about the other makefiles/setup.py files in
the tree. It thus has to be maintained consistently
with Makefile and Setup generators.
Gets the database of generated files from the
FileManager
. It then create makefiles
describing the package as generated.
It might be nice to expand this into a fully automatic
gmake based build generator later.
FileManager
,
MakefileGenerator
,
SetupGenerator
Constructor Summary | |
---|---|
PackageMakeInfoGenerator()
|
Method Summary | |
---|---|
void |
createAll()
Create all PackageMakeInfos in all the directories registered with the FileManager . |
void |
createMakefileInDirectory(java.lang.String makefilename,
java.lang.String dirname)
Log that we created a single makefile in a specific directory. |
protected java.lang.String |
defaultFilename()
Return the default file name. |
protected java.lang.String |
defaultPackageFilename()
Return the default package file name. |
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 . |
protected void |
recordMakefile(java.util.Map role2files,
java.lang.String dirname)
Generate the actual make file. |
void |
setContext(Context context)
Routine to notify extensions of the context. |
protected void |
writePackageMakeInfo(java.io.PrintWriter pw,
java.lang.String makefilename)
Generate the package make file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PackageMakeInfoGenerator()
Method Detail |
---|
public void newFile(SymbolID id, int type, java.lang.String role, java.lang.String dir, java.lang.String name)
FileManager
.
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() throws java.io.IOException
FileManager
.
createAll
in interface BuildGenerator
java.io.IOException
- the message contained is the concatenation of
all IOExceptions thrown by createMakefileInDirectoryFileManager
public void createMakefileInDirectory(java.lang.String makefilename, java.lang.String dirname) throws java.io.IOException
FileManager
class.
makefilename
- set makefile name, if null or "", defaults to
<make-prefix> + "babel.make"dirname
- directory to look for
java.io.IOException
- if problems are encountered with the file system.FileManager
protected void recordMakefile(java.util.Map role2files, java.lang.String dirname)
protected void writePackageMakeInfo(java.io.PrintWriter pw, java.lang.String makefilename)
protected java.lang.String defaultFilename()
protected java.lang.String defaultPackageFilename()
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.public void setContext(Context context)
ContextAware
setContext
in interface ContextAware
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |