Tycho has a certain directory structure that you need to know about if you are planning on extending tycho.
tylndir
$TYCHO/bin/tylndir
will create a private directory tree with links to a common Tycho
tree. This allows tycho developers to maintain their own tree and
edit it as they see fit.
For example, to create your own private tree in ~/ty
from
the sources in ~ptdesign/tycho
, do the following:
mkdir ~/ty
cd ~/ty
~ptdesign/tycho/bin/tylndir ~ptdesign/tycho
TYCHO
environment to ~/ty
.
If you are running the C shell, you would type:
setenv TYCHO ~/tyYou could place the above line in your
.cshrc
file so that
it is set each time you log in.
$TYCHO/bin
in your path:
set path = ($TYCHO/bin $path)
tycho
.
tylndir
is not perfect, as it will create links for garbage
files such as ,*
and *~
in your private tree.
It is best if the makefiles do not contain any GNU make extensions so that the makefiles can be used with non-GNU make.
The general structure of a tycho makefile is
ROOT
and
VPATH
.
ROOT
VPATH
$(ROOT)
.
$TYCHO/kernel/makefile
contains:
# Root of Tycho directory ROOT = .. # True source directory VPATH = $(ROOT)/kernel
$TYCHO/mk/tycho.mk
, which is
a makefile that sets common makefile variables. For example:
# Get configuration info CONFIG = $(ROOT)/mk/tycho.mk include $(CONFIG)
TCL_SRCS
.tcl
suffix
ITCL_SRCS
.itcl
suffix
EXTRA_SRCS
$(TCL_SRCS) $(ITCL_SRCS)
. The name
EXTRA_SRCS
is from Ptolemy, it denotes that these files
are not compiled or otherwise processed.
MISC_FILES
MISC_FILES
usually includes
the names of any subdirectories, along with tclIndex
and
any README
files that might be present.
make checkjunk
uses this variable.
DIRS
REALCLEAN_STUFF
make realclean
TYDOC_DESC
all
and install
rule:
all install: sources $(MISC_SRCS) tclIndex
$TYCHO/mk/no-compile.mk
$TYCHO/mk/no-compile.mk
These rules are useful when extending Tycho.
make sources
make sources
will update any files that have changed
in the master tree, but not in the local tree.
make all
make all
does things like create
tclIndex
files, and fix the permissions on scripts.
make all
also runs the make sources
rules.
make install
make install
usually just does whatever
make all
does. In tycho, there is no need to run
make install
after running make all
.
make install
is present only for compatibility with other
packages, such as Ptolemy.
make clean
*.o core *~ *.bak ,*
make realclean
make clean
does, and it
removed any files named in the REALCLEAN_STUFF
makefile
variable. For example, in $TYCHO/kernel/makefile
REALCLEAN_STUFF
is set so that tclIndex
is
removed when make realclean
is run
make extraclean
make realclean
does. Note that to retrieve the sources
automatically after running make extraclean
you need to
have the sources checked into RCS or SCCS. The publically available
distribution of tycho does not include SCCS files, so running this
command is not recommended make extraclean sources
is a
good way to change all the links created by tylndir
into
actual files.
make sccsinfo
make sccsinfo
traverses
the distribution and runs sccs info
in each directory.
sccs info
prints out the names of any files that are checked out.
make checkjunk
make checkjunk
rule traverses the distribution
and prints the names of any files that are not mentioned in the
makefile. This rule is useful for cleaning up the distribution
before release.