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" ¶
139 "{SharedLibraries}CarbonLib" ¶
140 "{SharedLibraries}StdCLib" ¶
141 "{PPCLibraries}StdCRuntime.o" ¶
142 "{PPCLibraries}PPCCRuntime.o"
145 "{SharedLibraries}InterfaceLib" ¶
146 "{SharedLibraries}StdCLib" ¶
147 "{SharedLibraries}MathLib" ¶
148 "{SharedLibraries}AppleScriptLib" ¶
149 "{SharedLibraries}LocalesLib" ¶
150 "{SharedLibraries}AppearanceLib" ¶
151 "{SharedLibraries}QuickTimeLib" ¶
152 "{PPCLibraries}StdCRuntime.o" ¶
153 "{PPCLibraries}PPCCRuntime.o" ¶
154 "{PPCLibraries}PPCToolLibs.o"
156 # The next two are the dependency rules for building Emacs.
158 Emacs ÄÄ {Makefile} buildobj.lst {DocTarget}DOC {EmacsObjects} {MacObjects}
161 {EmacsObjects} {MacObjects} ¶
165 Emacs ÄÄ {Makefile} "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
166 Rez {CarbonOption} -a "{Source}"Emacs.maclf.r -o "{EmacsTarget}"
167 Rez {CarbonOption} -a "{Source}"EmacsMPW.maclf.r -o "{EmacsTarget}"
168 SetFile "{EmacsTarget}" -t APPL -c 'EMAx' -a B
171 Make -f "{Makefile}" -d CarbonOption="" -d StdLibraries='{NonCarbonLibs}' > "{NonCarbonMakeOut}"
174 # Rez cannot handle files with Unix style end lines at all. So generate
175 # them. It does not hurt if Emacs.r and EmacsMPW.r already have Mac end
178 "{Source}"Emacs.maclf.r Ä "{Source}"Emacs.r
179 translate ¶0x0a ¶n < "{Source}"Emacs.r > "{Source}"Emacs.maclf.r
181 "{Source}"EmacsMPW.maclf.r Ä "{Source}"EmacsMPW.r
182 translate ¶0x0a ¶n < "{Source}"EmacsMPW.r > "{Source}"EmacsMPW.maclf.r
185 Echo "{EmacsObjects} {MacObjects}" | StreamEdit -e '1,$ Replace -c ° /[Â ]*:([Â: ]*)¨1.c.x/ ¨1".o"' > buildobj.lst
187 # Here comes a long boring list of rules saying which files depend on which
188 # other ones. I generated them by hand using the "-p" option of the MrC compiler.
189 # Know about MakeMake, but this is probably more accurate.
203 {INTERVALS_H_GROUP} ¶
208 {BLOCKINPUT_H_GROUP} ¶
223 "{Includes}sys:time.h" ¶
224 {BLOCKINPUT_H_GROUP} ¶
226 "{Includes}sys:time.h"
230 "{Includes}sys:types.h" ¶
231 "{Includes}sys:stat.h" ¶
232 "{Includes}sys:param.h" ¶
234 {INTERVALS_H_GROUP} ¶
239 "{Src}region-cache.h" ¶
241 {BLOCKINPUT_H_GROUP} ¶
244 {Src}bytecode.c.x Ä ¶
259 {Src}callproc.c.x Ä ¶
261 "{Includes}sys:types.h" ¶
262 "{Includes}sys:file.h" ¶
263 "{Includes}sys:types.h" ¶
264 "{Includes}sys:stat.h" ¶
272 "{Includes}epaths.h" ¶
293 {Src}category.c.x Ä ¶
309 "{Includes}sys:types.h" ¶
343 {Src}composite.c.x Ä ¶
362 "{Includes}sys:types.h" ¶
363 "{Includes}sys:stat.h" ¶
365 "{Includes}sys:time.h" ¶
366 "{Includes}dirent.h" ¶
382 {DISPEXTERN_H_GROUP} ¶
390 {INTERVALS_H_GROUP} ¶
391 {BLOCKINPUT_H_GROUP} ¶
402 "{Includes}sys:types.h" ¶
403 "{Includes}sys:file.h" ¶
416 "{Includes}sys:types.h" ¶
419 {INTERVALS_H_GROUP} ¶
426 "{Includes}sys:time.h" ¶
431 "{Includes}sys:types.h" ¶
432 "{Includes}sys:file.h" ¶
433 "{Includes}sys:types.h" ¶
434 "{Includes}sys:stat.h" ¶
437 {INTERVALS_H_GROUP} ¶
440 "{Includes}termio.h" ¶
441 {BLOCKINPUT_H_GROUP} ¶
451 {BLOCKINPUT_H_GROUP} ¶
458 "{Includes}sys:types.h" ¶
459 "{Includes}sys:stat.h" ¶
462 {INTERVALS_H_GROUP} ¶
469 "{Includes}sys:time.h" ¶
473 {Src}filemode.c.x Ä ¶
475 "{Includes}sys:types.h" ¶
476 "{Includes}sys:stat.h"
478 {Src}floatfns.c.x Ä ¶
490 {INTERVALS_H_GROUP} ¶
501 {DISPEXTERN_H_GROUP} ¶
516 {BLOCKINPUT_H_GROUP} ¶
517 {DISPEXTERN_H_GROUP} ¶
531 {Src}getloadavg.c.x Ä ¶
533 "{Includes}sys:types.h"
540 {DISPEXTERN_H_GROUP} ¶
541 {BLOCKINPUT_H_GROUP} ¶
542 "{Includes}epaths.h" ¶
546 "{Includes}sys:stat.h" ¶
547 "{Includes}alloca.h" ¶
548 "{Includes}sys:param.h"
562 {INTERVALS_H_GROUP} ¶
563 "{Src}region-cache.h"
568 {INTERVALS_H_GROUP} ¶
572 {BLOCKINPUT_H_GROUP} ¶
573 "{Src}region-cache.h"
575 {Src}intervals.c.x Ä ¶
578 {INTERVALS_H_GROUP} ¶
583 {Src}keyboard.c.x Ä ¶
595 {DISPEXTERN_H_GROUP} ¶
598 {INTERVALS_H_GROUP} ¶
599 {BLOCKINPUT_H_GROUP} ¶
603 "{Includes}sys:ioctl.h" ¶
606 "{Includes}termio.h" ¶
607 "{Includes}sys:types.h" ¶
621 {BLOCKINPUT_H_GROUP} ¶
625 {Src}lastfile.c.x Ä ¶
630 "{Includes}sys:types.h" ¶
631 "{Includes}sys:stat.h" ¶
632 "{Includes}sys:file.h" ¶
634 {INTERVALS_H_GROUP} ¶
637 "{Includes}epaths.h" ¶
664 {DISPEXTERN_H_GROUP} ¶
672 "{Includes}sys:types.h"
682 {DISPEXTERN_H_GROUP} ¶
685 {INTERVALS_H_GROUP} ¶
690 "{Includes}sys:types.h" ¶
693 "{Includes}sys:time.h" ¶
702 "{Includes}sys:types.h" ¶
710 {Src}region-cache.c.x Ä ¶
714 "{Src}region-cache.h"
720 {DISPEXTERN_H_GROUP} ¶
731 "{Src}region-cache.h" ¶
733 {BLOCKINPUT_H_GROUP} ¶
734 {INTERVALS_H_GROUP} ¶
735 "{Includes}sys:types.h" ¶
738 {Src}strftime.c.x Ä ¶
740 "{Includes}sys:types.h" ¶
741 "{Includes}sys:time.h"
750 {INTERVALS_H_GROUP} ¶
756 {BLOCKINPUT_H_GROUP} ¶
757 "{Includes}sys:types.h" ¶
758 "{Includes}sys:stat.h" ¶
759 "{Includes}sys:ioctl.h" ¶
761 "{Includes}sys:types.h" ¶
767 {DISPEXTERN_H_GROUP} ¶
771 "{Includes}utime.h" ¶
773 "{Includes}dirent.h" ¶
774 "{Includes}sys:types.h"
788 {DISPEXTERN_H_GROUP} ¶
799 "{Includes}sys:file.h"
801 {Src}textproc.c.x Ä ¶
804 {INTERVALS_H_GROUP} ¶
829 {DISPEXTERN_H_GROUP} ¶
830 {BLOCKINPUT_H_GROUP} ¶
831 {INTERVALS_H_GROUP} ¶
842 {DISPEXTERN_H_GROUP} ¶
848 {BLOCKINPUT_H_GROUP} ¶
851 {INTERVALS_H_GROUP} ¶
857 "{Src}region-cache.h" ¶
865 "{Includes}sys:types.h" ¶
866 "{Includes}sys:stat.h" ¶
875 {DISPEXTERN_H_GROUP} ¶
876 {BLOCKINPUT_H_GROUP} ¶
878 {INTERVALS_H_GROUP} ¶
888 {BLOCKINPUT_H_GROUP} ¶
890 "{Includes}sys:types.h" ¶
893 {Src}macselect.c.x Ä ¶
904 "{Includes}utime.h" ¶
905 "{Includes}dirent.h" ¶
906 "{Includes}sys:types.h" ¶
907 "{Includes}sys:stat.h" ¶
909 "{Includes}sys:types.h" ¶
910 "{Includes}sys:param.h" ¶
915 "{Includes}sys:time.h" ¶
916 "{Includes}utsname.h" ¶
920 {BLOCKINPUT_H_GROUP} ¶
935 {DISPEXTERN_H_GROUP} ¶
937 {INTERVALS_H_GROUP} ¶
939 {BLOCKINPUT_H_GROUP} ¶
940 "{Includes}epaths.h" ¶
945 "{Src}bitmaps:gray.xbm"
950 {BLOCKINPUT_H_GROUP} ¶
955 "{Includes}alloca.h" ¶
956 "{Includes}sys:types.h" ¶
958 "{Includes}termio.h" ¶
960 "{Includes}sys:stat.h" ¶
964 {DISPEXTERN_H_GROUP} ¶
974 {INTERVALS_H_GROUP} ¶
979 "{Includes}epaths.h" ¶
985 #----------------------------------------#
986 # Variables and rules for target "Clean" #
987 #----------------------------------------#
990 Delete -i {EmacsObjects} {MacObjects}
991 Delete -i "{EmacsTarget}"
992 Delete -i stdout stderr
993 Delete -i {Make-DocFile-Objects} {Make-DocFileDir}make-docfile
994 Delete -i "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
995 Delete -i "{NonCarbonMakeOut}"
996 Delete -i buildobj.lst
999 Delete -i "Emacs CW"Å
1000 Delete -y "emacs Data"
1003 #--------------------------------------#
1004 # Variables and rules for target "Doc" #
1005 #--------------------------------------#
1007 SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o ¶
1008 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o ¶
1009 mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o ¶
1010 w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o ¶
1011 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o
1015 {Lisp}buff-menu.elc ¶
1017 {Lisp}emacs-lisp:byte-run.elc ¶
1018 {Lisp}cus-face.elc ¶
1019 {Lisp}cus-start.elc ¶
1021 {Lisp}emacs-lisp:backquote.elc ¶
1022 {Lisp}emacs-lisp:lisp-mode.elc ¶
1023 {Lisp}emacs-lisp:lisp.elc ¶
1024 {Lisp}facemenu.elc ¶
1027 {Lisp}emacs-lisp:float-sup.elc ¶
1033 {Lisp}rfn-eshadow.elc ¶
1036 {Lisp}bindings.elc ¶
1037 {Lisp}emacs-lisp:map-ynp.elc ¶
1039 {Lisp}international:mule.elc ¶
1040 {Lisp}international:mule-conf.el ¶
1041 {Lisp}international:mule-cmds.elc ¶
1042 {Lisp}international:characters.elc ¶
1043 {Lisp}international:ucs-tables.elc ¶
1044 {Lisp}international:utf-8.elc ¶
1045 {Lisp}international:utf-16.elc ¶
1046 {Lisp}international:latin-1.el ¶
1047 {Lisp}international:latin-2.el ¶
1048 {Lisp}international:latin-3.el ¶
1049 {Lisp}international:latin-4.el ¶
1050 {Lisp}international:latin-5.el ¶
1051 {Lisp}international:latin-8.el ¶
1052 {Lisp}international:latin-9.el ¶
1053 {Lisp}case-table.elc ¶
1054 {Lisp}language:chinese.elc ¶
1055 {Lisp}language:cyrillic.elc ¶
1056 {Lisp}language:indian.elc ¶
1057 {Lisp}language:devanagari.el ¶
1058 {Lisp}language:kannada.el ¶
1059 {Lisp}language:malayalam.el ¶
1060 {Lisp}language:tamil.el ¶
1061 {Lisp}language:english.el ¶
1062 {Lisp}language:ethiopic.elc ¶
1063 {Lisp}language:european.elc ¶
1064 {Lisp}language:czech.el ¶
1065 {Lisp}language:slovak.el ¶
1066 {Lisp}language:romanian.el ¶
1067 {Lisp}language:greek.el ¶
1068 {Lisp}language:hebrew.el ¶
1069 {Lisp}language:japanese.el ¶
1070 {Lisp}language:korean.el ¶
1071 {Lisp}language:lao.el ¶
1072 {Lisp}language:thai.el ¶
1073 {Lisp}language:tibetan.elc ¶
1074 {Lisp}language:vietnamese.elc ¶
1075 {Lisp}language:misc-lang.el ¶
1076 {Lisp}language:utf-8-lang.el ¶
1077 {Lisp}language:georgian.el ¶
1078 {Lisp}menu-bar.elc ¶
1080 {Lisp}register.elc ¶
1085 {Lisp}term:tty-colors.elc ¶
1086 {Lisp}font-core.elc ¶
1087 {Lisp}emacs-lisp:syntax.elc ¶
1088 {Lisp}font-lock.elc ¶
1089 {Lisp}jit-lock.elc ¶
1090 {Lisp}textmodes:fill.elc ¶
1091 {Lisp}textmodes:page.elc ¶
1092 {Lisp}textmodes:paragraphs.elc ¶
1093 {Lisp}textmodes:text-mode.elc ¶
1094 {Lisp}emacs-lisp:timer.elc ¶
1095 {Lisp}vc-hooks.elc ¶
1096 {Lisp}jka-cmpr-hook.elc ¶
1097 {Lisp}ediff-hook.elc ¶
1102 SOME_MACHINE_LISP = {Lisp}mouse.elc ¶
1103 {Lisp}select.elc {Lisp}scroll-bar.elc ¶
1104 {Lisp}vmsproc.elc {Lisp}vms-patch.elc ¶
1105 {Lisp}ls-lisp.elc {Lisp}dos-fns.elc ¶
1106 {Lisp}w32-fns.elc {Lisp}dos-w32.elc ¶
1107 {Lisp}disp-table.elc {Lisp}dos-vars.elc ¶
1108 {Lisp}tooltip.elc {Lisp}image.elc ¶
1109 {Lisp}fringe.elc {Lisp}dnd.elc ¶
1110 {Lisp}mwheel.elc {Lisp}tool-bar.elc ¶
1112 {Lisp}international:ccl.elc ¶
1113 {Lisp}international:codepage.elc ¶
1114 {Lisp}international:fontset.elc
1116 Doc Ä {DocTarget}DOC
1118 {DocTarget}DOC Ä {Makefile} {shortlisp} {SOME_MACHINE_LISP} {Make-DocFileDir}Make-DocFile buildobj.lst
1119 {Make-DocFileDir}make-docfile -d {Src} {SOME_MACHINE_OBJECTS} `Catenate buildobj.lst` > {DocTarget}DOC
1120 {Make-DocFileDir}make-docfile -a {DocTarget}DOC -d {Src} {SOME_MACHINE_LISP} {shortlisp}
1123 #-----------------------------------------------#
1124 # Variables and rules for target "Make-DocFile" #
1125 #-----------------------------------------------#
1127 Make-DocFile-Includes = -i :inc:
1130 Make-DocFile-PPCCOptions = -typecheck relaxed -w off -noMapCR ¶
1131 -d MAC_OS -d MAC_OS8 ¶
1132 {Make-DocFile-Includes} {Make-DocFile-Sym}
1134 Make-DocFile-Objects = ¶
1135 "{Lib-Src}make-docfile.c.x" ¶
1138 Make-DocFile Ä {Make-DocFileDir}Make-DocFile
1140 {Make-DocFileDir}Make-DocFile Ä {Makefile} {Make-DocFile-Objects}
1142 -o {Make-DocFileDir}Make-DocFile ¶
1143 {Make-DocFile-Sym} ¶
1144 {Make-DocFile-Objects} ¶
1147 "{SharedLibraries}InterfaceLib" ¶
1148 "{SharedLibraries}StdCLib" ¶
1149 "{SharedLibraries}MathLib" ¶
1150 "{PPCLibraries}StdCRuntime.o" ¶
1151 "{PPCLibraries}PPCCRuntime.o" ¶
1152 "{PPCLibraries}PPCToolLibs.o"
1154 "{Lib-Src}make-docfile.c.x" Ä {Makefile} "{Lib-Src}make-docfile.c"
1155 {PPCC} "{Lib-Src}make-docfile.c" -o "{Lib-Src}make-docfile.c.x" {Make-DocFile-PPCCOptions}
1157 "{Source}chdir.c.x" Ä {Makefile} "{Source}chdir.c"
1158 {PPCC} "{Source}chdir.c" -o "{Source}chdir.c.x" {Make-DocFile-PPCCOptions}
1160 # arch-tag: c9d9bc1a-142f-41da-b75e-79e0c44ffbb4