1 # Make file for building GNU Emacs on the Macintosh.
2 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2006, 2007 Free Software Foundation, Inc.
5 # Author: Andrew Choi <akochoi@users.sourceforge.net>
7 # This file is part of GNU Emacs.
9 # GNU Emacs is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3, or (at your option)
14 # GNU Emacs is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with GNU Emacs; see the file COPYING. If not, write to
21 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 # Boston, MA 02110-1301, USA. */
24 # Defines the following targets:
25 # Emacs (default) - normal Carbon Emacs build.
26 # NonCarbon - non-Carbon Emacs build.
27 # Clean - remove all object and executable files to prepare for a fresh build.
28 # Doc - generate the "DOC" file in ~emacs/etc/.
29 # Make-DocFile - build the make-docfile tool, utility for generating "DOC".
31 Src = ::src: # emacs's src directory
32 Includes = :inc: # mac includes directory (common for MPW and CW)
33 Source = :src: # mac source directory
34 Lib-Src = ::lib-src: # ~emacs/lib-src directory, containing make-docfile.c
35 EmacsTarget = :Emacs MPW # pathname of target executable file
36 DocTarget = ::etc: # where the generated DOC file should be placed
37 Lisp = ::lisp: # emacs's lisp directory
38 Make-DocFileDir = {Lib-Src} # directory containing make-docfile tool
40 Makefile = makefile.MPW # self reference
41 NonCarbonMakeOut = NonCarbon.MakeOut # temporary file for non-Carbon build script
43 CarbonOption = -d HAVE_CARBON
44 SymOption = # -sym on # remove hash mark before "-sym on" to enable source debugging
45 OptOption = # -opt speed # alternatively set to -opt off or -opt size
47 # The -noMapCR options and the two -d's must not be removed.
49 PPCCOptions = {SymOption} {OptOption} -noMapCR -enum int -alloca ¶
50 -typecheck relaxed -w off ¶
51 -includes unix -i {Includes},{Src} ¶
52 -d emacs=1 -d HAVE_CONFIG_H -d MAC_OS -d MAC_OS8 {CarbonOption}
54 LinkOptions = {SymOption} -d
56 CONFIG_H_GROUP = "{Includes}config.h" "{Includes}s-mac.h" "{Includes}utsname.h" "{Includes}m-mac.h"
57 DISPEXTERN_H_GROUP = "{Src}dispextern.h" "{Src}macgui.h"
58 INTERVALS_H_GROUP = "{Src}intervals.h" "{Src}dispextern.h" "{Src}macgui.h"
59 WINDOW_H_GROUP = "{Src}window.h" {DISPEXTERN_H_GROUP}
60 BLOCKINPUT_H_GROUP = "{Src}blockinput.h" "{Src}atimer.h" "{Src}systime.h" ¶
61 "{Includes}sys:time.h" "{Includes}sys:time.h"
63 # The list all object files from the GNU Emacs 21.0 distribution.
73 "{Src}casefiddle.c.x" ¶
81 "{Src}composite.c.x" ¶
97 "{Src}getloadavg.c.x" ¶
101 "{Src}intervals.c.x" ¶
102 "{Src}keyboard.c.x" ¶
113 "{Src}region-cache.c.x" ¶
116 "{Src}strftime.c.x" ¶
121 "{Src}terminal.c.x" ¶
122 "{Src}textprop.c.x" ¶
130 # The list of object files generated from new source files of the Macintosh port.
136 "{Src}macselect.c.x" ¶
140 "{SharedLibraries}CarbonLib" ¶
141 "{SharedLibraries}StdCLib" ¶
142 "{PPCLibraries}StdCRuntime.o" ¶
143 "{PPCLibraries}PPCCRuntime.o"
146 "{SharedLibraries}InterfaceLib" ¶
147 "{SharedLibraries}StdCLib" ¶
148 "{SharedLibraries}MathLib" ¶
149 "{SharedLibraries}AppleScriptLib" ¶
150 "{SharedLibraries}LocalesLib" ¶
151 "{SharedLibraries}AppearanceLib" ¶
152 "{SharedLibraries}QuickTimeLib" ¶
153 "{PPCLibraries}StdCRuntime.o" ¶
154 "{PPCLibraries}PPCCRuntime.o" ¶
155 "{PPCLibraries}PPCToolLibs.o"
157 # The next two are the dependency rules for building Emacs.
159 Emacs ÄÄ {Makefile} buildobj.lst {DocTarget}DOC {EmacsObjects} {MacObjects}
162 {EmacsObjects} {MacObjects} ¶
166 Emacs ÄÄ {Makefile} "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
167 Rez {CarbonOption} -a "{Source}"Emacs.maclf.r -o "{EmacsTarget}"
168 Rez {CarbonOption} -a "{Source}"EmacsMPW.maclf.r -o "{EmacsTarget}"
169 SetFile "{EmacsTarget}" -t APPL -c 'EMAx' -a B
172 Make -f "{Makefile}" -d CarbonOption="" -d StdLibraries='{NonCarbonLibs}' > "{NonCarbonMakeOut}"
175 # Rez cannot handle files with Unix style end lines at all. So generate
176 # them. It does not hurt if Emacs.r and EmacsMPW.r already have Mac end
179 "{Source}"Emacs.maclf.r Ä "{Source}"Emacs.r
180 translate ¶0x0a ¶n < "{Source}"Emacs.r > "{Source}"Emacs.maclf.r
182 "{Source}"EmacsMPW.maclf.r Ä "{Source}"EmacsMPW.r
183 translate ¶0x0a ¶n < "{Source}"EmacsMPW.r > "{Source}"EmacsMPW.maclf.r
186 Echo "{EmacsObjects} {MacObjects}" | StreamEdit -e '1,$ Replace -c ° /[Â ]*:([Â: ]*)¨1.c.x/ ¨1".o"' > buildobj.lst
188 # Here comes a long boring list of rules saying which files depend on which
189 # other ones. I generated them by hand using the "-p" option of the MrC compiler.
190 # Know about MakeMake, but this is probably more accurate.
204 {INTERVALS_H_GROUP} ¶
209 {BLOCKINPUT_H_GROUP} ¶
224 "{Includes}sys:time.h" ¶
225 {BLOCKINPUT_H_GROUP} ¶
227 "{Includes}sys:time.h"
231 "{Includes}sys:types.h" ¶
232 "{Includes}sys:stat.h" ¶
233 "{Includes}sys:param.h" ¶
235 {INTERVALS_H_GROUP} ¶
240 "{Src}region-cache.h" ¶
242 {BLOCKINPUT_H_GROUP} ¶
245 {Src}bytecode.c.x Ä ¶
260 {Src}callproc.c.x Ä ¶
262 "{Includes}sys:types.h" ¶
263 "{Includes}sys:file.h" ¶
264 "{Includes}sys:types.h" ¶
265 "{Includes}sys:stat.h" ¶
273 "{Includes}epaths.h" ¶
277 "{Includes}termio.h" ¶
296 {Src}category.c.x Ä ¶
312 "{Includes}sys:types.h" ¶
346 {Src}composite.c.x Ä ¶
365 "{Includes}sys:types.h" ¶
366 "{Includes}sys:stat.h" ¶
368 "{Includes}sys:time.h" ¶
369 "{Includes}dirent.h" ¶
385 {DISPEXTERN_H_GROUP} ¶
393 {INTERVALS_H_GROUP} ¶
394 {BLOCKINPUT_H_GROUP} ¶
405 "{Includes}sys:types.h" ¶
406 "{Includes}sys:file.h" ¶
419 "{Includes}sys:types.h" ¶
422 {INTERVALS_H_GROUP} ¶
429 "{Includes}sys:time.h" ¶
434 "{Includes}sys:types.h" ¶
435 "{Includes}sys:file.h" ¶
436 "{Includes}sys:types.h" ¶
437 "{Includes}sys:stat.h" ¶
440 {INTERVALS_H_GROUP} ¶
443 "{Includes}termio.h" ¶
444 {BLOCKINPUT_H_GROUP} ¶
454 {BLOCKINPUT_H_GROUP} ¶
461 "{Includes}sys:types.h" ¶
462 "{Includes}sys:stat.h" ¶
465 {INTERVALS_H_GROUP} ¶
472 "{Includes}sys:time.h" ¶
476 {Src}filemode.c.x Ä ¶
478 "{Includes}sys:types.h" ¶
479 "{Includes}sys:stat.h"
481 {Src}floatfns.c.x Ä ¶
493 {INTERVALS_H_GROUP} ¶
504 {DISPEXTERN_H_GROUP} ¶
519 {BLOCKINPUT_H_GROUP} ¶
520 {DISPEXTERN_H_GROUP} ¶
534 {Src}getloadavg.c.x Ä ¶
536 "{Includes}sys:types.h"
543 {DISPEXTERN_H_GROUP} ¶
544 {BLOCKINPUT_H_GROUP} ¶
545 "{Includes}epaths.h" ¶
549 "{Includes}sys:stat.h" ¶
550 "{Includes}alloca.h" ¶
551 "{Includes}sys:param.h"
565 {INTERVALS_H_GROUP} ¶
566 "{Src}region-cache.h"
571 {INTERVALS_H_GROUP} ¶
575 {BLOCKINPUT_H_GROUP} ¶
576 "{Src}region-cache.h"
578 {Src}intervals.c.x Ä ¶
581 {INTERVALS_H_GROUP} ¶
586 {Src}keyboard.c.x Ä ¶
598 {DISPEXTERN_H_GROUP} ¶
601 {INTERVALS_H_GROUP} ¶
602 {BLOCKINPUT_H_GROUP} ¶
606 "{Includes}sys:ioctl.h" ¶
609 "{Includes}termio.h" ¶
610 "{Includes}sys:types.h" ¶
624 {BLOCKINPUT_H_GROUP} ¶
628 {Src}lastfile.c.x Ä ¶
633 "{Includes}sys:types.h" ¶
634 "{Includes}sys:stat.h" ¶
635 "{Includes}sys:file.h" ¶
637 {INTERVALS_H_GROUP} ¶
640 "{Includes}epaths.h" ¶
667 {DISPEXTERN_H_GROUP} ¶
675 "{Includes}sys:types.h"
685 {DISPEXTERN_H_GROUP} ¶
688 {INTERVALS_H_GROUP} ¶
693 "{Includes}sys:types.h" ¶
696 "{Includes}sys:time.h" ¶
705 "{Includes}sys:types.h" ¶
713 {Src}region-cache.c.x Ä ¶
717 "{Src}region-cache.h"
723 {DISPEXTERN_H_GROUP} ¶
734 "{Src}region-cache.h" ¶
736 {BLOCKINPUT_H_GROUP} ¶
737 {INTERVALS_H_GROUP} ¶
738 "{Includes}sys:types.h" ¶
741 {Src}strftime.c.x Ä ¶
743 "{Includes}sys:types.h" ¶
744 "{Includes}sys:time.h"
753 {INTERVALS_H_GROUP} ¶
759 {BLOCKINPUT_H_GROUP} ¶
760 "{Includes}sys:types.h" ¶
761 "{Includes}sys:stat.h" ¶
762 "{Includes}sys:ioctl.h" ¶
764 "{Includes}sys:types.h" ¶
770 {DISPEXTERN_H_GROUP} ¶
774 "{Includes}utime.h" ¶
776 "{Includes}dirent.h" ¶
777 "{Includes}sys:types.h"
791 {DISPEXTERN_H_GROUP} ¶
802 "{Includes}sys:file.h"
804 {Src}terminal.c.x Ä ¶
814 {Src}textproc.c.x Ä ¶
817 {INTERVALS_H_GROUP} ¶
842 {DISPEXTERN_H_GROUP} ¶
843 {BLOCKINPUT_H_GROUP} ¶
844 {INTERVALS_H_GROUP} ¶
855 {DISPEXTERN_H_GROUP} ¶
861 {BLOCKINPUT_H_GROUP} ¶
864 {INTERVALS_H_GROUP} ¶
870 "{Src}region-cache.h" ¶
878 "{Includes}sys:types.h" ¶
879 "{Includes}sys:stat.h" ¶
888 {DISPEXTERN_H_GROUP} ¶
889 {BLOCKINPUT_H_GROUP} ¶
891 {INTERVALS_H_GROUP} ¶
901 {BLOCKINPUT_H_GROUP} ¶
903 "{Includes}sys:types.h" ¶
906 {Src}macselect.c.x Ä ¶
917 "{Includes}utime.h" ¶
918 "{Includes}dirent.h" ¶
919 "{Includes}sys:types.h" ¶
920 "{Includes}sys:stat.h" ¶
922 "{Includes}sys:types.h" ¶
923 "{Includes}sys:param.h" ¶
928 "{Includes}sys:time.h" ¶
929 "{Includes}utsname.h" ¶
933 {BLOCKINPUT_H_GROUP} ¶
948 {DISPEXTERN_H_GROUP} ¶
950 {INTERVALS_H_GROUP} ¶
952 {BLOCKINPUT_H_GROUP} ¶
953 "{Includes}epaths.h" ¶
958 "{Src}bitmaps:gray.xbm"
963 {BLOCKINPUT_H_GROUP} ¶
968 "{Includes}alloca.h" ¶
969 "{Includes}sys:types.h" ¶
971 "{Includes}termio.h" ¶
973 "{Includes}sys:stat.h" ¶
977 {DISPEXTERN_H_GROUP} ¶
987 {INTERVALS_H_GROUP} ¶
992 "{Includes}epaths.h" ¶
998 #----------------------------------------#
999 # Variables and rules for target "Clean" #
1000 #----------------------------------------#
1003 Delete -i {EmacsObjects} {MacObjects}
1004 Delete -i "{EmacsTarget}"
1005 Delete -i stdout stderr
1006 Delete -i {Make-DocFile-Objects} {Make-DocFileDir}make-docfile
1007 Delete -i "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
1008 Delete -i "{NonCarbonMakeOut}"
1009 Delete -i buildobj.lst
1012 Delete -i "Emacs CW"Å
1013 Delete -y "emacs Data"
1016 #--------------------------------------#
1017 # Variables and rules for target "Doc" #
1018 #--------------------------------------#
1020 SOME_MACHINE_OBJECTS = dosfns.o msdos.o ¶
1021 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o ¶
1022 mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o ¶
1023 w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o ¶
1024 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o
1028 {Lisp}buff-menu.elc ¶
1031 {Lisp}emacs-lisp:byte-run.elc ¶
1032 {Lisp}cus-face.elc ¶
1033 {Lisp}cus-start.elc ¶
1035 {Lisp}emacs-lisp:backquote.elc ¶
1036 {Lisp}emacs-lisp:lisp-mode.elc ¶
1037 {Lisp}emacs-lisp:lisp.elc ¶
1038 {Lisp}facemenu.elc ¶
1041 {Lisp}emacs-lisp:float-sup.elc ¶
1048 {Lisp}rfn-eshadow.elc ¶
1051 {Lisp}bindings.elc ¶
1052 {Lisp}emacs-lisp:map-ynp.elc ¶
1054 {Lisp}international:mule.elc ¶
1055 {Lisp}international:mule-conf.el ¶
1056 {Lisp}international:mule-cmds.elc ¶
1057 {Lisp}international:characters.elc ¶
1058 {Lisp}international:ucs-tables.elc ¶
1059 {Lisp}international:utf-8.elc ¶
1060 {Lisp}international:utf-16.elc ¶
1061 {Lisp}international:latin-1.el ¶
1062 {Lisp}international:latin-2.el ¶
1063 {Lisp}international:latin-3.el ¶
1064 {Lisp}international:latin-4.el ¶
1065 {Lisp}international:latin-5.el ¶
1066 {Lisp}international:latin-8.el ¶
1067 {Lisp}international:latin-9.el ¶
1068 {Lisp}case-table.elc ¶
1069 {Lisp}language:chinese.elc ¶
1070 {Lisp}language:cyrillic.elc ¶
1071 {Lisp}language:indian.elc ¶
1072 {Lisp}language:devanagari.el ¶
1073 {Lisp}language:kannada.el ¶
1074 {Lisp}language:malayalam.el ¶
1075 {Lisp}language:tamil.el ¶
1076 {Lisp}language:english.el ¶
1077 {Lisp}language:ethiopic.elc ¶
1078 {Lisp}language:european.elc ¶
1079 {Lisp}language:czech.el ¶
1080 {Lisp}language:slovak.el ¶
1081 {Lisp}language:romanian.el ¶
1082 {Lisp}language:greek.el ¶
1083 {Lisp}language:hebrew.el ¶
1084 {Lisp}language:japanese.el ¶
1085 {Lisp}language:korean.el ¶
1086 {Lisp}language:lao.el ¶
1087 {Lisp}language:thai.el ¶
1088 {Lisp}language:tibetan.elc ¶
1089 {Lisp}language:vietnamese.elc ¶
1090 {Lisp}language:misc-lang.el ¶
1091 {Lisp}language:utf-8-lang.el ¶
1092 {Lisp}language:georgian.el ¶
1093 {Lisp}menu-bar.elc ¶
1095 {Lisp}register.elc ¶
1100 {Lisp}term:tty-colors.elc ¶
1101 {Lisp}font-core.elc ¶
1102 {Lisp}emacs-lisp:syntax.elc ¶
1103 {Lisp}font-lock.elc ¶
1104 {Lisp}jit-lock.elc ¶
1105 {Lisp}textmodes:fill.elc ¶
1106 {Lisp}textmodes:page.elc ¶
1107 {Lisp}textmodes:paragraphs.elc ¶
1108 {Lisp}textmodes:text-mode.elc ¶
1109 {Lisp}emacs-lisp:timer.elc ¶
1110 {Lisp}vc-hooks.elc ¶
1111 {Lisp}jka-cmpr-hook.elc ¶
1112 {Lisp}ediff-hook.elc ¶
1117 SOME_MACHINE_LISP = {Lisp}mouse.elc ¶
1118 {Lisp}select.elc {Lisp}scroll-bar.elc ¶
1119 {Lisp}vmsproc.elc {Lisp}vms-patch.elc ¶
1120 {Lisp}ls-lisp.elc {Lisp}dos-fns.elc ¶
1121 {Lisp}w32-fns.elc {Lisp}dos-w32.elc ¶
1122 {Lisp}disp-table.elc {Lisp}dos-vars.elc ¶
1123 {Lisp}tooltip.elc {Lisp}image.elc ¶
1124 {Lisp}fringe.elc {Lisp}dnd.elc ¶
1125 {Lisp}mwheel.elc {Lisp}tool-bar.elc ¶
1127 {Lisp}international:ccl.elc ¶
1128 {Lisp}international:codepage.elc ¶
1129 {Lisp}international:fontset.elc
1131 Doc Ä {DocTarget}DOC
1133 {DocTarget}DOC Ä {Makefile} {shortlisp} {SOME_MACHINE_LISP} {Make-DocFileDir}Make-DocFile buildobj.lst
1134 {Make-DocFileDir}make-docfile -d {Src} {SOME_MACHINE_OBJECTS} `Catenate buildobj.lst` > {DocTarget}DOC
1135 {Make-DocFileDir}make-docfile -a {DocTarget}DOC -d {Src} {SOME_MACHINE_LISP} {shortlisp}
1138 #-----------------------------------------------#
1139 # Variables and rules for target "Make-DocFile" #
1140 #-----------------------------------------------#
1142 Make-DocFile-Includes = -i :inc:
1145 Make-DocFile-PPCCOptions = -typecheck relaxed -w off -noMapCR ¶
1146 -d MAC_OS -d MAC_OS8 ¶
1147 {Make-DocFile-Includes} {Make-DocFile-Sym}
1149 Make-DocFile-Objects = ¶
1150 "{Lib-Src}make-docfile.c.x" ¶
1153 Make-DocFile Ä {Make-DocFileDir}Make-DocFile
1155 {Make-DocFileDir}Make-DocFile Ä {Makefile} {Make-DocFile-Objects}
1157 -o {Make-DocFileDir}Make-DocFile ¶
1158 {Make-DocFile-Sym} ¶
1159 {Make-DocFile-Objects} ¶
1162 "{SharedLibraries}InterfaceLib" ¶
1163 "{SharedLibraries}StdCLib" ¶
1164 "{SharedLibraries}MathLib" ¶
1165 "{PPCLibraries}StdCRuntime.o" ¶
1166 "{PPCLibraries}PPCCRuntime.o" ¶
1167 "{PPCLibraries}PPCToolLibs.o"
1169 "{Lib-Src}make-docfile.c.x" Ä {Makefile} "{Lib-Src}make-docfile.c"
1170 {PPCC} "{Lib-Src}make-docfile.c" -o "{Lib-Src}make-docfile.c.x" {Make-DocFile-PPCCOptions}
1172 "{Source}chdir.c.x" Ä {Makefile} "{Source}chdir.c"
1173 {PPCC} "{Source}chdir.c" -o "{Source}chdir.c.x" {Make-DocFile-PPCCOptions}
1175 # arch-tag: c9d9bc1a-142f-41da-b75e-79e0c44ffbb4