mkPtolemyTreescript. This section discusses the
mkPtolemyTreescript, see "Using csh aliases to create a Parallel Software Development Tree" on page 1-12 for an alternative method of creating a parallel tree.
In Ptolemy 0.6 and later, the
mkPtolemyTree script and a user supplied
override.mk file to create an entire custom object tree. The tree will have copies of all Ptolemy directories on which the customized installation depends. The script will also set up the
override.mk files needed to build custom
ptcl binaries. Since
mkPtolemyTree runs very fast, you may avoid having to recompile the entire Ptolemy tree, which can take 3 hours on a fast workstation.
1.4.1 mkPtolemyTree example
mkPtolemytree command usage is:
$PTOLEMY/mk/ptbin.mkcontains a list of the makefile variables that can be set to bring in the various domains.
$PTOLEMYto point to the Ptolemy distribution, in this example, the Ptolemy distribution is at /users/ptolemy:
$PTARCHto the appropriate value:
mkPtolemyTreecommand so that the
override.mkfile is used to create a custom tree in the
TKindicates that you want to include Tcl/Tk extensions to the domains. Setting
HOFmeans that you want to include the higher-order functions domain. The higher-order functions domain is used in many demonstrations to configure stars with multiple portholes and to specify scalable systems. So, adding these make variables in the same
override.mkfile would make it look like the following:
$PTOLEMY/src/stars.mkcontains a makefile variable named
stars.mk, each feature, such as
VHDLadds directories to
CUSTOM_DIRS. Also a feature can require sub-features, and the sub-features can add directories to
CUSTOM_DIRS. For example,
CGadds more directories to
When you run
$PTOLEMY/bin/mkPtolemyTree, the following events occur:
override.mkfile that the user specifies, the script builds a tree with the directories as specified the value of the
$PTOLEMYtree are copied over if the directory exists using
tar(to save modification times).
CUSTOM_DIRS, we create symbolic links to all the directories that we have not expanded from the
makefilesymbolic links in the obj directories are set correctly.
override.mkfile is copied into the new tree as
NEW_ROOTis the root path name of the tree we are constructing.
override.mkfiles are constructed that reference
make installis run in
/obj.$PTARCH/which creates the hard link for the libraries in
/lib.$PTARCHand builds the custom
PTOLEMYenvironment variable to this new tree and
pigiwill run your custom
Currently the Tcl libraries and Tycho are not expanded but are accessible via symbolic links. To have the utility expand the
$PTOLEMY/lib/tcldirectory, add the following line to your
There is no documentation of the variables to pull in each domain yet. In general, it is the standard abbreviation for the domain in capital letter. For example, the Synchronous Dataflow (SDF) domain is
SDF, the Discrete-Event (
DE) domain is DE, and so forth. Some of the domains are split up, the entire domain can be brought in by defining FOO
CGCFULL). When defined, they include all of the SDF and CGC functionality, respectively, whereas SDF and CGC include only the basic functionality. The basic version of the SDF domain does not include the image, matrix, Matlab, DSP, and Tcl/Tk stars. If you are attempting to build a pigi that includes the Process Network (PN) domain, then you should add the following to your
override.mkfile used by
pigiExampledirectory to create a custom
pigiRpcwith user added stars. One reason for doing this would be to that on some platforms, stars that have been incrementally linked are not visible from the debugger. Creating a custom
pigiRpcwith the star as a built in star can aid debugging.
$PTOLEMY/src/pigiExample/make.templateand add your stars as described in "Creating a pigiRpc that includes your own stars" on page 1-7.
1.4.4 Known Bugs in mkPtolemyTree
CG56to 1 in your
override.mk. If you happen to have an environment variable called
CG56, this procedure fails because the rule in
stars.mkjust checks whether the variable is defined or not, not what value it has. So, ensure that you have no environment variables that clash with the variables used in
stars.mk, not only check whether a variable like
SDFis defined, but also check its value.
mkPtolemyTreegives you the following message:
/usr/bin. The problem here is that in Ptolemy 0.7, the
mkPtolemyTreescript uses the
echo, which is not portable.
mkPtolemyTreecannot add new directories to an already existing tree, it can only be used to create a brand new parallel tree.
MAKEARCHmay fail when used with a tree that was created with
MAKEARCHmay follow symbolic links into the master tree, where the user does not have write permission.
mkPtolemyTreerequires that the master Ptolemy tree have a fully expanded
obj.$PTARCHdirectory. Otherwise you will get an error about `no sources rule found'.