File: node3.html

package info (click to toggle)
darcs 2.0.2-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 6,400 kB
  • ctags: 1,048
  • sloc: haskell: 24,937; perl: 9,736; sh: 3,369; ansic: 1,913; makefile: 17; xml: 14
file content (324 lines) | stat: -rw-r--r-- 10,647 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Building darcs</TITLE>
<META NAME="description" CONTENT="Building darcs">
<META NAME="keywords" CONTENT="darcs">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="darcs.css">

<LINK REL="next" HREF="node4.html">
<LINK REL="previous" HREF="node2.html">
<LINK REL="up" HREF="darcs.html">
<LINK REL="next" HREF="node4.html">
</HEAD>

<BODY >

<DIV CLASS="navigation"><!--Navigation Panel-->
<A NAME="tex2html325"
  HREF="node4.html">
<IMG WIDTH="22" HEIGHT="22" title="Next"  ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="./next.png"></A> 
<A NAME="tex2html321"
  HREF="darcs.html">
<IMG WIDTH="22" HEIGHT="22" title="Up"  ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="./up.png"></A> 
<A NAME="tex2html315"
  HREF="node2.html">
<IMG WIDTH="22" HEIGHT="22" title="Previous"  ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="./prev.png"></A> 
<A NAME="tex2html323"
  HREF="node1.html">
<IMG WIDTH="22" HEIGHT="22" title="Contents"  ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="./contents.png"></A>  
<BR>
<B> Next:</B> <A NAME="tex2html326"
  HREF="node4.html">Getting started</A>
<B> Up:</B> <A NAME="tex2html322"
  HREF="darcs.html">Darcs 2.0.2 (unknown) Darcs</A>
<B> Previous:</B> <A NAME="tex2html316"
  HREF="node2.html">Introduction</A>
 &nbsp; <B>  <A NAME="tex2html324"
  HREF="node1.html">Contents</A></B> 
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<!--Table of Child-Links-->
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>

<UL CLASS="ChildLinks">
<LI><A NAME="tex2html327"
  HREF="node3.html#SECTION00310000000000000000">Prerequisites</A>
<LI><A NAME="tex2html328"
  HREF="node3.html#SECTION00320000000000000000">Building on Mac&nbsp;OS&nbsp;X</A>
<LI><A NAME="tex2html329"
  HREF="node3.html#SECTION00330000000000000000">Building on Microsoft Windows</A>
<LI><A NAME="tex2html330"
  HREF="node3.html#SECTION00340000000000000000">Building from tarball</A>
<LI><A NAME="tex2html331"
  HREF="node3.html#SECTION00350000000000000000">Building darcs from the repository</A>
<LI><A NAME="tex2html332"
  HREF="node3.html#SECTION00360000000000000000">Submitting patches to darcs</A>
</UL>
<!--End of Table of Child-Links-->
<HR>

<H1><A NAME="SECTION00300000000000000000">
Building darcs</A>
</H1>

<P>
This chapter should walk you through the steps necessary to build darcs for
yourself.  There are in general two ways to build darcs.  One is for
building released versions from tarballs, and the other is to build the
latest and greatest darcs, from the darcs repo itself.

<P>
Please let me know if you have any problems building darcs, or don't have
problems described in this chapter and think there's something obsolete
here, so I can keep this page up-to-date.

<P>

<H1><A NAME="SECTION00310000000000000000">
Prerequisites</A>
</H1>
To build darcs you will need to have <TT>ghc</TT>, the Glorious Glasgow
Haskell Compiler. You should have at the very minimum version 6.4.

<P>
It is a good idea (but not required) to have software installed that provide darcs
network access. The <TT>libwww-dev</TT>, <TT>libwww-ssl-dev</TT> or <TT>libcurl</TT> packages
newer than than 7.18.0 are recommended because they provide pipelining support speed
up HTTP access. They have to be explicitly chosen with <TT>-with-libwww</TT> or
<TT>-with-curl-pipelining</TT>. Otherwise, darcs will automatically look for one of
libcurl, <TT>curl</TT> or <TT>wget</TT>.  You also might want to have scp
available if you want to grab your repos over ssh...

<P>
To use the <code>diff</code> command of darcs, a <code>diff</code> program supporting
options <code>-r</code> (recursive diff) and <code>-N</code> (show new files as
differences against an empty file) is required. The <code>configure</code>
script will look for <code>gdiff</code>, <code>gnudiff</code> and <code>diff</code> in this
order. You can force the use of another program by setting the <code>DIFF</code>
environment variable before running <code>configure</code>.

<P>
To rebuild the documentation (which should not be necessary since it is
included in html form with the tarballs), you will need to have latex
installed, as well as latex2html if you want to build it in html form.

<P>

<H1><A NAME="SECTION00320000000000000000">
Building on Mac&nbsp;OS&nbsp;X</A>
</H1>
To build on Mac&nbsp;OS&nbsp;X, you will need the Apple Developer Tools and the ghc
6.4 package installed.

<P>

<H1><A NAME="SECTION00330000000000000000">
Building on Microsoft Windows</A>
</H1>
To build on Microsoft Windows, you will need:

<P>

<UL>
<LI><A NAME="tex2html3"
  HREF="http://www.mingw.org/">MinGW</A>
which provides the GCC
  toolchain for win32.
</LI>
<LI><A NAME="tex2html4"
  HREF="http://www.mingw.org/msys.shtml">MSYS</A>
which provides
  a unix build environment for win32.  Be sure to download the separate
  msysDTK, autoconf and automake.
</LI>
<LI><A NAME="tex2html5"
  HREF="http://www.gzip.org/zlib/">zlib-1.2.1+</A>
library
  and headers.
</LI>
<LI><A NAME="tex2html6"
  HREF="http://curl.haxx.se/">curl-7.12.2+</A>
library
  and headers.
</LI>
<LI>If building with an SSL enabled curl you will need the OpenSSL
  libraries, unofficial builds are available at
<BR>  <A NAME="tex2html7"
  HREF="http://www.slproweb.com/products/Win32OpenSSL.html">http://www.slproweb.com/products/Win32OpenSSL.html</A>.
</LI>
</UL>

<P>
Copy the zlib and curl libraries and headers to both GHC and MinGW.  GHC
stores C headers in <code>&lt;ghc-dir&gt;/gcc-lib/include</code> and libraries in
<code>&lt;ghc-dir&gt;/gcc-lib</code>.  MinGW stores headers in
<code>&lt;mingw-dir&gt;/include</code> and libraries in <code>&lt;mingw-dir&gt;/lib</code>.

<P>
Set PATH to include the <code>&lt;msys-dir&gt;/bin</code>, <code>&lt;mingw-dir&gt;/bin</code>,
<code>&lt;curl-dir&gt;</code>, and a directory containing a pre-built darcs.exe if you
want the build's patch context stored for `<code>darcs --exact-version</code>'.

<P>
<PRE>
C:\darcs&gt; cd &lt;darcs-source-dir&gt;
C:\darcs&gt; sh

$ export GHC=/c/&lt;ghc-dir&gt;/bin/ghc.exe
$ autoconf
$ ./configure --target=mingw
$ make
</PRE>

<P>

<H1><A NAME="SECTION00340000000000000000">
Building from tarball</A>
</H1>
If you get darcs from a tarball, the procedure (after unpacking the tarball
itself) is as follows:
<PRE>
% ./configure
% make
# Optional, but recommended
% make test
% make install
</PRE>

<P>
There are options to configure that you may want to check out with
<PRE>
% ./configure --help
</PRE>

<P>
If your header files are installed in a non-standard location, you may need
to define the <code>CFLAGS</code> and <code>CPPFLAGS</code> environment variables to
include the path to the headers.  e.g. on NetBSD, you may need to run
<PRE>
% CFLAGS=-I/usr/pkg/include CPPFLAGS=-I/usr/pkg/include ./configure
</PRE>

<P>

<H1><A NAME="SECTION00350000000000000000">
Building darcs from the repository</A>
</H1>
To build the latest darcs from its repository, you will first need a
working copy of Darcs 2. You can get darcs using:
<PRE>
% darcs get -v http://darcs.net/
</PRE>
and once you have the darcs repository you can bring it up to date with a
<PRE>
% darcs pull
</PRE>

<P>
The repository doesn't hold automatically generated files, which include
the configure script and the HTML documentation, so you need to run
<code>autoconf</code> first.

<P>
You'll need <code>autoconf</code> 2.50 or higher. Some systems have more than one
version of <code>autoconf</code> installed. For example, <code>autoconf</code> may point to
version 2.13, while <code>autoconf259</code>  runs version 2.59.

<P>
Also note that <code>make</code> is really "GNU make". On some systems, such as
the *BSDs, you may need to type <code>gmake</code> instead of make for this to work.

<P>
If you want to create readable documentation you'll need to have latex installed.
<PRE>
% autoconf
% ./configure
% make
% make install
</PRE>

<P>
If you want to tweak the configure options, you'll need to run <TT>  ./configure</TT> yourself after the make, and then run make again.

<P>

<H1><A NAME="SECTION00360000000000000000">
Submitting patches to darcs</A>
</H1>
I know, this doesn't really belong in this chapter, but if you're using the
repository version of darcs it's really easy to submit patches to me using
darcs. In fact, even if you don't know any Haskell, you could submit fixes
or additions to this document (by editing <code>building_darcs.tex</code>) based
on your experience building darcs...

<P>
To do so, just record your changes (which you made in the darcs repository)
<PRE>
% darcs record --no-test
</PRE>
making sure to give the patch a nice descriptive name.  The
<code>--no-test</code> options keeps darcs from trying to run the unit tests,
which can be rather time-consuming.  Then you can send the patch to the
darcs-devel mailing list by email by
<PRE>
% darcs send -u
</PRE>
The darcs repository stores the email address to which patches should be
sent by default.  The email address you see is actually my own, but when
darcs notices that you haven't signed the patch with my GPG key, it will
forward the message to darcs-devel.

<P>

<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A NAME="tex2html325"
  HREF="node4.html">
<IMG WIDTH="22" HEIGHT="22" title="Next"  ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="./next.png"></A> 
<A NAME="tex2html321"
  HREF="darcs.html">
<IMG WIDTH="22" HEIGHT="22" title="Up"  ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="./up.png"></A> 
<A NAME="tex2html315"
  HREF="node2.html">
<IMG WIDTH="22" HEIGHT="22" title="Previous"  ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="./prev.png"></A> 
<A NAME="tex2html323"
  HREF="node1.html">
<IMG WIDTH="22" HEIGHT="22" title="Contents"  ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="./contents.png"></A>  
<BR>
<B> Next:</B> <A NAME="tex2html326"
  HREF="node4.html">Getting started</A>
<B> Up:</B> <A NAME="tex2html322"
  HREF="darcs.html">Darcs 2.0.2 (unknown) Darcs</A>
<B> Previous:</B> <A NAME="tex2html316"
  HREF="node2.html">Introduction</A>
 &nbsp; <B>  <A NAME="tex2html324"
  HREF="node1.html">Contents</A></B> </DIV>
<!--End of Navigation Panel-->
<ADDRESS>
David Roundy
2008-06-23
</ADDRESS>
</BODY>
</HTML>