1 # Make file for building GNU Emacs on the Macintosh.
2 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2006, 2007, 2008 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}textprop.c.x" ¶
129 # The list of object files generated from new source files of the Macintosh port.
135 "{Src}macselect.c.x" ¶
137 "{Src}mactoolbox.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" ¶
294 {Src}category.c.x Ä ¶
310 "{Includes}sys:types.h" ¶
344 {Src}composite.c.x Ä ¶
363 "{Includes}sys:types.h" ¶
364 "{Includes}sys:stat.h" ¶
366 "{Includes}sys:time.h" ¶
367 "{Includes}dirent.h" ¶
383 {DISPEXTERN_H_GROUP} ¶
391 {INTERVALS_H_GROUP} ¶
392 {BLOCKINPUT_H_GROUP} ¶
403 "{Includes}sys:types.h" ¶
404 "{Includes}sys:file.h" ¶
417 "{Includes}sys:types.h" ¶
420 {INTERVALS_H_GROUP} ¶
427 "{Includes}sys:time.h" ¶
432 "{Includes}sys:types.h" ¶
433 "{Includes}sys:file.h" ¶
434 "{Includes}sys:types.h" ¶
435 "{Includes}sys:stat.h" ¶
438 {INTERVALS_H_GROUP} ¶
441 "{Includes}termio.h" ¶
442 {BLOCKINPUT_H_GROUP} ¶
452 {BLOCKINPUT_H_GROUP} ¶
459 "{Includes}sys:types.h" ¶
460 "{Includes}sys:stat.h" ¶
463 {INTERVALS_H_GROUP} ¶
470 "{Includes}sys:time.h" ¶
474 {Src}filemode.c.x Ä ¶
476 "{Includes}sys:types.h" ¶
477 "{Includes}sys:stat.h"
479 {Src}floatfns.c.x Ä ¶
491 {INTERVALS_H_GROUP} ¶
502 {DISPEXTERN_H_GROUP} ¶
517 {BLOCKINPUT_H_GROUP} ¶
518 {DISPEXTERN_H_GROUP} ¶
532 {Src}getloadavg.c.x Ä ¶
534 "{Includes}sys:types.h"
541 {DISPEXTERN_H_GROUP} ¶
542 {BLOCKINPUT_H_GROUP} ¶
543 "{Includes}epaths.h" ¶
547 "{Includes}sys:stat.h" ¶
548 "{Includes}alloca.h" ¶
549 "{Includes}sys:param.h"
563 {INTERVALS_H_GROUP} ¶
564 "{Src}region-cache.h"
569 {INTERVALS_H_GROUP} ¶
573 {BLOCKINPUT_H_GROUP} ¶
574 "{Src}region-cache.h"
576 {Src}intervals.c.x Ä ¶
579 {INTERVALS_H_GROUP} ¶
584 {Src}keyboard.c.x Ä ¶
596 {DISPEXTERN_H_GROUP} ¶
599 {INTERVALS_H_GROUP} ¶
600 {BLOCKINPUT_H_GROUP} ¶
604 "{Includes}sys:ioctl.h" ¶
607 "{Includes}termio.h" ¶
608 "{Includes}sys:types.h" ¶
622 {BLOCKINPUT_H_GROUP} ¶
626 {Src}lastfile.c.x Ä ¶
631 "{Includes}sys:types.h" ¶
632 "{Includes}sys:stat.h" ¶
633 "{Includes}sys:file.h" ¶
635 {INTERVALS_H_GROUP} ¶
638 "{Includes}epaths.h" ¶
665 {DISPEXTERN_H_GROUP} ¶
673 "{Includes}sys:types.h"
683 {DISPEXTERN_H_GROUP} ¶
686 {INTERVALS_H_GROUP} ¶
691 "{Includes}sys:types.h" ¶
694 "{Includes}sys:time.h" ¶
703 "{Includes}sys:types.h" ¶
711 {Src}region-cache.c.x Ä ¶
715 "{Src}region-cache.h"
721 {DISPEXTERN_H_GROUP} ¶
732 "{Src}region-cache.h" ¶
734 {BLOCKINPUT_H_GROUP} ¶
735 {INTERVALS_H_GROUP} ¶
736 "{Includes}sys:types.h" ¶
739 {Src}strftime.c.x Ä ¶
741 "{Includes}sys:types.h" ¶
742 "{Includes}sys:time.h"
751 {INTERVALS_H_GROUP} ¶
757 {BLOCKINPUT_H_GROUP} ¶
758 "{Includes}sys:types.h" ¶
759 "{Includes}sys:stat.h" ¶
760 "{Includes}sys:ioctl.h" ¶
762 "{Includes}sys:types.h" ¶
768 {DISPEXTERN_H_GROUP} ¶
772 "{Includes}utime.h" ¶
774 "{Includes}dirent.h" ¶
775 "{Includes}sys:types.h"
789 {DISPEXTERN_H_GROUP} ¶
800 "{Includes}sys:file.h"
802 {Src}textproc.c.x Ä ¶
805 {INTERVALS_H_GROUP} ¶
830 {DISPEXTERN_H_GROUP} ¶
831 {BLOCKINPUT_H_GROUP} ¶
832 {INTERVALS_H_GROUP} ¶
843 {DISPEXTERN_H_GROUP} ¶
849 {BLOCKINPUT_H_GROUP} ¶
852 {INTERVALS_H_GROUP} ¶
858 "{Src}region-cache.h" ¶
866 "{Includes}sys:types.h" ¶
867 "{Includes}sys:stat.h" ¶
876 {DISPEXTERN_H_GROUP} ¶
877 {BLOCKINPUT_H_GROUP} ¶
879 {INTERVALS_H_GROUP} ¶
889 {BLOCKINPUT_H_GROUP} ¶
891 "{Includes}sys:types.h" ¶
894 {Src}macselect.c.x Ä ¶
905 "{Includes}utime.h" ¶
906 "{Includes}dirent.h" ¶
907 "{Includes}sys:types.h" ¶
908 "{Includes}sys:stat.h" ¶
910 "{Includes}sys:types.h" ¶
911 "{Includes}sys:param.h" ¶
916 "{Includes}sys:time.h" ¶
917 "{Includes}utsname.h" ¶
921 {BLOCKINPUT_H_GROUP} ¶
936 {DISPEXTERN_H_GROUP} ¶
938 {INTERVALS_H_GROUP} ¶
940 {BLOCKINPUT_H_GROUP} ¶
941 "{Includes}epaths.h" ¶
946 "{Src}bitmaps:gray.xbm"
951 {BLOCKINPUT_H_GROUP} ¶
956 "{Includes}alloca.h" ¶
957 "{Includes}sys:types.h" ¶
959 "{Includes}termio.h" ¶
961 "{Includes}sys:stat.h" ¶
965 {DISPEXTERN_H_GROUP} ¶
975 {INTERVALS_H_GROUP} ¶
980 "{Includes}epaths.h" ¶
985 {Src}mactoolbox.c.x Ä ¶
994 {DISPEXTERN_H_GROUP} ¶
1000 {BLOCKINPUT_H_GROUP}
1003 #----------------------------------------#
1004 # Variables and rules for target "Clean" #
1005 #----------------------------------------#
1008 Delete -i {EmacsObjects} {MacObjects}
1009 Delete -i "{EmacsTarget}"
1010 Delete -i stdout stderr
1011 Delete -i {Make-DocFile-Objects} {Make-DocFileDir}make-docfile
1012 Delete -i "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
1013 Delete -i "{NonCarbonMakeOut}"
1014 Delete -i buildobj.lst
1017 Delete -i "Emacs CW"Å
1018 Delete -y "emacs Data"
1021 #--------------------------------------#
1022 # Variables and rules for target "Doc" #
1023 #--------------------------------------#
1025 SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o ¶
1026 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o ¶
1027 mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o ¶
1028 w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o ¶
1029 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o
1033 {Lisp}buff-menu.elc ¶
1035 {Lisp}emacs-lisp:byte-run.elc ¶
1036 {Lisp}cus-face.elc ¶
1037 {Lisp}cus-start.elc ¶
1039 {Lisp}emacs-lisp:backquote.elc ¶
1040 {Lisp}emacs-lisp:lisp-mode.elc ¶
1041 {Lisp}emacs-lisp:lisp.elc ¶
1042 {Lisp}facemenu.elc ¶
1045 {Lisp}emacs-lisp:float-sup.elc ¶
1051 {Lisp}rfn-eshadow.elc ¶
1054 {Lisp}bindings.elc ¶
1055 {Lisp}emacs-lisp:map-ynp.elc ¶
1057 {Lisp}international:mule.elc ¶
1058 {Lisp}international:mule-conf.el ¶
1059 {Lisp}international:mule-cmds.elc ¶
1060 {Lisp}international:characters.elc ¶
1061 {Lisp}international:ucs-tables.elc ¶
1062 {Lisp}international:utf-8.elc ¶
1063 {Lisp}international:utf-16.elc ¶
1064 {Lisp}international:latin-1.el ¶
1065 {Lisp}international:latin-2.el ¶
1066 {Lisp}international:latin-3.el ¶
1067 {Lisp}international:latin-4.el ¶
1068 {Lisp}international:latin-5.el ¶
1069 {Lisp}international:latin-8.el ¶
1070 {Lisp}international:latin-9.el ¶
1071 {Lisp}case-table.elc ¶
1072 {Lisp}language:chinese.elc ¶
1073 {Lisp}language:cyrillic.elc ¶
1074 {Lisp}language:indian.elc ¶
1075 {Lisp}language:devanagari.el ¶
1076 {Lisp}language:kannada.el ¶
1077 {Lisp}language:malayalam.el ¶
1078 {Lisp}language:tamil.el ¶
1079 {Lisp}language:english.el ¶
1080 {Lisp}language:ethiopic.elc ¶
1081 {Lisp}language:european.elc ¶
1082 {Lisp}language:czech.el ¶
1083 {Lisp}language:slovak.el ¶
1084 {Lisp}language:romanian.el ¶
1085 {Lisp}language:greek.el ¶
1086 {Lisp}language:hebrew.el ¶
1087 {Lisp}language:japanese.el ¶
1088 {Lisp}language:korean.el ¶
1089 {Lisp}language:lao.el ¶
1090 {Lisp}language:thai.el ¶
1091 {Lisp}language:tibetan.elc ¶
1092 {Lisp}language:vietnamese.elc ¶
1093 {Lisp}language:misc-lang.el ¶
1094 {Lisp}language:utf-8-lang.el ¶
1095 {Lisp}language:georgian.el ¶
1096 {Lisp}menu-bar.elc ¶
1098 {Lisp}register.elc ¶
1103 {Lisp}term:tty-colors.elc ¶
1104 {Lisp}font-core.elc ¶
1105 {Lisp}emacs-lisp:syntax.elc ¶
1106 {Lisp}font-lock.elc ¶
1107 {Lisp}jit-lock.elc ¶
1108 {Lisp}textmodes:fill.elc ¶
1109 {Lisp}textmodes:page.elc ¶
1110 {Lisp}textmodes:paragraphs.elc ¶
1111 {Lisp}textmodes:text-mode.elc ¶
1112 {Lisp}emacs-lisp:timer.elc ¶
1113 {Lisp}vc-hooks.elc ¶
1114 {Lisp}jka-cmpr-hook.elc ¶
1115 {Lisp}ediff-hook.elc ¶
1120 SOME_MACHINE_LISP = {Lisp}mouse.elc ¶
1121 {Lisp}select.elc {Lisp}scroll-bar.elc ¶
1122 {Lisp}vmsproc.elc {Lisp}vms-patch.elc ¶
1123 {Lisp}ls-lisp.elc {Lisp}dos-fns.elc ¶
1124 {Lisp}w32-fns.elc {Lisp}dos-w32.elc ¶
1125 {Lisp}disp-table.elc {Lisp}dos-vars.elc ¶
1126 {Lisp}tooltip.elc {Lisp}image.elc ¶
1127 {Lisp}fringe.elc {Lisp}dnd.elc ¶
1128 {Lisp}mwheel.elc {Lisp}tool-bar.elc ¶
1130 {Lisp}international:ccl.elc ¶
1131 {Lisp}international:codepage.elc ¶
1132 {Lisp}international:fontset.elc
1134 Doc Ä {DocTarget}DOC
1136 {DocTarget}DOC Ä {Makefile} {shortlisp} {SOME_MACHINE_LISP} {Make-DocFileDir}Make-DocFile buildobj.lst
1137 {Make-DocFileDir}make-docfile -d {Src} {SOME_MACHINE_OBJECTS} `Catenate buildobj.lst` > {DocTarget}DOC
1138 {Make-DocFileDir}make-docfile -a {DocTarget}DOC -d {Src} {SOME_MACHINE_LISP} {shortlisp}
1141 #-----------------------------------------------#
1142 # Variables and rules for target "Make-DocFile" #
1143 #-----------------------------------------------#
1145 Make-DocFile-Includes = -i :inc:
1148 Make-DocFile-PPCCOptions = -typecheck relaxed -w off -noMapCR ¶
1149 -d MAC_OS -d MAC_OS8 ¶
1150 {Make-DocFile-Includes} {Make-DocFile-Sym}
1152 Make-DocFile-Objects = ¶
1153 "{Lib-Src}make-docfile.c.x" ¶
1156 Make-DocFile Ä {Make-DocFileDir}Make-DocFile
1158 {Make-DocFileDir}Make-DocFile Ä {Makefile} {Make-DocFile-Objects}
1160 -o {Make-DocFileDir}Make-DocFile ¶
1161 {Make-DocFile-Sym} ¶
1162 {Make-DocFile-Objects} ¶
1165 "{SharedLibraries}InterfaceLib" ¶
1166 "{SharedLibraries}StdCLib" ¶
1167 "{SharedLibraries}MathLib" ¶
1168 "{PPCLibraries}StdCRuntime.o" ¶
1169 "{PPCLibraries}PPCCRuntime.o" ¶
1170 "{PPCLibraries}PPCToolLibs.o"
1172 "{Lib-Src}make-docfile.c.x" Ä {Makefile} "{Lib-Src}make-docfile.c"
1173 {PPCC} "{Lib-Src}make-docfile.c" -o "{Lib-Src}make-docfile.c.x" {Make-DocFile-PPCCOptions}
1175 "{Source}chdir.c.x" Ä {Makefile} "{Source}chdir.c"
1176 {PPCC} "{Source}chdir.c" -o "{Source}chdir.c.x" {Make-DocFile-PPCCOptions}
1178 # arch-tag: c9d9bc1a-142f-41da-b75e-79e0c44ffbb4