We also include notes about various configuration management issues.
gigascale.eecs.berkeley.edu
. Access to the Ptolemy CVS
Repository is by invitation only. We consider software releases a
form of publication, so we would like to be sure our software is
of suitable quality.
Instructions for setting up your parallel tree can be found at
http://www.gigascale.org/ptexternal/
mkdir ~/public_html/privateAn alternative name is
~/public_html/local
.htaccess
file that limits access:
cd ~/public_html/private ln -s /usr/local/apache/htaccess/ohmCluster .htaccess
ln -s ~/ptII .
cvs delete -f Foo.java cvs commit -m "Moved Foo to new directory blah" Foo.java makefile
cd blah cvs add Foo.java cvs commit -m "Moved Foo from oldblah directory" Foo.java makefile
cd $PTII make glimpse glimpse -H $PTII Foo
ptII/vendors
, which we do not distribute.
Packages that are large or have restricted copyrights (such as GPL)
should go into ptII/vendors
.
Large packages should optionally be placed in a separate repository
and a directory in $PTII/vendors
should be created
that contains a README.txt
file that describes how
to obtain the package (either by download or by using cvs).
For example, JHDL is a large package that is used
by the code generator.
$PTII/vendors/jhdl/README.txt
would desribe how to
get JHDL. In this case, it says to use cvs
so
that $PTII/vendors/jhdl/ptjhdllib
is created.
$PTII/configure
would then be modified to
look $PTII/vendors/jhdl/ptjhdllib
for the pieces that it
needs.
$PTII/configure.in
to generate
$PTII/configure
.
During the build process, users run
$PTII/configure
which
reads in
$PTII/mk/ptII.mk.in
and substitutes in makefile variables and creates
$PTII/mk/ptII.mk
.
The primary method is to look for a directory that contains the external package. Another method is to compile a program that uses the package and see if it works. Usually, all you need to do is to try to compile a file that imports the package. The javasound and java3d portions of configure.in try to compile files from $PTII/conf that contain the appropriate import statements.
Below is a rough outline of the steps necessary to add a package. by looking for a directory. In general, your best bet is to find a similar package that has already been added and mimic that setup.
$PTII/mk/ptII.mk.in
and add three variables for your package:
# KVM is the JDK for PalmOS, see # http://java.sun.com/products/kvm KVM_CLASSES = @KVM_CLASSES@ # Directory that contains the kvm used by PalmOS KVM_DIR = @KVM_DIR@ # Set to kvm and used in $PTII/ptolemy/makefile if the PalmOS KVM was found PTKVM_DIR = @PTKVM_DIR@
$PTII/configure.in
and add a new section for your package. It is easiest to
copy a section for an existing package. There are many small
design decisions to be made here:
cd $PTII rm -f config.status config.cache; autoconf; ./configureuntil you get the settings in
ptII.mk
right.
PTKVM_DIR
makefile variable in the makefile
above your package to determine whether make runs
in your Ptolemy II code.
For example, $PTII/ptolemy/apps/kvm
requires
that kvm be present to compile. configure
sets
the PTKVM_DIR
makefile variable to kvm
if the kvm package was found.
$PTIIptolemy/apps/makefile
uses PTKVM_DIR
in the DIRS
variable
to select whether make goes into the kvm
subdirectory:
# $PTII/configure looks for various packages and sets variables # in $PTII/mk/ptII.mk if these packages are found, otherwise # the variables are empty # # PTKVM_DIR is set to kvm by configure if the kvm runtime was found # PTLEGO_DIR is set to lego if the commapi was found. # PTWABA_DIR is set to waba if waba was found # DIRS = agilent $(PTKVM_DIR) $(PTLEGO_DIR) $(PTWABA_DIR)
KVM_CLASSES
to
set the CLASSPATH:
CLASSPATH="$(ROOT)$(CLASSPATHSEPARATOR)$(KVM_CLASSES)"If you need access to a binary in the external package tree, use the
KVM_DIR
makefile variable
configure
runs, it also reads in
$PTII/bin/ptinvoke.in
and generates
$PTII/bin/ptinvoke
. When make is run in the
bin directory, ptinvoke
is copied to the various
startup scripts like vergil
and ptolemy
.
Note that all the startup scripts share a common body and
use a switch statement to select the appropriate jar files
at runtime.
ptinvoke.in
issues
Last Updated: $Date: 2003/04/05 00:06:09 $