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

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