| 1 | * BUILDING EMACS ON THE MAC OS -*- outline -*- |
| 2 | |
| 3 | Copyright (c) 2001 Free Software Foundation, Inc. |
| 4 | |
| 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. |
| 10 | |
| 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 |
| 14 | changed them. |
| 15 | |
| 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 |
| 18 | from Apple at |
| 19 | |
| 20 | http://developer.apple.com/tools/mpw-tools/ |
| 21 | |
| 22 | You will need MPW-GM to build the make-docfile utility and to generate |
| 23 | the doc string file DOC. |
| 24 | |
| 25 | To decompress files, you can use MacGzip from |
| 26 | |
| 27 | http://persephone.cps.unizar.es/~spd/gzip |
| 28 | |
| 29 | and to untar them, you can use tar 4.0 from |
| 30 | |
| 31 | http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cmp/tar-40b.hqx |
| 32 | |
| 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 |
| 35 | downloaded from |
| 36 | |
| 37 | http://www.wincvs.org/ |
| 38 | |
| 39 | (Optional) A subset of the fonts from the GNU intlfonts-1.2 |
| 40 | distribution converted to NFNT format can be obtained from |
| 41 | |
| 42 | ftp://mac-emacs.sourceforge.net/pub/mac-emacs/GNU-fonts.smi.bin |
| 43 | |
| 44 | ### IMPORTANT ### If you use StuffIf Expander to decompress and untar |
| 45 | the distribution, you *must* set the radio button in the |
| 46 | Preferences->Cross Platform->Convert text files to Macintosh format to |
| 47 | "Never". Otherwise the compiled Lisp files will be corrupted. |
| 48 | |
| 49 | * BUILDING EMACS |
| 50 | |
| 51 | To build Emacs in the MPW Shell, simply set the directory to |
| 52 | ...:emacs:mac: and build the target Emacs of the make file |
| 53 | makefile.mpw. I.e., execute the commands |
| 54 | |
| 55 | make Emacs -f makefile.MPW > Emacs.MakeScript |
| 56 | Emacs.MakeScript |
| 57 | |
| 58 | To build Emacs using CodeWarrior, start up the CodeWarrior IDE, choose |
| 59 | File->Import Project... and select the file cw5-mcp.xml or |
| 60 | cw6-mcp.xml, depending on which verison of CodeWarrior used. When |
| 61 | prompted to save the project, navigate to same directory as the file |
| 62 | cw[56]-mcp.xml, name it emacs-cw5.mcp or emacs-cw6.mcp, and save it |
| 63 | there. Then choose Project->Make. Note that this does not build the |
| 64 | DOC file. To do so, use MPW and build the target "Doc" in |
| 65 | makefile.MPW. |
| 66 | |
| 67 | Once built, the Emacs application (Emacs CW or Emacs MPW) can be |
| 68 | launched where it is created. |
| 69 | |
| 70 | To build an optimized version of Emacs in CodeWarrior, change the |
| 71 | value in the Emacs Settings->Code Generation->Global Optimization |
| 72 | dialog. To build a version for profiling, check the Profiler |
| 73 | Information box in the Emacs Settings->Code Generation->PPC Processor |
| 74 | dialog and include the Profiler PPC.Lib library. |
| 75 | |
| 76 | To build optimized or debugging version of Emacs in MPW, follow the |
| 77 | comment in makefile.MPW to enable the -opt speed or -sym on option |
| 78 | (see note below). |
| 79 | |
| 80 | * NOTES |
| 81 | |
| 82 | Emacs should build and run on a PowerMac running Mac OS 8.1 - 9.0. |
| 83 | |
| 84 | You will need around 100 MB of disk space for the source files and |
| 85 | intermediate files. |
| 86 | |
| 87 | It will not run on machines with more than 256 MB of physical or |
| 88 | virtual memory. |
| 89 | |
| 90 | Currently there is no support for building the LEIM directory on the |
| 91 | Mac. However, it can be built on another platform and transferred to |
| 92 | the Mac. |
| 93 | |
| 94 | When Emacs is built with "-opt speed" enabled in makefile.MPW, |
| 95 | optimization causes the functions reset_buffer_local_variables in |
| 96 | buffer.c, syms_of_lread in lread.c, and x_draw_hollow_cursor in |
| 97 | macterm.c to crash. Avoid this by enclosing them in the following |
| 98 | pragmas. |
| 99 | |
| 100 | #pragma options opt off |
| 101 | |
| 102 | <function definition...> |
| 103 | |
| 104 | #pragma options opt reset |
| 105 | |
| 106 | To use the same icon as when Emacs is built on Windows NT, define |
| 107 | GNU_ICON in mac/src/Emacs.r. |