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

SCM Repository

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

Annotation of /pages/trunk/svn.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2514 - (view) (download) (as text)

1 : blume 2508 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 :     <html>
3 :     <head>
4 :     <title>SML/NJ SVN Howto</title>
5 :     </head>
6 :    
7 :     <body>
8 :     <h1>SML/NJ SVN Howto</h1>
9 :    
10 :     <h3>Repository layout</h3>
11 :    
12 :     The repository hosts a number of semi-independent toplevel trees:
13 :     <ul>
14 :     <li><tt>admin</tt> -- repository administration</li>
15 :     <li><tt>pages</tt> -- the web site</li>
16 :     <li><tt>sml</tt> -- a rump of what used to be the entire SML/NJ source
17 :     tree; it should be checked out as <tt>base</tt> (see below)</li>
18 :     <li><tt>config</tt> -- shell scripts etc. for configuration and
19 :     installation</li>
20 :     <li><tt>MLRISC</tt> -- the MLRISC library</li>
21 :     <li><tt>ckit</tt> -- the CKIT library</li>
22 :     <li><tt>nlffi</tt> -- the NLFFI sources consisting of the runtime
23 :     library (lib) and the generator tool (gen)</li>
24 :     </ul>
25 :     ... and so forth.
26 :    
27 :     <h3>Directory layout</h3>
28 :    
29 :     To compile and install SML/NJ, one needs to create a root directory
30 :     (of arbitrary name, let's call it "root" for the purpose of this
31 :     explanation) and then populate it with various sub-trees by checking
32 :     out parts of this repository (and potentially other repositories).
33 :    
34 :     The default layout populates root with:
35 :     <ul>
36 :     <li>config</li>
37 :     <li>base</li>
38 :     <li>smlnj-lib</li>
39 :     <li>MLRISC</li>
40 :     <li>ml-yacc</li>
41 :     <li>ml-lex</li>
42 :     <li>nlffi</li>
43 :     <li>ckit</li>
44 :     <li>cml</li>
45 :     <li>eXene</li>
46 :     <li>ml-burg</li>
47 :     <li>lexgen</li>
48 :     <li>ml-lpt</li>
49 :     <li>heap2asm</li>
50 :     <li>smlnj-c</li>
51 :     <li>pgraph</li>
52 :     <li>trace-debug-profile</li>
53 :     </ul>
54 :    
55 :     Not all of these trees are always necessary.
56 :    
57 :     <p>
58 :     Let <tt>gf=svn://smlnj-gforge.cs.uchicago.edu</tt>
59 :     and <tt>smlnj=$gf/smlnj</tt>.
60 :    
61 :     <p>
62 :     By default, a tree <tt>T</tt> is obtained by performing
63 :     <pre>
64 :     svn co $smlnj/T/trunk T
65 :     </pre>
66 :     There currently are two exceptions to this:
67 :     <pre>
68 :     svn co $smlnj/sml/trunk base
69 :     svn co $gf/ml-lpt ml-lpt
70 :     </pre>
71 :    
72 :     <h3>Scripts</h3>
73 :    
74 :     We provide a small number of shell scripts to simplify the creation
75 :     and maintenance of the default layout (or custom layouts that are
76 :     variations of the default). These scripts are kept under Subversion
77 :     control themselves (under <tt>$gf/admin</tt>). To use them, do:
78 :     <pre>
79 :     svn co $smlnj/admin admin
80 :     </pre>
81 :     and put the name of the resulting admin directory (which could be
82 :     located anywhere) into your shell's <tt>PATH</tt>.
83 :    
84 :     <dl>
85 :     <dt><b>checkout-all.sh</b></dt>
86 :     <dd>
87 :     To create the default layout, use
88 :     <pre>
89 :     checkout-all.sh root
90 :     </pre>
91 :     This creates the root directory and populates it as described
92 :     above. Without the optional argument, <tt>checkout-all.sh</tt> does
93 :     not create a new root directory and treats the current directory
94 :     "<tt>.</tt>" as the root instead.
95 :    
96 :     <p>
97 :     If some subtrees already exist, then <tt>checkout-all.sh</tt> will
98 :     skip them. This is useful when working on a custom version of one or
99 :     more of the subtrees while using default versions of the remaining
100 :     subtrees. To establish such a setup, first create the root directory
101 :     by hand, create your custom subtrees in whatever fashion desirable,
102 :     and then run <tt>checkout-all.sh</tt> to pull in any remaining
103 :     subtrees from the repository.
104 :     <p>
105 :     The <tt>checkout-all.sh</tt> script takes an optional
106 :     flag <tt>--export</tt> (or simply <tt>-e</tt>). The use of this flag
107 :     switches from <tt>svn checkout</tt> to <tt>svn export</tt>. This is
108 :     useful for obtaining a copy of the sources without Subversion meta
109 :     data.
110 :     </dd>
111 :     <dt><b>refresh-all.sh</b></dt>
112 :     <dd>
113 :     To perform <tt>svn update</tt> on all subtrees, run
114 :     <pre>
115 :     refresh-all.sh
116 :     </pre>
117 :     from within root. This command skips subtrees that are not under
118 :     Subversion control. Like <tt>checkout-all.sh</tt> it takes the root
119 :     directory as an optional argument, the default being the current
120 :     directory.
121 :     </dd>
122 :     <dt><b>stat-all.sh</b></dt>
123 :     <dd>
124 :     Similarly, to perform <tt>svn stat</tt> on all subtrees,
125 :     use <tt>stat-all.sh</tt>. Like the other two
126 :     commands, <tt>stat-all.sh</tt> takes the root directory as an optional
127 :     argument.
128 :     </dd>
129 :     </dl>
130 :    
131 :     <p>
132 :     Commits should be done on a per-tree basis "by hand" (i.e.,
133 :     using <tt>svn commit</tt> and its cousins).
134 :    
135 :    
136 :     <h3> Recipies </h3>
137 :    
138 :     The following are more detailed recipies for performing typical tasks.
139 :     <p>
140 :     <h4>
141 :     I. Preparation
142 :     </h4>
143 :    
144 :     Assume that the path for your local smlnj development directory
145 :     is the value of shell variable <code>SMLDEV</code> (e.g. in my case,
146 :     <code>SMLDEV=~/sml/Dev</code>).
147 :    
148 :     <ol>
149 :     <li>define some shell variables
150 :     <pre>
151 : dbm 2513 $ export gf=svn://smlnj-gforge.cs.uchicago.edu
152 : blume 2508 $ export smlnj=$gf/smlnj
153 :     </pre>
154 :     </li>
155 :     <li>In your <code>$SMLDEV</code> directory, create a directory gf
156 :     <pre>
157 :     $ cd $SMLDEV
158 :     $ mkdir gf
159 :     </pre>
160 :    
161 :     <li>Go to gf and checkout the admin directory
162 :     <pre>
163 :     $ cd gf
164 :     $ svn co $smlnj/admin
165 :     </pre>
166 :     This creates subdirectory gf/admin containing some shell
167 :     scripts to automate checking out the full source code, checking
168 :     status, etc.
169 :     </li>
170 :    
171 :     <li>Add $SMLDEV/gf/admin to your shell PATH.</li>
172 :     </ol>
173 :     <p>
174 :     Of course, you could put this checkout somewhere else, such in your
175 :     personal bin file, or in /usr/local/bin if you have permission. In
176 :     this case, step 4 would not be necessary.
177 :    
178 :    
179 :     <h4>II. To check out a working copy of the trunk smlnj code and build the compiler
180 :     </h4>
181 :     <ol>
182 :     <li>Assuming you are in your development directory, create a working
183 :     directory and check out the required top level subdirectories. This
184 :     can be done in one step by giving checkout-all.sh a directory name
185 :     as an argument, e.g.:
186 :     <pre>
187 :     $ checkout-all.sh smlnj
188 :     </pre>
189 :     </li>
190 :     <li>Change to the new working directory and run the install script:
191 :     <pre>
192 :     $ cd smlnj
193 :     $ config/install.sh
194 :     </pre>
195 :     </li>
196 :     <li>If you do not have an existing ml-yacc in your <code>PATH</code>,
197 :     then this may fail because of the order in which svn checks out
198 :     certain ml-yacc source files. In this case, you can recover by
199 :     executing
200 :     <pre>
201 :     $ touch ml-yacc/src/yacc.grm.sig ml-yacc/src/yacc.grm.sml
202 :     </pre>
203 :     to make these younger than ml-yacc/src/yacc.grm. This is a temporary
204 :     problem until the build scripts are modified to take care of this.
205 :     </li>
206 :     </ol>
207 :    
208 :     <h4>III. To check out a private development branch</h4>
209 :     <p>
210 :     In this example, the branch is named <code>primop-branch-3</code>, and is based
211 :     on the top-level repository directory <code>$smlnj/sml</code>.
212 :    
213 :     <ol>
214 :     <li>To check what branches exist under a top-level directory, like
215 :     <code>sml</code> (= <code>base</code>), do
216 :     <pre>
217 :     $ svn list $gf/sml/branches/
218 :     </pre>
219 :     </li>
220 :     <li>Create target directory, here called primop3, and change to it.
221 :     <pre>
222 :     $ mkdir primop3
223 :     $ cd primop3
224 :     </pre>
225 :     </li>
226 :     <li>In the target primop3 directory do
227 :     <pre>
228 : dbm 2514 $ svn co svn://smlnj-gforge.cs.uchicago.edu/smlnj/sml/branches/primop-branch-3 base
229 : blume 2508 </pre>
230 :     or (given the definition of shell variable <code>smlnj</code> from part I above)
231 :     <pre>
232 :     $ svn co $smlnj/sml/branches/primop-branch-3 base
233 :     </pre>
234 :     This checks out the primop-branch-3 code for the sml directory, locally renamed
235 :     as "base".
236 :     </li>
237 :     <li>Run checkout-all.sh to get the rest of the source code (assuming gf/admin
238 :     has been added to the PATH)
239 :     <pre>
240 :     $ checkout-all.sh
241 :     </pre>
242 :     </li>
243 :     <li>Run config/install.sh to build the compiler.
244 :     </li>
245 :     </ol>
246 :    
247 :     <hr>
248 :     <address>David MacQueen and Matthias Blume</address>
249 :     <!-- Created: Thu Dec 7 15:06:34 CST 2006 -->
250 :     <!-- hhmts start -->
251 : dbm 2514 Last modified: Mon May 7 12:28:48 CDT 2007
252 : blume 2508 <!-- hhmts end -->
253 :     </body>
254 :     </html>

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0