gov.llnl.babel.backend
Class DependenciesGenerator
java.lang.Object
gov.llnl.babel.backend.DependenciesGenerator
- BuildGenerator, ContextAware, FileListener
public class DependenciesGenerator
extends java.lang.Object
This class is used to generate makefiles but may
be amenable to extension to other types of build files.
gets the database of generated files from the
FileManager
. It then create makefiles
DependenciesGenerator
public DependenciesGenerator()
createAll
public void createAll()
throws IOException
Create all Makefiles in all the directories registered
with the FileManager
.
- createAll in interface BuildGenerator
createMakefileInDirectory
public void createMakefileInDirectory(String dependfilename,
String dirname)
throws IOException
Create a single makefile in a specific directory.
This will do nothing if there are no files defined
in that directory according to the FileManager
class.
dependfilename
- set makefile name, if null or "", defaults to
<make-prefix> + "babel.make"dirname
- directory to look for
defaultDependencyFilename
protected String defaultDependencyFilename()
Return the default file name. This method can be
overridden in derived classes if a different default
name is preferred.
- value of the make file name
defaultFilename
protected String defaultFilename()
Return the default file name. This method can be
overridden in derived classes if a different default
name is preferred.
- value of the make file name
defaultPackageDependencyFilename
protected String defaultPackageDependencyFilename()
writeMakefile
protected void writeMakefile(PrintWriter pw,
Map role2files,
HashMap fileData)
Generate the actual make file.
This method can be overridden for tools other than make
provided that whatever files are generated exist in
the same directory as the sourcecode.