|
|
1.1 root 1: GNU Emacs Installation Guide
2: Copyright (c) 1988 Free software Foundation, Inc.
3:
4: Permission is granted to anyone to make or distribute verbatim copies
5: of this document as received, in any medium, provided that the
6: copyright notice and permission notice are preserved,
7: and that the distributor grants the recipient permission
8: for further redistribution as permitted by this notice.
9:
10: Permission is granted to distribute modified versions
11: of this document, or of portions of it,
12: under the above conditions, provided also that they
13: carry prominent notices stating who last changed them,
14: and that any new or changed statements about the activities
15: of the Free Software Foundation are approved by the Foundation.
16:
17:
18: PREPARATION
19:
20: 0) Make sure your system has enough swapping space allocated
21: to handle a program whose pure code is 400k bytes or
22: and whose data area is at least 150k and can reach 600k
23: bytes or much more. If the swapping space is insufficient, you
24: will get an error in the command temacs -l loadup inc dump,
25: found in $BUILD/src/ymakefile, or possibly when running the
26: final dumped Emacs.
27:
28: 1) Choose a place in the file structure for the main directory
29: of Emacs code to reside. This will ultimately have
30: subdirectories named src, lisp, etc, etc. Call this name
31: $EMACS. Let $BUILD stand for the name the directory has now.
32:
33: 2) Copy $BUILD/src/config.h-dist to $BUILD/src/config.h,
34: and edit it to set the right options for your system. The file
35: $BUILD/etc/MACHINES may help you decide what to put there.
36: If you need to override any of the definitions in the s- and m-
37: files for your system and machine, do so by editing config.h,
38: not by changing the s- and m- files. Occasionally you may
39: need to redefine parameters used in etc/movemail.c.
40:
41: 3) Declare the place in the file system where Emacs will
42: be once installed. This is done in the file `src/paths.h'.
43: But you don't have to change it yourself. `build-install' and `make'
44: edit `src/paths.h' automatically.
45:
46: If you are using the shell-script `build-install'
47: edit the assignment that sets the variable `EMACS'.
48: If you are using `make' in the main Emacs directory to do
49: the installation, edit the definition of `LIBDIR' in `Makefile'
50: in that directory.
51:
52: If you are doing the building by hand (not using `build-install' or
53: `make') then you yourself must copy $BUILD/src/paths.h-dist to
54: paths.h, and edit it to contain the correct directory names:
55: $EMACS/lisp for the directory for Lisp libraries, and $EMACS/etc for
56: the directory for executables and text files.
57:
58: Emacs will use these names once it has been built.
59: During building, Emacs searches the directory ../lisp for
60: Lisp files before the directories specified in paths.h, and
61: executable files are found in ../etc. So the main Emacs
62: directory $BUILD can be anywhere while Emacs is built, but
63: must be renamed to $EMACS afterwards in order for Emacs to
64: work properly.
65:
66: 4) Look at $BUILD/lisp/paths.el; if some of those values
67: are not right for your system, create a file
68: $BUILD/lisp/site-init.el containing Lisp code to override them.
69: You would use the Lisp function `setq'. For example,
70:
71: (setq news-inews-program "/usr/bin/inews")
72:
73: is how you would override the default value of the
74: variable news-inews-program (which is "/usr/local/inews").
75:
76: 5) Put into $BUILD/lisp/site-init.el any Lisp code
77: you want loaded into Emacs before it is dumped out.
78:
79: This file is nonexistent in the distribution.
80: You do not need to create it, if you have nothing
81: to put in it.
82:
83: 6) Decide what compiler switches to use.
84: For example, if you would like to compile with optimization,
85: you might want to change the definition of CFLAGS in
86: the file $BUILD/src/ymakefile to use C_OPTIMIZE_SWITCH
87: instead of C_DEBUG_SWITCH.
88:
89: Note that many Unix compilers have bugs that affect -O; if you use
90: -O, be prepared to recompile without -O if you have any trouble.
91:
92: Note that many (most?) versions of debuggers
93: other than GDB do not know how to handle programs like Emacs
94: that use raw or cbreak mode, change other terminal status bits,
95: and use asynchronous SIGIO signals for terminal input.
96: However, most debuggers may work if Emacs uses a separate terminal
97: from the one being used by the debugger, or if Emacs is using
98: its own X window.
99:
100: If you do have a debugger that works, it is probably best to use `-g'
101: so that you are not helpless in the face of a problem.
102:
103: With GCC, you can use -O and -g together. The easiest way to do this
104: is to change C_DEBUG_SWITCH to include both -O and -g. GCC is probably
105: more reliable with -O than without, as it is tested more with -O.
106:
107: The way to specify use of GCC is to set the environment variable CC
108: to `gcc' before you do `make install'
109:
110: 7) If you wish to compile with GCC, you may need to use -traditional
111: or run fixincludes. This is needed if your system's header files
112: are incompatible with ANSI C. If your system header files are designed
113: for ANSI C, then GCC should handle them properly. For more info, refer
114: the INSTALL file of GCC.
115:
116: If your system header files are non-ANSI and you don't use -traditional
117: or fixincludes to compensate, the usual effect is that the ioctl
118: system call does not work. The result is an Emacs that almost completely
119: fails to work.
120:
121: 8) Refer to the file $BUILD/etc/TERMS for information on
122: fields you may wish to add to various termcap entries.
123:
124: 9) Run `make install' in the main directory of the Emacs distribution
125: to finish building and installing Emacs in the standard way.
126: You are done!
127:
128: (On system V, you need to use `make install.sysv' instead of `make install'.
129: On Xenix, use `make install.xenix'.
130: On AIX, use `make install.aix'.
131: You can also try `make INSTALL=./install.sh install'
132: on any kind of system.)
133:
134: The last step of building Emacs involves running Emacs in a special
135: way. At this time, if the directories that Emacs will refer to during
136: use for Lisp code and executables do not already exist, Emacs will
137: print a warning to this effect. If you plan to have `make' create
138: these directories while it installs Emacs, then do not be alarmed by
139: the warnings.
140:
141: The shell script `build-install' is an alternative to `make install'.
142: It is a little less sophisticated than the makefile, but probably
143: easier to customize for nonstandard kinds of installation. If you
144: want to install in precisely the usual fashion, we recommend using
145: `make' rather than `build-install'.
146:
147:
148: BUILDING GNU EMACS
149: `make install' and its variants start with these steps to compile Emacs.
150:
151: 1) Cd to $BUILD/etc and run `make'.
152: This creates files named `ctags' and `etags' and `wakeup'
153: and `make-docfile' and `digest-doc' and `test-distrib'. And others.
154:
155: 2) Cd to $BUILD/src and Run `make'
156: This refers to files in the $BUILD/lisp and $BUILD/etc subdirectories
157: using names ../lisp and ../etc.
158:
159: This creates a file $BUILD/src/xemacs which is the runnable Emacs,
160: assigning it a new version number by incrementing the version
161: stored in $BUILD/lisp/version.el.
162:
163: It also creates a file in $BUILD/etc, whose name is
164: DOC followed by the current Emacs version.
165: This file contains documentation strings for all the
166: functions in Emacs. Each time you run make to make a new xemacs,
167: a new DOC file with a new name is made. You must keep
168: the DOC file for an Emacs version as long as you keep using
169: that Emacs version.
170:
171:
172: INSTALLATION
173:
174: After compilation, `make install' and its variants continue with these steps
175: to install the Emacs already compiled.
176:
177: 0) Move files from $BUILD to $EMACS if they are not the same directory.
178: The files that you need include at least the subdirectories
179: lisp, etc and info. After this, the directory in which you said
180: (in paths.h) Emacs would be installed actually contains the necessary
181: parts of Emacs.
182:
183: 1) Move the file $EMACS/xemacs to /usr/local/bin/emacs,
184: or some other name in users' search paths.
185: `xemacs' has an alternate name $EMACS/src/emacs-EMACSVERSION;
186: you may wish to make a symbolic link
187: named /usr/local/bin/emacs pointing to that alternate name,
188: as an easy way of installing different versions.
189:
190: You can delete $EMACS/src/temacs.
191:
192: 3) Move the programs ctags, etags and emacsclient from $EMACS/etc
193: to /usr/local/bin. These programs are run by users as shell commands.
194:
195: The program $EMACS/etc/wakeup is invoked by Emacs when appropriate.
196:
197: The programs $EMACS/etc/make-docfile and $EMACS/etc/test-distrib
198: are not used any more; they were used in building Emacs.
199:
200: $EMACS/etc/digest-doc can be used to convert DOC into a
201: file for users to read. There is no important reason to move it.
202:
203: 4) The files in $EMACS/src subdirectory, except for xemacs,
204: are not used by Emacs once it is built.
205:
206:
207: See the file PROBLEMS in this directory for a list of various
208: problems sometimes encountered, and what to do about them.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.