Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /pages/trunk/svn.html
ViewVC logotype

View of /pages/trunk/svn.html

Parent Directory Parent Directory | Revision Log Revision Log

Revision 3272 - (download) (as text) (annotate)
Wed Feb 18 21:13:36 2009 UTC (10 years, 9 months ago) by jriehl
File size: 8194 byte(s)
Added instructions for anonymous and web access to the Subversion repository.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <title>SML/NJ SVN Howto</title>

    <h1>SML/NJ SVN Howto</h1>

<h3>Repository layout</h3>

The repository hosts a number of semi-independent toplevel trees:
<li><tt>admin</tt> -- repository administration</li>
<li><tt>pages</tt> -- the web site</li>
<li><tt>sml</tt> -- a rump of what used to be the entire SML/NJ source
    tree; it should be checked out as <tt>base</tt> (see below)</li>
<li><tt>config</tt> -- shell scripts etc. for configuration and
<li><tt>MLRISC</tt> -- the MLRISC library</li>
<li><tt>ckit</tt> -- the CKIT library</li>
<li><tt>nlffi</tt> -- the NLFFI sources consisting of the runtime
    library (lib) and the generator tool (gen)</li>
... and so forth.

<h4>Anonymous repository access</h4>

Many of the instructions below assume that you have access to the
Subversion repository.  If you are having trouble with access, you can
do an anonymous check out using the username "anonsvn" and the
password "anonsvn".  For example, to check out the <tt>admin</tt>
tree, you would do the following:

 $ svn co --username anonsvn https://smlnj-gforge.cs.uchicago.edu/svn/smlnj/admin admin

If prompted, use "anonsvn" for the password.  Following this step, you
should be able to use <tt>admin/checkout-all.sh</tt> to get the
remaining source trees without trouble (see below).  More information about
the repository can be found at the <a
GForge SCM page</a>.

<h4>Web access to the repository</h4>

You can also browse the SML/NJ repositories using the
<a href="http://smlnj-gforge.cs.uchicago.edu/scm/viewvc.php/?root=smlnj">ViewVC</a>
page for SML/NJ.

<h3>Directory layout</h3>

To compile and install SML/NJ, one needs to create a root directory
(of arbitrary name, let's call it "root" for the purpose of this
explanation) and then populate it with various sub-trees by checking
out parts of this repository (and potentially other repositories).

The default layout populates root with:

Not all of these trees are always necessary.

Let <tt>gf=https://smlnj-gforge.cs.uchicago.edu/svn</tt>
and <tt>smlnj=$gf/smlnj</tt>.

By default, a tree <tt>T</tt> is obtained by performing
   svn co $smlnj/T/trunk T
There currently are two exceptions to this:
   svn co $smlnj/sml/trunk base
   svn co $gf/ml-lpt/trunk ml-lpt


We provide a small number of shell scripts to simplify the creation
and maintenance of the default layout (or custom layouts that are
variations of the default).  These scripts are kept under Subversion
control themselves (under <tt>$gf/admin</tt>).  To use them, do:
   svn co $smlnj/admin admin
and put the name of the resulting admin directory (which could be
located anywhere) into your shell's <tt>PATH</tt>.

To create the default layout, use
   checkout-all.sh root
This creates the root directory and populates it as described
above. Without the optional argument, <tt>checkout-all.sh</tt> does
not create a new root directory and treats the current directory
"<tt>.</tt>" as the root instead.

If some subtrees already exist, then <tt>checkout-all.sh</tt> will
skip them.  This is useful when working on a custom version of one or
more of the subtrees while using default versions of the remaining
subtrees.  To establish such a setup, first create the root directory
by hand, create your custom subtrees in whatever fashion desirable,
and then run <tt>checkout-all.sh</tt> to pull in any remaining
subtrees from the repository.
The <tt>checkout-all.sh</tt> script takes an optional
flag <tt>--export</tt> (or simply <tt>-e</tt>).  The use of this flag
switches from <tt>svn checkout</tt> to <tt>svn export</tt>.  This is
useful for obtaining a copy of the sources without Subversion meta
To perform <tt>svn update</tt> on all subtrees, run
from within root.  This command skips subtrees that are not under
Subversion control.  Like <tt>checkout-all.sh</tt> it takes the root
directory as an optional argument, the default being the current
Similarly, to perform <tt>svn stat</tt> on all subtrees,
use <tt>stat-all.sh</tt>.  Like the other two
commands, <tt>stat-all.sh</tt> takes the root directory as an optional

Commits should be done on a per-tree basis "by hand" (i.e.,
using <tt>svn commit</tt> and its cousins).

<h3> Recipies </h3>

The following are more detailed recipies for performing typical tasks.
I. Preparation

Assume that the path for your local smlnj development directory
is the value of shell variable <code>SMLDEV</code> (e.g. in my case,

<li>define some shell variables
  $ export gf=https://smlnj-gforge.cs.uchicago.edu/svn
  $ export smlnj=$gf/smlnj
<li>In your <code>$SMLDEV</code> directory, create a directory gf
  $ cd $SMLDEV
  $ mkdir gf

<li>Go to gf and checkout the admin directory
  $ cd gf
  $ svn co $smlnj/admin
This creates subdirectory gf/admin containing some shell
scripts to automate checking out the full source code, checking
status, etc.

<li>Add $SMLDEV/gf/admin to your shell PATH.</li>
Of course, you could put this checkout somewhere else, such in your
personal bin file, or in /usr/local/bin if you have permission. In
this case, step 4 would not be necessary.

<h4>II. To check out a working copy of the trunk smlnj code and build the compiler
<li>Assuming you are in your development directory, create a working
directory and check out the required top level subdirectories. This
can be done in one step by giving checkout-all.sh a directory name
as an argument, e.g.:
  $ checkout-all.sh smlnj
<li>Change to the new working directory and run the install script:
  $ cd smlnj
  $ config/install.sh
<li>If you do not have an existing ml-yacc in your <code>PATH</code>,
then this may fail because of the order in which svn checks out
certain ml-yacc source files. In this case, you can recover by
  $ touch ml-yacc/src/yacc.grm.sig ml-yacc/src/yacc.grm.sml
to make these younger than ml-yacc/src/yacc.grm.  This is a temporary
problem until the build scripts are modified to take care of this.

<h4>III. To check out a private development branch</h4>
In this example, the branch is named <code>primop-branch-3</code>, and is based
on the top-level repository directory <code>$smlnj/sml</code>.

<li>To check what branches exist under a top-level directory, like
<code>sml</code> (= <code>base</code>), do
  $ svn list $smlnj/sml/branches/
<li>Create target directory, here called primop3, and change to it.
  $ mkdir primop3
  $ cd primop3
<li>In the target primop3 directory do
  $ svn co https://smlnj-gforge.cs.uchicago.edu/svn/smlnj/sml/branches/primop-branch-3 base
or (given the definition of shell variable <code>smlnj</code> from part I above) 
  $ svn co $smlnj/sml/branches/primop-branch-3 base
This checks out the primop-branch-3 code for the sml directory, locally renamed
as "base".
<li>Run checkout-all.sh to get the rest of the source code (assuming gf/admin
has been added to the PATH)
  $ checkout-all.sh
<li>Run config/install.sh to build the compiler.

    <address>David MacQueen and Matthias Blume</address>
<!-- Created: Thu Dec  7 15:06:34 CST 2006 -->
<!-- hhmts start -->
Last modified: Wed Feb 18 14:53:26 CST 2009
<!-- hhmts end -->

ViewVC Help
Powered by ViewVC 1.0.0