public class MakefileWriter
extends soot.SceneTransformer
implements soot.HasPhaseOptions
For a model called Foo, we generate Foo/makefile. in the directory named by the outputDirectory parameter.
Red (cxh) |
Red (cxh) |
Modifier and Type | Method and Description |
---|---|
static void |
addMakefileSubstitution(java.lang.String name,
java.lang.String value)
Add a makefile substitution from the given name to the given value.
|
static java.lang.String |
codeBase(java.lang.String targetPackage,
java.lang.String outputDirectory,
java.lang.String ptIIDirectory)
Convert targetPackage "foo/bar" to codeBase
"../../.."
|
java.lang.String |
getDeclaredOptions() |
java.lang.String |
getDefaultOptions() |
java.lang.String |
getPhaseName() |
protected void |
internalTransform(java.lang.String phaseName,
java.util.Map options)
Generate a makefile to that can be used to run the generated code.
|
static MakefileWriter |
v(CompositeEntity model)
Return an instance of this transformer that will operate on
the given model.
|
public static MakefileWriter v(CompositeEntity model)
public java.lang.String getPhaseName()
getPhaseName
in interface soot.HasPhaseOptions
public java.lang.String getDefaultOptions()
getDefaultOptions
in interface soot.HasPhaseOptions
public java.lang.String getDeclaredOptions()
getDeclaredOptions
in interface soot.HasPhaseOptions
public static void addMakefileSubstitution(java.lang.String name, java.lang.String value)
public static java.lang.String codeBase(java.lang.String targetPackage, java.lang.String outputDirectory, java.lang.String ptIIDirectory)
targetPackage
- The package where we are creating the codeoutputDirectory
- The directory where we are producing code.ptIIDirectory
- The Ptolemy II directory, usually the value
of $PTIIprotected void internalTransform(java.lang.String phaseName, java.util.Map options)
For example, if the model is called MyModel, and this phase is called with:
-p wjtp.makefileWriter targetPackage:foo.bar,outputDirector:c:/tmp,templateDirectory:bifThen we will create the directory c:/tmp/foo/bar/MyModel, read in $PTII/bif/makefile.in and generate c:/tmp/foo/bar/makefile.
internalTransform
in class soot.SceneTransformer
phaseName
- The name of the phase, for example
wjtp.appletWriter
.options
- The options Map.
This transformer uses the following options:
GeneratorAttribute
that contains
the keys and values will we use to update the makefile template with.
c:/ptII/ptolemy/copernicus/applet/cg/Butterfly
ptolemy.copernicus.applet.cg.Butterfly