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 Ä ¶
897 "{Includes}utime.h" ¶
898 "{Includes}dirent.h" ¶
899 "{Includes}sys:types.h" ¶
900 "{Includes}sys:stat.h" ¶
902 "{Includes}sys:types.h" ¶
903 "{Includes}sys:param.h" ¶
908 "{Includes}sys:time.h" ¶
909 "{Includes}utsname.h" ¶
913 {BLOCKINPUT_H_GROUP} ¶
928 {DISPEXTERN_H_GROUP} ¶
930 {INTERVALS_H_GROUP} ¶
932 {BLOCKINPUT_H_GROUP} ¶
933 "{Includes}epaths.h" ¶
938 "{Src}bitmaps:gray.xbm"
943 {BLOCKINPUT_H_GROUP} ¶
948 "{Includes}alloca.h" ¶
949 "{Includes}sys:types.h" ¶
951 "{Includes}termio.h" ¶
953 "{Includes}sys:stat.h" ¶
957 {DISPEXTERN_H_GROUP} ¶
967 {INTERVALS_H_GROUP} ¶
972 "{Includes}epaths.h" ¶
978 #----------------------------------------#
979 # Variables and rules for target "Clean" #
980 #----------------------------------------#
983 Delete -i {EmacsObjects} {MacObjects}
984 Delete -i "{EmacsTarget}"
985 Delete -i stdout stderr
986 Delete -i {Make-DocFile-Objects} {Make-DocFileDir}make-docfile
987 Delete -i "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
988 Delete -i "{NonCarbonMakeOut}"
989 Delete -i buildobj.lst
992 Delete -i "Emacs CW"Å
993 Delete -y "emacs Data"
996 #--------------------------------------#
997 # Variables and rules for target "Doc" #
998 #--------------------------------------#
1000 SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o ¶
1001 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o ¶
1002 mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o ¶
1003 w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o ¶
1004 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o
1008 {Lisp}buff-menu.elc ¶
1010 {Lisp}emacs-lisp:byte-run.elc ¶
1011 {Lisp}cus-face.elc ¶
1012 {Lisp}cus-start.elc ¶
1014 {Lisp}emacs-lisp:backquote.elc ¶
1015 {Lisp}emacs-lisp:lisp-mode.elc ¶
1016 {Lisp}emacs-lisp:lisp.elc ¶
1017 {Lisp}facemenu.elc ¶
1020 {Lisp}emacs-lisp:float-sup.elc ¶
1028 {Lisp}bindings.elc ¶
1029 {Lisp}emacs-lisp:map-ynp.elc ¶
1031 {Lisp}international:mule.elc ¶
1032 {Lisp}international:mule-conf.el ¶
1033 {Lisp}international:mule-cmds.elc ¶
1034 {Lisp}international:characters.elc ¶
1035 {Lisp}international:ucs-tables.elc ¶
1036 {Lisp}international:utf-8.elc ¶
1037 {Lisp}international:utf-16.elc ¶
1038 {Lisp}international:latin-1.el ¶
1039 {Lisp}international:latin-2.el ¶
1040 {Lisp}international:latin-3.el ¶
1041 {Lisp}international:latin-4.el ¶
1042 {Lisp}international:latin-5.el ¶
1043 {Lisp}international:latin-8.el ¶
1044 {Lisp}international:latin-9.el ¶
1045 {Lisp}case-table.elc ¶
1046 {Lisp}language:chinese.elc ¶
1047 {Lisp}language:cyrillic.elc ¶
1048 {Lisp}language:indian.elc ¶
1049 {Lisp}language:devanagari.el ¶
1050 {Lisp}language:kannada.el ¶
1051 {Lisp}language:malayalam.el ¶
1052 {Lisp}language:tamil.el ¶
1053 {Lisp}language:english.el ¶
1054 {Lisp}language:ethiopic.elc ¶
1055 {Lisp}language:european.elc ¶
1056 {Lisp}language:czech.el ¶
1057 {Lisp}language:slovak.el ¶
1058 {Lisp}language:romanian.el ¶
1059 {Lisp}language:greek.el ¶
1060 {Lisp}language:hebrew.el ¶
1061 {Lisp}language:japanese.el ¶
1062 {Lisp}language:korean.el ¶
1063 {Lisp}language:lao.el ¶
1064 {Lisp}language:thai.el ¶
1065 {Lisp}language:tibetan.elc ¶
1066 {Lisp}language:vietnamese.elc ¶
1067 {Lisp}language:misc-lang.el ¶
1068 {Lisp}language:utf-8-lang.el ¶
1069 {Lisp}language:georgian.el ¶
1070 {Lisp}menu-bar.elc ¶
1072 {Lisp}register.elc ¶
1077 {Lisp}term:tty-colors.elc ¶
1078 {Lisp}font-core.elc ¶
1079 {Lisp}textmodes:fill.elc ¶
1080 {Lisp}textmodes:page.elc ¶
1081 {Lisp}textmodes:paragraphs.elc ¶
1082 {Lisp}textmodes:text-mode.elc ¶
1083 {Lisp}emacs-lisp:timer.elc ¶
1084 {Lisp}vc-hooks.elc ¶
1085 {Lisp}jka-cmpr-hook.elc ¶
1086 {Lisp}ediff-hook.elc ¶
1091 SOME_MACHINE_LISP = {Lisp}mouse.elc ¶
1092 {Lisp}select.elc {Lisp}scroll-bar.elc ¶
1093 {Lisp}vmsproc.elc {Lisp}vms-patch.elc ¶
1094 {Lisp}ls-lisp.elc {Lisp}dos-fns.elc ¶
1095 {Lisp}w32-fns.elc {Lisp}dos-w32.elc ¶
1096 {Lisp}disp-table.elc {Lisp}dos-vars.elc ¶
1098 {Lisp}international:ccl.elc ¶
1099 {Lisp}international:codepage.elc
1101 Doc Ä {DocTarget}DOC
1103 {DocTarget}DOC Ä {Makefile} {shortlisp} {SOME_MACHINE_LISP} {Make-DocFileDir}Make-DocFile buildobj.lst
1104 {Make-DocFileDir}make-docfile -d {Src} {SOME_MACHINE_OBJECTS} `Catenate buildobj.lst` > {DocTarget}DOC
1105 {Make-DocFileDir}make-docfile -a {DocTarget}DOC -d {Src} {SOME_MACHINE_LISP} {shortlisp}
1108 #-----------------------------------------------#
1109 # Variables and rules for target "Make-DocFile" #
1110 #-----------------------------------------------#
1112 Make-DocFile-Includes = -i :inc:
1115 Make-DocFile-PPCCOptions = -typecheck relaxed -w off -noMapCR ¶
1116 -d MAC_OS -d MAC_OS8 ¶
1117 {Make-DocFile-Includes} {Make-DocFile-Sym}
1119 Make-DocFile-Objects = ¶
1120 "{Lib-Src}make-docfile.c.x" ¶
1123 Make-DocFile Ä {Make-DocFileDir}Make-DocFile
1125 {Make-DocFileDir}Make-DocFile Ä {Makefile} {Make-DocFile-Objects}
1127 -o {Make-DocFileDir}Make-DocFile ¶
1128 {Make-DocFile-Sym} ¶
1129 {Make-DocFile-Objects} ¶
1132 "{SharedLibraries}InterfaceLib" ¶
1133 "{SharedLibraries}StdCLib" ¶
1134 "{SharedLibraries}MathLib" ¶
1135 "{PPCLibraries}StdCRuntime.o" ¶
1136 "{PPCLibraries}PPCCRuntime.o" ¶
1137 "{PPCLibraries}PPCToolLibs.o"
1139 "{Lib-Src}make-docfile.c.x" Ä {Makefile} "{Lib-Src}make-docfile.c"
1140 {PPCC} "{Lib-Src}make-docfile.c" -o "{Lib-Src}make-docfile.c.x" {Make-DocFile-PPCCOptions}
1142 "{Source}chdir.c.x" Ä {Makefile} "{Source}chdir.c"
1143 {PPCC} "{Source}chdir.c" -o "{Source}chdir.c.x" {Make-DocFile-PPCCOptions}
1145 # arch-tag: c9d9bc1a-142f-41da-b75e-79e0c44ffbb4