This document describes the XEmacs package called build. Copyright © 2000-2002 Adrian Aichner.

Build Package
*************

This is the XEmacs Build Reference Manual, Version 2.00 (for XEmacs 21.1, 21.4, 21.5), dated 2002-03-07, by Adrian Aichner.

Build Overview
**************

build supports the building process of the XEmacs editor from its sources.

The build process consists of following steps:

 1. Download source code from FTP server or CVS repository.

 2. Configure any attributes of the build process, of the resulting XEmacs executable, and of the XEmacs environment.

 3. Start the make process to build XEmacs, install it, and run the regression tests.

 4. Report on the success or failure of the build, using build-report.

The build command generates a widget-based interface to configure and build XEmacs either using GNU Tools (configure, make) or Microsoft Tools (nmake with command-line options (<= 21.2-b32) or config.inc configuration file (> 21.2-b32)).

Build Installation
******************

You have following three choices to install build (see Installing Packages (xemacs)):

 1. Use the package GUI:

       * In XEmacs Release 21.1:

          Select a download site under

               Options->Manage Packages->Add Download Site

          and after listing available packages with

               Options->Manage Packages->List & Install

          install build with

               Packages->Toggle install `build'
               Packages->Install/Remove Selected

          followed by starting a fresh XEmacs.

       * In XEmacs Beta Release 21.2-bXX:

          Menus have been re-arranged in XEmacs 21.2.

          Select a download site under

               Tools->Packages->Add Download Site

          and after listing available packages with

               Tools->Packages->List and Install

          install build with

               Packages->Toggle install `build'
               Packages->Install/Remove Selected

          followed by starting a fresh XEmacs.

 2. Run XEmacs command

          M-x package-admin-add-binary-package RET BUILD-PACKAGE-TARBALL-PATH RET

     after tarball download with EFS or ftp.

 3. Extract the build tarball(s) into the xemacs-packages hierarchy from your favorite shell.

     bash, csh, ksh, zsh come to mind on UNIX systems; Cygwin's bash, cmd.exe, and command.exe for Windows 95/98/NT/2000.

          cd INSTALLATION-DIRECTORY/xemacs-packages;
          gzip -dc BUILD-PACKAGE-TARBALL-PATH | tar -xvf -

Build XEmacs
************

Accessing Documentation for the Build package
=============================================

You may want to read through the build package info documentation first. It is accessible via links to Info- and HTML-documentation from the initial *Build XEmacs* buffer, which has this:

     Visit info documentation for the XEmacs build package in [XEmacs]
     or on the XEmacs website at
     [http://www.xemacs.org/Documentation/packages/html/build.html]

Saving Multiple Build Settings
==============================

Build settings, introduced in build 2.00, allow you to save all variable settings relevant to building XEmacs under a single name.  This saves time and simplifies the process of building multiple XEmacs versions or configurations.

     Current Build Settings: unknown

     [Load] [Delete] build settings: [Value Menu] default
     [Save] current build settings as: [Value Menu] String: default

Browsing Build Options
======================

Global build options can be browsed next.

     [Browse Build Options ...]

What to Build From and Build With
=================================

You have to decide what to build from:

 1. CVS sources in the XEmacs CVS repository at http://cvs.xemacs.org/.

 2. Tarballs (tar.gz files) on the XEmacs FTP Site http://ftp.xemacs.org/pub/xemacs/ or one of its mirror sites.

and what to build with:

 1. GNU (Alert readers will note: GNU's Not UNIX!)/UNIX tools using configure, make, and cc.

 2. Microsoft tools using nmake and cl, supported by nt/xemacs.mak and, beginning with XEmacs 21.2-b33, nt/config.inc.

These two choices determine which of the following steps will be taken.

     [Build XEmacs From CVS Now]

     [Build XEmacs From Tarballs Now]

As of build version 2.00 a check is performed whether CVS is available.

The user interface to *Build XEmacs from CVS* will only be available if this test (cvs -v) passes.

The cvs client version installed on your system will be displayed below following button.

     [Build XEmacs From CVS Now]

Finally either press the button labeled Build XEmacs From CVS or Build XEmacs From Tarballs.  Only the button labeled according to your choice under the build from: menu will be active. See Build XEmacs and Known Problems of Build.

Each of the following steps allow to return to a previous one with the

     [Go Back]

button to review your choices.

Whether to build from tarballs or CVS sources depends on what the user wants to do with the sources.

  * Tarballs are convenient for building a well-defined release of XEmacs. These tarballs are big and users with slow or expensive network connections should avoid them.

     gzip and tar are required for this method.

  * For users who want to stay in close sync with the development of XEmacs, especially the Beta releases, create patches against files or whole directories, CVS is the way to go.

     You will obviously need to install cvs first.

The choice is yours (unless your access to the Internet is limited by firewalls or disabled IP ports, you don't have gzip/tar, or cvs.).

Build XEmacs From CVS
*********************

The CVS commands to fetch XEmacs source code are run through the XEmacs compile command (see Compilation (xemacs)).

The buffers are named uniquely with the current working directory appropriately set to save the buffers with C-x C-w (M-x write-file) under the XEmacs source directory.

First you have to login to the XEmacs CVS server.

Please do so by pressing following button.

     [CVS Login XEmacs]

If that fails, please send the message generated in the *Warnings* buffer to XEmacs CVS Administrator.

After pressing the

     [CVS Checkout XEmacs]

button (unless you have checked out before) and either one of

     [CVS Update XEmacs To Release]

(as specified with

     [Browse Build CVS Options ...]

) or

     [CVS Update XEmacs To Latest]

(resetting all see Sticky tags (cvs)) you are ready to proceed with

     [Build XEmacs Now ...]

Build XEmacs From Tarballs
**************************

The tarballs chosen with

     [Browse Build Tarball Options ...]

Press

     [Download Build Tarball Set]

to fetch tarballs with EFS, which needs to be installed  (If EFS is not installed you may obtain these tarballs by other means and extract them to the configured directory.), followed by

     [Install Downloaded Build Tarball Set]

to extract tarballs using gzip and tar in a compilation-mode buffer named accordingly (e.g. ???).

Finally press the button either labeled Build XEmacs With GNU Tools or Build XEmacs With Microsoft Tools according to your choice under the build with: menu.  See Build XEmacs.

Build XEmacs With GNU Tools
***************************

Besides GNU make (make) and GNU cc (gcc) XEmacs can be built with the equivalent programs from many UNIX vendors.

The configure (This shell script is on the top-level of the XEmacs source tree, see also configure.usage there.) script, which is run before make, determines the configuration of your system and warns about any problems it finds.

Build XEmacs With Microsoft Tools
*********************************

XEmacs is built using Microsoft's version of make, nmake, and Microsoft's C++ compiler, cl, which are both part of Microsoft Visual Studio  (Version 4.0 or greater is required.).

Up to XEmacs 21.2-b32 all configuration choices are passed on to nmake as command-line options.

XEmacs versions > 21.2-b32 support nt/config.inc which is generated according to user choices made under

     [Browse Build Make ...]

by

     [Generate config.inc]

which you have to save after reviewing it shortly.

Generate XEmacs Build Report
****************************

This is a GUI making use of the build-report feature provided with XEmacs.

When used standalone, you have to first

     [Browse Build Report ...]

to pick up the information for the XEmacs build you would like to generate the report for.

Known Problems of Build
***********************

 1. Activated buttons appear to be inactive.

       * Problem

          The buttons

               [Build XEmacs From CVS Now]

          and

               [Build XEmacs From Tarballs Now]

          don't show as active after being re-activated due to a bug in wid-edit.el in XEmacs 21.1.12 and below.

       * Workaround

          You can easily find which button is active by using TAB runs `widget-forward' or Sh-TAB runs `widget-backward'.

       * Fix

          http://www.xemacs.org/list-archives/xemacs-patches/200010/msg00031.html should fix this problem for later versions of XEmacs.

 2. Inactive buttons appear to be active.

       * Problem

          XEmacs 21.2-b36 and below have another bug which will not render the de-activated button as such.

       * Workaround

          You can easily find which button is active by using TAB runs `widget-forward' or Sh-TAB runs `widget-backward'.

       * Fix

          None as of 2000-10-21.  See http://www.xemacs.org/list-archives/xemacs-beta/200010/msg00194.html.