1 # Make file for building GNU Emacs on the Macintosh.
2 # Copyright (C) 1999, 2000, 2002, 2003, 2004,
3 # 2005 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 2, 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" ¶
381 {DISPEXTERN_H_GROUP} ¶
389 {INTERVALS_H_GROUP} ¶
390 {BLOCKINPUT_H_GROUP} ¶
401 "{Includes}sys:types.h" ¶
402 "{Includes}sys:file.h" ¶
415 "{Includes}sys:types.h" ¶
418 {INTERVALS_H_GROUP} ¶
425 "{Includes}sys:time.h"
429 "{Includes}sys:types.h" ¶
430 "{Includes}sys:file.h" ¶
431 "{Includes}sys:types.h" ¶
432 "{Includes}sys:stat.h" ¶
435 {INTERVALS_H_GROUP} ¶
438 "{Includes}termio.h" ¶
439 {BLOCKINPUT_H_GROUP} ¶
449 {BLOCKINPUT_H_GROUP} ¶
456 "{Includes}sys:types.h" ¶
457 "{Includes}sys:stat.h" ¶
460 {INTERVALS_H_GROUP} ¶
467 "{Includes}sys:time.h" ¶
470 {Src}filemode.c.x Ä ¶
472 "{Includes}sys:types.h" ¶
473 "{Includes}sys:stat.h"
475 {Src}floatfns.c.x Ä ¶
487 {INTERVALS_H_GROUP} ¶
498 {DISPEXTERN_H_GROUP} ¶
513 {BLOCKINPUT_H_GROUP} ¶
514 {DISPEXTERN_H_GROUP} ¶
528 {Src}getloadavg.c.x Ä ¶
530 "{Includes}sys:types.h"
537 {DISPEXTERN_H_GROUP} ¶
538 {BLOCKINPUT_H_GROUP} ¶
539 "{Includes}epaths.h" ¶
543 "{Includes}sys:stat.h" ¶
544 "{Includes}alloca.h" ¶
545 "{Includes}sys:param.h"
559 {INTERVALS_H_GROUP} ¶
560 "{Src}region-cache.h"
565 {INTERVALS_H_GROUP} ¶
569 {BLOCKINPUT_H_GROUP} ¶
570 "{Src}region-cache.h"
572 {Src}intervals.c.x Ä ¶
575 {INTERVALS_H_GROUP} ¶
580 {Src}keyboard.c.x Ä ¶
592 {DISPEXTERN_H_GROUP} ¶
595 {INTERVALS_H_GROUP} ¶
596 {BLOCKINPUT_H_GROUP} ¶
600 "{Includes}sys:ioctl.h" ¶
603 "{Includes}termio.h" ¶
604 "{Includes}sys:types.h" ¶
618 {BLOCKINPUT_H_GROUP} ¶
622 {Src}lastfile.c.x Ä ¶
627 "{Includes}sys:types.h" ¶
628 "{Includes}sys:stat.h" ¶
629 "{Includes}sys:file.h" ¶
631 {INTERVALS_H_GROUP} ¶
634 "{Includes}epaths.h" ¶
660 {DISPEXTERN_H_GROUP} ¶
668 "{Includes}sys:types.h"
678 {DISPEXTERN_H_GROUP} ¶
685 "{Includes}sys:types.h" ¶
688 "{Includes}sys:time.h" ¶
697 "{Includes}sys:types.h" ¶
705 {Src}region-cache.c.x Ä ¶
709 "{Src}region-cache.h"
715 {DISPEXTERN_H_GROUP} ¶
726 "{Src}region-cache.h" ¶
728 {BLOCKINPUT_H_GROUP} ¶
729 {INTERVALS_H_GROUP} ¶
730 "{Includes}sys:types.h" ¶
733 {Src}strftime.c.x Ä ¶
735 "{Includes}sys:types.h" ¶
736 "{Includes}sys:time.h"
745 {INTERVALS_H_GROUP} ¶
751 {BLOCKINPUT_H_GROUP} ¶
752 "{Includes}sys:types.h" ¶
753 "{Includes}sys:stat.h" ¶
754 "{Includes}sys:ioctl.h" ¶
756 "{Includes}sys:types.h" ¶
762 {DISPEXTERN_H_GROUP} ¶
766 "{Includes}utime.h" ¶
768 "{Includes}dirent.h" ¶
769 "{Includes}sys:types.h"
783 {DISPEXTERN_H_GROUP} ¶
793 "{Includes}sys:file.h"
795 {Src}textproc.c.x Ä ¶
798 {INTERVALS_H_GROUP} ¶
823 {DISPEXTERN_H_GROUP} ¶
824 {BLOCKINPUT_H_GROUP} ¶
825 {INTERVALS_H_GROUP} ¶
836 {DISPEXTERN_H_GROUP} ¶
842 {BLOCKINPUT_H_GROUP} ¶
845 {INTERVALS_H_GROUP} ¶
851 "{Src}region-cache.h" ¶
859 "{Includes}sys:types.h" ¶
860 "{Includes}sys:stat.h" ¶
869 {DISPEXTERN_H_GROUP} ¶
870 {BLOCKINPUT_H_GROUP} ¶
872 {INTERVALS_H_GROUP} ¶
882 {BLOCKINPUT_H_GROUP} ¶
884 "{Includes}sys:types.h" ¶
887 {Src}macselect.c.x Ä ¶
898 "{Includes}utime.h" ¶
899 "{Includes}dirent.h" ¶
900 "{Includes}sys:types.h" ¶
901 "{Includes}sys:stat.h" ¶
903 "{Includes}sys:types.h" ¶
904 "{Includes}sys:param.h" ¶
909 "{Includes}sys:time.h" ¶
910 "{Includes}utsname.h" ¶
914 {BLOCKINPUT_H_GROUP} ¶
929 {DISPEXTERN_H_GROUP} ¶
931 {INTERVALS_H_GROUP} ¶
933 {BLOCKINPUT_H_GROUP} ¶
934 "{Includes}epaths.h" ¶
939 "{Src}bitmaps:gray.xbm"
944 {BLOCKINPUT_H_GROUP} ¶
949 "{Includes}alloca.h" ¶
950 "{Includes}sys:types.h" ¶
952 "{Includes}termio.h" ¶
954 "{Includes}sys:stat.h" ¶
958 {DISPEXTERN_H_GROUP} ¶
968 {INTERVALS_H_GROUP} ¶
973 "{Includes}epaths.h" ¶
979 #----------------------------------------#
980 # Variables and rules for target "Clean" #
981 #----------------------------------------#
984 Delete -i {EmacsObjects} {MacObjects}
985 Delete -i "{EmacsTarget}"
986 Delete -i stdout stderr
987 Delete -i {Make-DocFile-Objects} {Make-DocFileDir}make-docfile
988 Delete -i "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
989 Delete -i "{NonCarbonMakeOut}"
990 Delete -i buildobj.lst
993 Delete -i "Emacs CW"Å
994 Delete -y "emacs Data"
997 #--------------------------------------#
998 # Variables and rules for target "Doc" #
999 #--------------------------------------#
1001 SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o ¶
1002 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o ¶
1003 mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o ¶
1004 w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o ¶
1005 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o
1009 {Lisp}buff-menu.elc ¶
1011 {Lisp}emacs-lisp:byte-run.elc ¶
1012 {Lisp}cus-face.elc ¶
1013 {Lisp}cus-start.elc ¶
1015 {Lisp}emacs-lisp:backquote.elc ¶
1016 {Lisp}emacs-lisp:lisp-mode.elc ¶
1017 {Lisp}emacs-lisp:lisp.elc ¶
1018 {Lisp}facemenu.elc ¶
1021 {Lisp}emacs-lisp:float-sup.elc ¶
1029 {Lisp}bindings.elc ¶
1030 {Lisp}emacs-lisp:map-ynp.elc ¶
1032 {Lisp}international:mule.elc ¶
1033 {Lisp}international:mule-conf.el ¶
1034 {Lisp}international:mule-cmds.elc ¶
1035 {Lisp}international:characters.elc ¶
1036 {Lisp}international:ucs-tables.elc ¶
1037 {Lisp}international:utf-8.elc ¶
1038 {Lisp}international:utf-16.elc ¶
1039 {Lisp}international:latin-1.el ¶
1040 {Lisp}international:latin-2.el ¶
1041 {Lisp}international:latin-3.el ¶
1042 {Lisp}international:latin-4.el ¶
1043 {Lisp}international:latin-5.el ¶
1044 {Lisp}international:latin-8.el ¶
1045 {Lisp}international:latin-9.el ¶
1046 {Lisp}case-table.elc ¶
1047 {Lisp}language:chinese.elc ¶
1048 {Lisp}language:cyrillic.elc ¶
1049 {Lisp}language:indian.elc ¶
1050 {Lisp}language:devanagari.el ¶
1051 {Lisp}language:kannada.el ¶
1052 {Lisp}language:malayalam.el ¶
1053 {Lisp}language:tamil.el ¶
1054 {Lisp}language:english.el ¶
1055 {Lisp}language:ethiopic.elc ¶
1056 {Lisp}language:european.elc ¶
1057 {Lisp}language:czech.el ¶
1058 {Lisp}language:slovak.el ¶
1059 {Lisp}language:romanian.el ¶
1060 {Lisp}language:greek.el ¶
1061 {Lisp}language:hebrew.el ¶
1062 {Lisp}language:japanese.el ¶
1063 {Lisp}language:korean.el ¶
1064 {Lisp}language:lao.el ¶
1065 {Lisp}language:thai.el ¶
1066 {Lisp}language:tibetan.elc ¶
1067 {Lisp}language:vietnamese.elc ¶
1068 {Lisp}language:misc-lang.el ¶
1069 {Lisp}language:utf-8-lang.el ¶
1070 {Lisp}language:georgian.el ¶
1071 {Lisp}menu-bar.elc ¶
1073 {Lisp}register.elc ¶
1078 {Lisp}term:tty-colors.elc ¶
1079 {Lisp}font-core.elc ¶
1080 {Lisp}emacs-lisp:syntax.elc ¶
1081 {Lisp}font-lock.elc ¶
1082 {Lisp}jit-lock.elc ¶
1083 {Lisp}textmodes:fill.elc ¶
1084 {Lisp}textmodes:page.elc ¶
1085 {Lisp}textmodes:paragraphs.elc ¶
1086 {Lisp}textmodes:text-mode.elc ¶
1087 {Lisp}emacs-lisp:timer.elc ¶
1088 {Lisp}vc-hooks.elc ¶
1089 {Lisp}jka-cmpr-hook.elc ¶
1090 {Lisp}ediff-hook.elc ¶
1095 SOME_MACHINE_LISP = {Lisp}mouse.elc ¶
1096 {Lisp}select.elc {Lisp}scroll-bar.elc ¶
1097 {Lisp}vmsproc.elc {Lisp}vms-patch.elc ¶
1098 {Lisp}ls-lisp.elc {Lisp}dos-fns.elc ¶
1099 {Lisp}w32-fns.elc {Lisp}dos-w32.elc ¶
1100 {Lisp}disp-table.elc {Lisp}dos-vars.elc ¶
1102 {Lisp}international:ccl.elc ¶
1103 {Lisp}international:codepage.elc
1105 Doc Ä {DocTarget}DOC
1107 {DocTarget}DOC Ä {Makefile} {shortlisp} {SOME_MACHINE_LISP} {Make-DocFileDir}Make-DocFile buildobj.lst
1108 {Make-DocFileDir}make-docfile -d {Src} {SOME_MACHINE_OBJECTS} `Catenate buildobj.lst` > {DocTarget}DOC
1109 {Make-DocFileDir}make-docfile -a {DocTarget}DOC -d {Src} {SOME_MACHINE_LISP} {shortlisp}
1112 #-----------------------------------------------#
1113 # Variables and rules for target "Make-DocFile" #
1114 #-----------------------------------------------#
1116 Make-DocFile-Includes = -i :inc:
1119 Make-DocFile-PPCCOptions = -typecheck relaxed -w off -noMapCR ¶
1120 -d MAC_OS -d MAC_OS8 ¶
1121 {Make-DocFile-Includes} {Make-DocFile-Sym}
1123 Make-DocFile-Objects = ¶
1124 "{Lib-Src}make-docfile.c.x" ¶
1127 Make-DocFile Ä {Make-DocFileDir}Make-DocFile
1129 {Make-DocFileDir}Make-DocFile Ä {Makefile} {Make-DocFile-Objects}
1131 -o {Make-DocFileDir}Make-DocFile ¶
1132 {Make-DocFile-Sym} ¶
1133 {Make-DocFile-Objects} ¶
1136 "{SharedLibraries}InterfaceLib" ¶
1137 "{SharedLibraries}StdCLib" ¶
1138 "{SharedLibraries}MathLib" ¶
1139 "{PPCLibraries}StdCRuntime.o" ¶
1140 "{PPCLibraries}PPCCRuntime.o" ¶
1141 "{PPCLibraries}PPCToolLibs.o"
1143 "{Lib-Src}make-docfile.c.x" Ä {Makefile} "{Lib-Src}make-docfile.c"
1144 {PPCC} "{Lib-Src}make-docfile.c" -o "{Lib-Src}make-docfile.c.x" {Make-DocFile-PPCCOptions}
1146 "{Source}chdir.c.x" Ä {Makefile} "{Source}chdir.c"
1147 {PPCC} "{Source}chdir.c" -o "{Source}chdir.c.x" {Make-DocFile-PPCCOptions}
1149 # arch-tag: c9d9bc1a-142f-41da-b75e-79e0c44ffbb4