1 * BUILDING EMACS ON THE MAC OS -*- outline -*-
3 Copyright (c) 2001 Free Software Foundation, Inc.
5 Permission is granted to anyone to make or distribute verbatim
6 copies of this document as received, in any medium, provided that
7 the copyright notice and permission notice are preserved, and that
8 the distributor grants the recipient permission for further
9 redistribution as permitted by this notice.
11 Permission is granted to distribute modified versions of this
12 document, or of portions of it, under the above conditions,
13 provided also that they carry prominent notices stating who last
16 You can use either Metrowerks CodeWarrior Pro 5 or 6 or MPW-GM
17 (Aug. 2000) to build Emacs. MPW-GM can be downloaded free of charge
20 http://developer.apple.com/tools/mpw-tools/
22 You will need MPW-GM to build the make-docfile utility and to generate
23 the doc string file DOC.
25 To decompress files, you can use MacGzip from
27 http://persephone.cps.unizar.es/~spd/gzip
29 and to untar them, you can use tar 4.0 from
31 http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cmp/tar-40b.hqx
33 (Optional) If you wish to fetch files from the Emacs CVS repository
34 directly to your Mac, you can use the CVS client MacCVS, which can be
37 http://www.wincvs.org/
39 (Optional) A subset of the fonts from the GNU intlfonts-1.2
40 distribution converted to NFNT format can be obtained from
42 ftp://mac-emacs.sourceforge.net/pub/mac-emacs/GNU-fonts.smi.bin
46 To build Emacs in the MPW Shell, simply set the directory to
47 ...:emacs:mac: and build the target Emacs of the make file
48 makefile.mpw. I.e., execute the commands
50 make Emacs -f makefile.MPW > Emacs.MakeScript
53 To build Emacs using CodeWarrior, start up the CodeWarrior IDE, choose
54 File->Import Project... and select the file cw5-mcp.xml or
55 cw6-mcp.xml, depending on which verison of CodeWarrior used. When
56 prompted to save the project, navigate to same directory as the file
57 cw[56]-mcp.xml, name it emacs-cw5.mcp or emacs-cw6.mcp, and save it
58 there. Then choose Project->Make. Note that this does not build the
59 DOC file. To do so, use MPW and build the target "Doc" in
62 Once built, the Emacs application (Emacs CW or Emacs MPW) can be
63 launched where it is created.
65 To build an optimized version of Emacs in CodeWarrior, change the
66 value in the Emacs Settings->Code Generation->Global Optimization
67 dialog. To build a version for profiling, check the Profiler
68 Information box in the Emacs Settings->Code Generation->PPC Processor
69 dialog and include the Profiler PPC.Lib library.
71 To build optimized or debugging version of Emacs in MPW, follow the
72 comment in makefile.MPW to enable the -opt speed or -sym on option
75 The Mac version requires compiled Lisp files to be present in the lisp
76 directory to run properly. It is cumbersome to bootstrap from only
77 the Lisp source files. One way of getting the compiled Lisp files is
78 to build Emacs once on, say, a Unix system and transfer that directory
79 to the Mac. Note that linefeed conversion must be disabled when
80 transferring compiled Lisp files.
82 An alternative is to unzip and untar the archive lisp-elc.tgz. An
83 older version of frame.elc in the archive may cause a problem when the
84 Mac version starts up. If this is the case, simply remove or rename
85 that file. Then once Emacs runs, you can invoke
86 byte-recompile-directory on the lisp directory to byte-compile all
87 out-of-date Lisp files.
89 You may also need to run update-autoloads-from-directories on the lisp
90 directory to bring loaddefs.el up-to-date.
94 Emacs should build and run on a PowerMac running Mac OS 8.1 - 9.0.
96 You will need around 100 MB of disk space for the source files and
99 It will not run on machines with more than 256 MB of physical or
102 Currently there is no support for building the LEIM directory on the
103 Mac. However, it can be built on another platform and transferred to
106 When Emacs is built with "-opt speed" enabled in makefile.MPW,
107 optimization causes the functions reset_buffer_local_variables in
108 buffer.c and syms_of_lread in lread.c to crash. Avoid this by
109 enclosing them in the following pragmas.
111 #pragma options opt off
113 <function definition...>
115 #pragma options opt reset
117 To use the same icon as when Emacs is built on Windows NT, define
118 GNU_ICON in mac/src/Emacs.r.