Add a couple of exceptions to .gitignore
[packages] / xemacs-packages / build / build.texi
1 \input texinfo   @c -*-texinfo-*-
2 @c %**start of header
3 @setfilename build.info
4 @settitle XEmacs Build Reference Manual
5 @dircategory Emacs
6 @direntry
7 * Build: (build).      Build XEmacs from within (UNIX, Windows).
8 @end direntry
9 @c footnotestyle separate
10 @c paragraphindent 2
11 @c %**end of header
12 @setchapternewpage odd
13 @ifinfo
14 This document describes the XEmacs package called build.
15 Copyright @copyright{} 2000-2002 Adrian Aichner.
16 @end ifinfo
17
18 @c @c Combine indices.
19 @c @synindex cp fn
20 @c @syncodeindex vr fn
21 @c @syncodeindex ky fn
22 @c @syncodeindex pg fn
23 @c @syncodeindex tp fn
24
25 @titlepage
26 @c @sp 10
27 @c @comment The title is printed in a large font.
28 @c @center @titlefont{Build}
29 @c @c The following two commands start the copyright page.
30 @c @page
31 @c @vskip 0pt plus 1filll
32 @c Copyright @copyright{} 2000-2002 Adrian Aichner.
33 @title XEmacs Build Reference Manual
34 @subtitle Version 2.00 (for XEmacs 21.1, 21.4, 21.5), dated 2002-03-07
35
36 @author by Adrian Aichner
37 @page
38 @vskip 0pt plus 1filll
39 @sp 2
40 @c Version 3.3 @*
41 @c Revised for XEmacs Versions 21.0,@*
42 @c April 1998.@*
43
44 Permission is granted to make and distribute verbatim copies of this
45 manual provided the copyright notice and this permission notice are
46 preserved on all copies.
47
48 Permission is granted to copy and distribute modified versions of this
49 manual under the conditions for verbatim copying, provided also that the
50 section entitled ``GNU General Public License'' is included
51 exactly as in the original, and provided that the entire resulting
52 derived work is distributed under the terms of a permission notice
53 identical to this one.
54
55 Permission is granted to copy and distribute translations of this manual
56 into another language, under the above conditions for modified versions,
57 except that the section entitled ``GNU General Public License'' may be
58 included in a translation approved by the Free Software Foundation
59 instead of in the original English.
60 @end titlepage
61 @node Top, Build Overview, , (dir)
62 @comment node-name, next,          previous, up
63 @chapter Build Package
64
65 This is the XEmacs Build Reference Manual, Version 2.00 (for XEmacs
66 21.1, 21.4, 21.5), dated 2002-03-07, by @email{adrian@@xemacs.org,
67 Adrian Aichner}.
68
69 @menu
70 * Build Overview::                    Overview of build package
71 * Build Installation::                Installation of the build package
72 * Build XEmacs::                      Choosing source and tools          
73 * Build XEmacs From CVS::             Fetching sources with CVS
74 * Build XEmacs From Tarballs::        Fetching source tarballs with EFS
75 * Build XEmacs With GNU Tools::       UNIX-style build using configure, make
76 * Build XEmacs With Microsoft Tools:: Microsoft build using MS VC++ >= 4.0
77 * Generate XEmacs Build Report::      Reporting Success or Failure
78 * Known Problems of Build::           Problems, Workarounds, and Fixes
79 * Concept Index::                     An item for each concept
80 @end menu
81
82 @node Build Overview, Build Installation, Top, (dir)
83 @comment node-name,     next,          previous, up
84 @chapter Build Overview
85 @cindex What build is
86
87 @code{build} supports the building process of the XEmacs editor from its
88 sources.
89
90 @cindex XEmacs build process
91
92 The build process consists of following steps:
93
94 @enumerate
95
96 @item
97 Download source code from FTP server or CVS repository.
98
99 @item
100 Configure any attributes of the build process, of the resulting XEmacs
101 executable, and of the XEmacs environment.
102
103 @item
104 Start the make process to build XEmacs, install it, and run the
105 regression tests.
106
107 @item
108 Report on the success or failure of the build, using build-report.
109
110 @end enumerate
111
112 The @code{build} command generates a widget-based interface to configure
113 and build XEmacs either using GNU Tools (@code{configure}, @code{make})
114 or Microsoft Tools (@code{nmake} with command-line options (<= 21.2-b32)
115 or @file{config.inc} configuration file (> 21.2-b32)).
116
117 @node Build Installation, Build XEmacs, Build Overview, (dir)
118 @comment node-name,     next,          previous, up
119 @chapter Build Installation
120 @cindex How to install build
121
122 You have following three choices to install build (@pxref{Installing
123 Packages, Installing Packages, , xemacs}):
124
125 @enumerate
126
127 @item
128 Use the package GUI:
129
130 @itemize @bullet
131
132 @item
133 In XEmacs Release 21.1:
134
135 Select a download site under
136
137 @example
138 Options->Manage Packages->Add Download Site
139 @end example
140
141 and after listing available packages with
142
143 @example
144 Options->Manage Packages->List & Install
145 @end example
146
147 install @code{build} with
148
149 @example
150 Packages->Toggle install `build'
151 Packages->Install/Remove Selected
152 @end example
153
154 followed by starting a fresh XEmacs.
155
156 @item
157 In XEmacs Beta Release 21.2-bXX:
158
159 Menus have been re-arranged in XEmacs 21.2.
160
161 Select a download site under
162
163 @example
164 Tools->Packages->Add Download Site
165 @end example
166
167 and after listing available packages with
168
169 @example
170 Tools->Packages->List and Install
171 @end example
172
173 install @code{build} with
174
175 @example
176 Packages->Toggle install `build'
177 Packages->Install/Remove Selected
178 @end example
179   
180 followed by starting a fresh XEmacs.
181
182 @end itemize
183
184 @item
185 Run XEmacs command
186
187 @example
188 @kbd{M-x package-admin-add-binary-package @key{RET} @var{build-package-tarball-path} @key{RET}}
189 @end example
190
191 after tarball download with EFS or ftp.
192
193 @item
194
195 Extract the build tarball(s) into the xemacs-packages hierarchy from
196 your favorite shell.
197
198 @code{bash}, @code{csh}, @code{ksh}, @code{zsh} come to mind on UNIX
199 systems; Cygwin's @code{bash}, @code{cmd.exe}, and @code{command.exe}
200 for Windows 95/98/NT/2000.
201
202 @example
203 @kbd{cd @var{installation-directory}/xemacs-packages;
204 gzip -dc @var{build-package-tarball-path} | tar -xvf -}
205 @end example
206  
207 @end enumerate
208
209 @node Build XEmacs, Build XEmacs From CVS, Build Installation, Top
210 @comment node-name,    next,  previous,      up
211 @chapter Build XEmacs
212
213 @cindex Accessing Documentation
214 @section Accessing Documentation for the Build package
215
216 You may want to read through the build package info documentation first.
217 It is accessible via links to Info- and HTML-documentation from the
218 initial *Build XEmacs* buffer, which has this:
219
220 @example
221 Visit info documentation for the XEmacs build package in [XEmacs]
222 or on the XEmacs website at
223 [http://www.xemacs.org/Documentation/packages/html/build.html]
224 @end example
225
226 @cindex build-settings
227 @cindex build settings
228 @section Saving Multiple Build Settings
229
230 Build settings, introduced in build 2.00, allow you to save all variable
231 settings relevant to building XEmacs under a single name.  This saves
232 time and simplifies the process of building multiple XEmacs versions or
233 configurations.
234
235 @example
236 Current Build Settings: unknown
237
238 [Load] [Delete] build settings: [Value Menu] default
239 [Save] current build settings as: [Value Menu] String: default
240 @end example
241
242 @cindex Browsing Build Options
243 @section Browsing Build Options
244
245 Global build options can be browsed next.
246
247 @example
248 [Browse Build Options ...]
249 @end example
250
251 @cindex build from
252 @section What to Build From and Build With
253
254 You have to decide what to @emph{build from}:
255
256 @enumerate
257
258 @item
259 CVS sources in the XEmacs CVS repository at
260 @uref{http://cvs.xemacs.org/}.
261
262 @item
263 Tarballs (tar.gz files) on the XEmacs FTP Site
264 @uref{http://ftp.xemacs.org/pub/xemacs/} or one of its mirror sites.
265
266 @end enumerate
267
268 @cindex build with
269 and what to @emph{build with}:
270
271 @enumerate
272
273 @item
274 GNU@footnote{Alert readers will note: GNU's Not UNIX!}/UNIX tools using
275 @code{configure}, @code{make}, and @code{cc}.
276
277 @cindex xemacs.mak
278 @item
279 Microsoft tools using @code{nmake} and @code{cl}, supported by
280 @file{nt/xemacs.mak} and, beginning with XEmacs 21.2-b33,
281 @file{nt/config.inc}.
282
283 @end enumerate
284
285 These two choices determine which of the following steps will be taken.
286
287 @example
288 [Build XEmacs From CVS Now]
289 @end example
290
291 @example
292 [Build XEmacs From Tarballs Now]
293 @end example
294
295 As of build version 2.00 a check is performed whether CVS is available.
296
297 The user interface to *Build XEmacs from CVS* will only be available if
298 this test (cvs -v) passes.
299
300 The cvs client version installed on your system will be displayed below
301 following button.
302
303 @example
304 [Build XEmacs From CVS Now]
305 @end example
306
307 Finally either press the button labeled @ref{Build XEmacs From CVS}
308 or @ref{Build XEmacs From Tarballs}.  Only the button labeled according
309 to your choice under the @emph{build from:} menu will be active.
310 See @ref{Build XEmacs} and @ref{Known Problems of Build}.
311
312 Each of the following steps allow to return to a previous one with the
313
314 @cindex Going Back
315 @example
316 [Go Back]
317 @end example
318
319 button to review your choices.
320
321 Whether to build from tarballs or CVS sources depends on what the user
322 wants to do with the sources.
323
324 @itemize @bullet
325
326 @item
327 Tarballs are convenient for building a well-defined release of XEmacs.
328 These tarballs are big and users with slow or expensive network
329 connections should avoid them.
330
331 @code{gzip} and @code{tar} are required for this method.
332
333 @item
334 For users who want to stay in close sync with the development of XEmacs,
335 especially the Beta releases, create patches against files or whole
336 directories, CVS is the way to go.
337
338 You will obviously need to install @code{cvs} first.
339
340 @end itemize
341
342 The choice is yours@footnote{unless your access to the Internet is
343 limited by firewalls or disabled IP ports, you don't have gzip/tar, or
344 cvs.}.
345
346 @node Build XEmacs From CVS, Build XEmacs From Tarballs, Build XEmacs, Top
347 @comment node-name,    next,  previous,      up
348 @chapter Build XEmacs From CVS
349 @cindex Obtaining sources with CVS
350
351 The CVS commands to fetch XEmacs source code are run through the XEmacs
352 @code{compile} command (@pxref{Compilation, , , xemacs}).
353
354 The buffers are named uniquely with the current working directory
355 appropriately set to save the buffers with @kbd{C-x C-w} (@kbd{M-x
356 write-file}) under the XEmacs source directory.
357
358 First you have to login to the XEmacs CVS server.
359
360 Please do so by pressing following button.
361
362 @example
363 [CVS Login XEmacs]
364 @end example
365
366 If that fails, please send the message generated in the *Warnings*
367 buffer to @email{cvs-admin@@xemacs.org, XEmacs CVS Administrator}.
368
369 After pressing the 
370
371 @example
372 [CVS Checkout XEmacs]
373 @end example
374
375 button (unless you have
376 checked out before) and either one of 
377
378 @example
379 [CVS Update XEmacs To Release]
380 @end example
381
382 (as specified with
383
384 @example
385 [Browse Build CVS Options ...]
386 @end example
387
388 ) or
389
390 @example
391 [CVS Update XEmacs To Latest]
392 @end example
393
394 (resetting all @pxref{Sticky tags, , , cvs}) you are ready to proceed
395 with
396
397 @example
398 [Build XEmacs Now ...]
399 @end example
400
401 @node Build XEmacs From Tarballs, Build XEmacs With GNU Tools, Build XEmacs From CVS, Top
402 @comment node-name,    next,  previous,      up
403 @chapter Build XEmacs From Tarballs
404 @cindex Obtaining sources with EFS
405
406 The tarballs chosen with 
407
408 @example
409 [Browse Build Tarball Options ...]
410 @end example
411
412 Press
413
414 @example
415 [Download Build Tarball Set]
416 @end example
417
418 to fetch tarballs with EFS, which needs to be installed @footnote{If EFS
419 is not installed you may obtain these tarballs by other means and
420 extract them to the configured directory.}, followed by
421
422 @example
423 [Install Downloaded Build Tarball Set]
424 @end example
425
426 to extract tarballs using @code{gzip} and @code{tar} in a
427 @code{compilation-mode} buffer named accordingly (e.g. ???).
428
429 Finally press the button either labeled @ref{Build XEmacs With GNU
430 Tools} or @ref{Build XEmacs With Microsoft Tools} according to your
431 choice under the @emph{build with:} menu.  See @ref{Build XEmacs}.
432
433 @node Build XEmacs With GNU Tools, Build XEmacs With Microsoft Tools, Build XEmacs From Tarballs, Top
434 @comment node-name,    next,  previous,      up
435 @chapter Build XEmacs With GNU Tools
436 @cindex Build on UNIX
437 @cindex Build with Cygnus (now Cygwin)
438 @cindex Build with Cygwin
439 @cindex configure
440 @cindex configure.usage
441 @cindex make
442 @cindex gcc
443
444 Besides GNU make (@code{make}) and GNU cc (@code{gcc}) XEmacs can be
445 built with the equivalent programs from many UNIX vendors.
446
447 The @dfn{configure}@footnote{This shell script is on the top-level of
448 the XEmacs source tree, see also configure.usage there.} script, which
449 is run before @code{make}, determines the configuration of your system
450 and warns about any problems it finds.
451
452 @node Build XEmacs With Microsoft Tools, Generate XEmacs Build Report, Build XEmacs With GNU Tools, Top
453 @comment node-name,    next,  previous,      up
454 @chapter Build XEmacs With Microsoft Tools
455 @cindex Build on Windows 95/98/NT/2000
456 @cindex Build with MS Visual Studio C++
457 @cindex nmake
458 @cindex cl
459 @cindex config.inc
460
461 XEmacs is built using Microsoft's version of @code{make}, @dfn{nmake},
462 and Microsoft's C++ compiler, @dfn{cl}, which are both part of Microsoft
463 Visual Studio @footnote{Version 4.0 or greater is required.}.
464
465 Up to XEmacs 21.2-b32 all configuration choices are passed on to
466 @code{nmake} as command-line options.
467
468 XEmacs versions > 21.2-b32
469 support @file{nt/config.inc} which is generated according to user
470 choices made under
471
472 @example
473 [Browse Build Make ...]
474 @end example
475
476 by
477
478 @example
479 [Generate config.inc]
480 @end example
481
482 which you have to save after reviewing it shortly.
483
484 @node Generate XEmacs Build Report, Known Problems of Build, Build XEmacs With Microsoft Tools, Top
485 @comment node-name,    next,  previous,      up
486 @chapter Generate XEmacs Build Report
487
488 This is a GUI making use of the @code{build-report} feature provided
489 with XEmacs.
490
491 When used standalone, you have to first
492
493 @example
494 [Browse Build Report ...]
495 @end example
496
497 to pick up the information for the XEmacs build you would like to
498 generate the report for.
499
500 @c #### If you use @code{build-report} as part of the @code{build} package, you should not save any customized @code{build-report} variables, so that @code{build} can ???
501
502 @node Known Problems of Build, Concept Index, Generate XEmacs Build Report, Top
503 @chapter Known Problems of Build
504 @cindex Limitations
505 @cindex Bugs
506
507 @enumerate
508
509 @item
510 Activated buttons appear to be inactive.
511
512 @itemize @bullet
513
514 @item
515 Problem
516
517 The buttons
518 @example
519 [Build XEmacs From CVS Now]
520 @end example
521 and
522 @example
523 [Build XEmacs From Tarballs Now]
524 @end example
525 don't show as active after being re-activated due to a bug in
526 wid-edit.el in XEmacs 21.1.12 and below.
527
528 @item
529 Workaround
530
531 You can easily find which button is active by using
532 @kbd{TAB} runs `widget-forward'
533 or
534 @kbd{Sh-TAB} runs `widget-backward'.
535
536 @item
537 Fix
538
539 @uref{http://www.xemacs.org/list-archives/xemacs-patches/200010/msg00031.html}
540 should fix this problem for later versions of XEmacs.
541
542 @end itemize
543
544 @item
545 Inactive buttons appear to be active.
546
547 @itemize @bullet
548
549 @item
550 Problem
551
552 XEmacs 21.2-b36 and below have another bug which will not render the
553 de-activated button as such.
554
555 @item
556 Workaround
557
558 You can easily find which button is active by using
559 @kbd{TAB} runs `widget-forward'
560 or
561 @kbd{Sh-TAB} runs `widget-backward'.
562
563 @item
564 Fix
565
566 None as of 2000-10-21.  See
567 @uref{http://www.xemacs.org/list-archives/xemacs-beta/200010/msg00194.html}.
568
569 @end itemize
570
571 @end enumerate
572
573 @node Concept Index, , Known Problems of Build, Top
574 @comment node-name,    next,  previous,      up
575 @unnumbered Concept Index
576 @printindex cp
577 @contents
578 @bye