1 # Make file for building GNU Emacs on the Macintosh.
2 # Copyright (C) 1999, 2000 Free Software Foundation, Inc.
4 # Author: Andrew Choi <akochoi@users.sourceforge.net>
6 # This file is part of GNU Emacs.
8 # GNU Emacs is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
13 # GNU Emacs is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Emacs; see the file COPYING. If not, write to
20 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 # Boston, MA 02110-1301, USA. */
23 # Defines the following targets:
24 # Emacs (default) - normal Carbon Emacs build.
25 # NonCarbon - non-Carbon Emacs build.
26 # Clean - remove all object and executable files to prepare for a fresh build.
27 # Doc - generate the "DOC" file in ~emacs/etc/.
28 # Make-DocFile - build the make-docfile tool, utility for generating "DOC".
30 Src = ::src: # emacs's src directory
31 Includes = :inc: # mac includes directory (common for MPW and CW)
32 Source = :src: # mac source directory
33 Lib-Src = ::lib-src: # ~emacs/lib-src directory, containing make-docfile.c
34 EmacsTarget = :Emacs MPW # pathname of target executable file
35 DocTarget = ::etc: # where the generated DOC file should be placed
36 Lisp = ::lisp: # emacs's lisp directory
37 Make-DocFileDir = {Lib-Src} # directory containing make-docfile tool
39 Makefile = makefile.MPW # self reference
40 NonCarbonMakeOut = NonCarbon.MakeOut # temporary file for non-Carbon build script
42 CarbonOption = -d HAVE_CARBON
43 SymOption = # -sym on # remove hash mark before "-sym on" to enable source debugging
44 OptOption = # -opt speed # alternatively set to -opt off or -opt size
46 # The -noMapCR options and the two -d's must not be removed.
48 PPCCOptions = {SymOption} {OptOption} -noMapCR -enum int -alloca ¶
49 -typecheck relaxed -w off ¶
50 -includes unix -i {Includes},{Src} ¶
51 -d emacs=1 -d HAVE_CONFIG_H -d MAC_OS -d MAC_OS8 {CarbonOption}
53 LinkOptions = {SymOption} -d
55 CONFIG_H_GROUP = "{Includes}config.h" "{Includes}s-mac.h" "{Includes}utsname.h" "{Includes}m-mac.h"
56 DISPEXTERN_H_GROUP = "{Src}dispextern.h" "{Src}macgui.h"
57 INTERVALS_H_GROUP = "{Src}intervals.h" "{Src}dispextern.h" "{Src}macgui.h"
58 WINDOW_H_GROUP = "{Src}window.h" {DISPEXTERN_H_GROUP}
59 BLOCKINPUT_H_GROUP = "{Src}blockinput.h" "{Src}atimer.h" "{Src}systime.h" ¶
60 "{Includes}sys:time.h" "{Includes}sys:time.h"
62 # The list all object files from the GNU Emacs 21.0 distribution.
72 "{Src}casefiddle.c.x" ¶
80 "{Src}composite.c.x" ¶
96 "{Src}getloadavg.c.x" ¶
100 "{Src}intervals.c.x" ¶
101 "{Src}keyboard.c.x" ¶
112 "{Src}region-cache.c.x" ¶
115 "{Src}strftime.c.x" ¶
120 "{Src}textprop.c.x" ¶
128 # The list of object files generated from new source files of the Macintosh port.
134 "{Src}macselect.c.x" ¶
138 "{SharedLibraries}CarbonLib" ¶
139 "{SharedLibraries}StdCLib" ¶
140 "{PPCLibraries}StdCRuntime.o" ¶
141 "{PPCLibraries}PPCCRuntime.o"
144 "{SharedLibraries}InterfaceLib" ¶
145 "{SharedLibraries}StdCLib" ¶
146 "{SharedLibraries}MathLib" ¶
147 "{SharedLibraries}AppleScriptLib" ¶
148 "{SharedLibraries}LocalesLib" ¶
149 "{SharedLibraries}AppearanceLib" ¶
150 "{SharedLibraries}QuickTimeLib" ¶
151 "{PPCLibraries}StdCRuntime.o" ¶
152 "{PPCLibraries}PPCCRuntime.o" ¶
153 "{PPCLibraries}PPCToolLibs.o"
155 # The next two are the dependency rules for building Emacs.
157 Emacs ÄÄ {Makefile} buildobj.lst {DocTarget}DOC {EmacsObjects} {MacObjects}
160 {EmacsObjects} {MacObjects} ¶
164 Emacs ÄÄ {Makefile} "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
165 Rez {CarbonOption} -a "{Source}"Emacs.maclf.r -o "{EmacsTarget}"
166 Rez {CarbonOption} -a "{Source}"EmacsMPW.maclf.r -o "{EmacsTarget}"
167 SetFile "{EmacsTarget}" -t APPL -c 'EMAx' -a B
170 Make -f "{Makefile}" -d CarbonOption="" -d StdLibraries='{NonCarbonLibs}' > "{NonCarbonMakeOut}"
173 # Rez cannot handle files with Unix style end lines at all. So generate
174 # them. It does not hurt if Emacs.r and EmacsMPW.r already have Mac end
177 "{Source}"Emacs.maclf.r Ä "{Source}"Emacs.r
178 translate ¶0x0a ¶n < "{Source}"Emacs.r > "{Source}"Emacs.maclf.r
180 "{Source}"EmacsMPW.maclf.r Ä "{Source}"EmacsMPW.r
181 translate ¶0x0a ¶n < "{Source}"EmacsMPW.r > "{Source}"EmacsMPW.maclf.r
184 Echo "{EmacsObjects} {MacObjects}" | StreamEdit -e '1,$ Replace -c ° /[Â ]*:([Â: ]*)¨1.c.x/ ¨1".o"' > buildobj.lst
186 # Here comes a long boring list of rules saying which files depend on which
187 # other ones. I generated them by hand using the "-p" option of the MrC compiler.
188 # Know about MakeMake, but this is probably more accurate.
202 {INTERVALS_H_GROUP} ¶
207 {BLOCKINPUT_H_GROUP} ¶
222 "{Includes}sys:time.h" ¶
223 {BLOCKINPUT_H_GROUP} ¶
225 "{Includes}sys:time.h"
229 "{Includes}sys:types.h" ¶
230 "{Includes}sys:stat.h" ¶
231 "{Includes}sys:param.h" ¶
233 {INTERVALS_H_GROUP} ¶
238 "{Src}region-cache.h" ¶
240 {BLOCKINPUT_H_GROUP} ¶
243 {Src}bytecode.c.x Ä ¶
258 {Src}callproc.c.x Ä ¶
260 "{Includes}sys:types.h" ¶
261 "{Includes}sys:file.h" ¶
262 "{Includes}sys:types.h" ¶
263 "{Includes}sys:stat.h" ¶
271 "{Includes}epaths.h" ¶
292 {Src}category.c.x Ä ¶
308 "{Includes}sys:types.h" ¶
342 {Src}composite.c.x Ä ¶
361 "{Includes}sys:types.h" ¶
362 "{Includes}sys:stat.h" ¶
364 "{Includes}sys:time.h" ¶
365 "{Includes}dirent.h" ¶
380 {DISPEXTERN_H_GROUP} ¶
388 {INTERVALS_H_GROUP} ¶
389 {BLOCKINPUT_H_GROUP} ¶
400 "{Includes}sys:types.h" ¶
401 "{Includes}sys:file.h" ¶
414 "{Includes}sys:types.h" ¶
417 {INTERVALS_H_GROUP} ¶
424 "{Includes}sys:time.h"
428 "{Includes}sys:types.h" ¶
429 "{Includes}sys:file.h" ¶
430 "{Includes}sys:types.h" ¶
431 "{Includes}sys:stat.h" ¶
434 {INTERVALS_H_GROUP} ¶
437 "{Includes}termio.h" ¶
438 {BLOCKINPUT_H_GROUP} ¶
448 {BLOCKINPUT_H_GROUP} ¶
455 "{Includes}sys:types.h" ¶
456 "{Includes}sys:stat.h" ¶
459 {INTERVALS_H_GROUP} ¶
466 "{Includes}sys:time.h" ¶
469 {Src}filemode.c.x Ä ¶
471 "{Includes}sys:types.h" ¶
472 "{Includes}sys:stat.h"
474 {Src}floatfns.c.x Ä ¶
486 {INTERVALS_H_GROUP} ¶
497 {DISPEXTERN_H_GROUP} ¶
512 {BLOCKINPUT_H_GROUP} ¶
513 {DISPEXTERN_H_GROUP} ¶
527 {Src}getloadavg.c.x Ä ¶
529 "{Includes}sys:types.h"
536 {DISPEXTERN_H_GROUP} ¶
537 {BLOCKINPUT_H_GROUP} ¶
538 "{Includes}epaths.h" ¶
542 "{Includes}sys:stat.h" ¶
543 "{Includes}alloca.h" ¶
544 "{Includes}sys:param.h"
558 {INTERVALS_H_GROUP} ¶
559 "{Src}region-cache.h"
564 {INTERVALS_H_GROUP} ¶
568 {BLOCKINPUT_H_GROUP} ¶
569 "{Src}region-cache.h"
571 {Src}intervals.c.x Ä ¶
574 {INTERVALS_H_GROUP} ¶
579 {Src}keyboard.c.x Ä ¶
591 {DISPEXTERN_H_GROUP} ¶
594 {INTERVALS_H_GROUP} ¶
595 {BLOCKINPUT_H_GROUP} ¶
599 "{Includes}sys:ioctl.h" ¶
602 "{Includes}termio.h" ¶
603 "{Includes}sys:types.h" ¶
617 {BLOCKINPUT_H_GROUP} ¶
621 {Src}lastfile.c.x Ä ¶
626 "{Includes}sys:types.h" ¶
627 "{Includes}sys:stat.h" ¶
628 "{Includes}sys:file.h" ¶
630 {INTERVALS_H_GROUP} ¶
633 "{Includes}epaths.h" ¶
659 {DISPEXTERN_H_GROUP} ¶
667 "{Includes}sys:types.h"
677 {DISPEXTERN_H_GROUP} ¶
684 "{Includes}sys:types.h" ¶
687 "{Includes}sys:time.h" ¶
696 "{Includes}sys:types.h" ¶
704 {Src}region-cache.c.x Ä ¶
708 "{Src}region-cache.h"
714 {DISPEXTERN_H_GROUP} ¶
725 "{Src}region-cache.h" ¶
727 {BLOCKINPUT_H_GROUP} ¶
728 {INTERVALS_H_GROUP} ¶
729 "{Includes}sys:types.h" ¶
732 {Src}strftime.c.x Ä ¶
734 "{Includes}sys:types.h" ¶
735 "{Includes}sys:time.h"
744 {INTERVALS_H_GROUP} ¶
750 {BLOCKINPUT_H_GROUP} ¶
751 "{Includes}sys:types.h" ¶
752 "{Includes}sys:stat.h" ¶
753 "{Includes}sys:ioctl.h" ¶
755 "{Includes}sys:types.h" ¶
761 {DISPEXTERN_H_GROUP} ¶
765 "{Includes}utime.h" ¶
767 "{Includes}dirent.h" ¶
768 "{Includes}sys:types.h"
782 {DISPEXTERN_H_GROUP} ¶
792 "{Includes}sys:file.h"
794 {Src}textproc.c.x Ä ¶
797 {INTERVALS_H_GROUP} ¶
822 {DISPEXTERN_H_GROUP} ¶
823 {BLOCKINPUT_H_GROUP} ¶
824 {INTERVALS_H_GROUP} ¶
835 {DISPEXTERN_H_GROUP} ¶
841 {BLOCKINPUT_H_GROUP} ¶
844 {INTERVALS_H_GROUP} ¶
850 "{Src}region-cache.h" ¶
858 "{Includes}sys:types.h" ¶
859 "{Includes}sys:stat.h" ¶
868 {DISPEXTERN_H_GROUP} ¶
869 {BLOCKINPUT_H_GROUP} ¶
871 {INTERVALS_H_GROUP} ¶
881 {BLOCKINPUT_H_GROUP} ¶
883 "{Includes}sys:types.h" ¶
886 {Src}macselect.c.x Ä ¶
896 "{Includes}utime.h" ¶
897 "{Includes}dirent.h" ¶
898 "{Includes}sys:types.h" ¶
899 "{Includes}sys:stat.h" ¶
901 "{Includes}sys:types.h" ¶
902 "{Includes}sys:param.h" ¶
907 "{Includes}sys:time.h" ¶
908 "{Includes}utsname.h" ¶
912 {BLOCKINPUT_H_GROUP} ¶
927 {DISPEXTERN_H_GROUP} ¶
929 {INTERVALS_H_GROUP} ¶
931 {BLOCKINPUT_H_GROUP} ¶
932 "{Includes}epaths.h" ¶
937 "{Src}bitmaps:gray.xbm"
942 {BLOCKINPUT_H_GROUP} ¶
947 "{Includes}alloca.h" ¶
948 "{Includes}sys:types.h" ¶
950 "{Includes}termio.h" ¶
952 "{Includes}sys:stat.h" ¶
956 {DISPEXTERN_H_GROUP} ¶
966 {INTERVALS_H_GROUP} ¶
971 "{Includes}epaths.h" ¶
977 #----------------------------------------#
978 # Variables and rules for target "Clean" #
979 #----------------------------------------#
982 Delete -i {EmacsObjects} {MacObjects}
983 Delete -i "{EmacsTarget}"
984 Delete -i stdout stderr
985 Delete -i {Make-DocFile-Objects} {Make-DocFileDir}make-docfile
986 Delete -i "{Source}"Emacs.maclf.r "{Source}"EmacsMPW.maclf.r
987 Delete -i "{NonCarbonMakeOut}"
988 Delete -i buildobj.lst
991 Delete -i "Emacs CW"Å
992 Delete -y "emacs Data"
995 #--------------------------------------#
996 # Variables and rules for target "Doc" #
997 #--------------------------------------#
999 SOME_MACHINE_OBJECTS = sunfns.o dosfns.o msdos.o ¶
1000 xterm.o xfns.o xmenu.o xselect.o xrdb.o xsmfns.o fringe.o image.o ¶
1001 mac.o macterm.o macfns.o macmenu.o macselect.o fontset.o ¶
1002 w32.o w32bdf.o w32console.o w32fns.o w32heap.o w32inevt.o ¶
1003 w32menu.o w32proc.o w32reg.o w32select.o w32term.o w32xfns.o
1007 {Lisp}buff-menu.elc ¶
1009 {Lisp}emacs-lisp:byte-run.elc ¶
1010 {Lisp}cus-face.elc ¶
1011 {Lisp}cus-start.elc ¶
1013 {Lisp}emacs-lisp:backquote.elc ¶
1014 {Lisp}emacs-lisp:lisp-mode.elc ¶
1015 {Lisp}emacs-lisp:lisp.elc ¶
1016 {Lisp}facemenu.elc ¶
1019 {Lisp}emacs-lisp:float-sup.elc ¶
1027 {Lisp}bindings.elc ¶
1028 {Lisp}emacs-lisp:map-ynp.elc ¶
1030 {Lisp}international:mule.elc ¶
1031 {Lisp}international:mule-conf.el ¶
1032 {Lisp}international:mule-cmds.elc ¶
1033 {Lisp}international:characters.elc ¶
1034 {Lisp}international:ucs-tables.elc ¶
1035 {Lisp}international:utf-8.elc ¶
1036 {Lisp}international:utf-16.elc ¶
1037 {Lisp}international:latin-1.el ¶
1038 {Lisp}international:latin-2.el ¶
1039 {Lisp}international:latin-3.el ¶
1040 {Lisp}international:latin-4.el ¶
1041 {Lisp}international:latin-5.el ¶
1042 {Lisp}international:latin-8.el ¶
1043 {Lisp}international:latin-9.el ¶
1044 {Lisp}case-table.elc ¶
1045 {Lisp}language:chinese.elc ¶
1046 {Lisp}language:cyrillic.elc ¶
1047 {Lisp}language:indian.elc ¶
1048 {Lisp}language:devanagari.el ¶
1049 {Lisp}language:kannada.el ¶
1050 {Lisp}language:malayalam.el ¶
1051 {Lisp}language:tamil.el ¶
1052 {Lisp}language:english.el ¶
1053 {Lisp}language:ethiopic.elc ¶
1054 {Lisp}language:european.elc ¶
1055 {Lisp}language:czech.el ¶
1056 {Lisp}language:slovak.el ¶
1057 {Lisp}language:romanian.el ¶
1058 {Lisp}language:greek.el ¶
1059 {Lisp}language:hebrew.el ¶
1060 {Lisp}language:japanese.el ¶
1061 {Lisp}language:korean.el ¶
1062 {Lisp}language:lao.el ¶
1063 {Lisp}language:thai.el ¶
1064 {Lisp}language:tibetan.elc ¶
1065 {Lisp}language:vietnamese.elc ¶
1066 {Lisp}language:misc-lang.el ¶
1067 {Lisp}language:utf-8-lang.el ¶
1068 {Lisp}language:georgian.el ¶
1069 {Lisp}menu-bar.elc ¶
1071 {Lisp}register.elc ¶
1076 {Lisp}term:tty-colors.elc ¶
1077 {Lisp}font-core.elc ¶
1078 {Lisp}textmodes:fill.elc ¶
1079 {Lisp}textmodes:page.elc ¶
1080 {Lisp}textmodes:paragraphs.elc ¶
1081 {Lisp}textmodes:text-mode.elc ¶
1082 {Lisp}emacs-lisp:timer.elc ¶
1083 {Lisp}vc-hooks.elc ¶
1084 {Lisp}jka-cmpr-hook.elc ¶
1085 {Lisp}ediff-hook.elc ¶
1090 SOME_MACHINE_LISP = {Lisp}mouse.elc ¶
1091 {Lisp}select.elc {Lisp}scroll-bar.elc ¶
1092 {Lisp}vmsproc.elc {Lisp}vms-patch.elc ¶
1093 {Lisp}ls-lisp.elc {Lisp}dos-fns.elc ¶
1094 {Lisp}w32-fns.elc {Lisp}dos-w32.elc ¶
1095 {Lisp}disp-table.elc {Lisp}dos-vars.elc ¶
1097 {Lisp}international:ccl.elc ¶
1098 {Lisp}international:codepage.elc
1100 Doc Ä {DocTarget}DOC
1102 {DocTarget}DOC Ä {Makefile} {shortlisp} {SOME_MACHINE_LISP} {Make-DocFileDir}Make-DocFile buildobj.lst
1103 {Make-DocFileDir}make-docfile -d {Src} {SOME_MACHINE_OBJECTS} `Catenate buildobj.lst` > {DocTarget}DOC
1104 {Make-DocFileDir}make-docfile -a {DocTarget}DOC -d {Src} {SOME_MACHINE_LISP} {shortlisp}
1107 #-----------------------------------------------#
1108 # Variables and rules for target "Make-DocFile" #
1109 #-----------------------------------------------#
1111 Make-DocFile-Includes = -i :inc:
1114 Make-DocFile-PPCCOptions = -typecheck relaxed -w off -noMapCR ¶
1115 -d MAC_OS -d MAC_OS8 ¶
1116 {Make-DocFile-Includes} {Make-DocFile-Sym}
1118 Make-DocFile-Objects = ¶
1119 "{Lib-Src}make-docfile.c.x" ¶
1122 Make-DocFile Ä {Make-DocFileDir}Make-DocFile
1124 {Make-DocFileDir}Make-DocFile Ä {Makefile} {Make-DocFile-Objects}
1126 -o {Make-DocFileDir}Make-DocFile ¶
1127 {Make-DocFile-Sym} ¶
1128 {Make-DocFile-Objects} ¶
1131 "{SharedLibraries}InterfaceLib" ¶
1132 "{SharedLibraries}StdCLib" ¶
1133 "{SharedLibraries}MathLib" ¶
1134 "{PPCLibraries}StdCRuntime.o" ¶
1135 "{PPCLibraries}PPCCRuntime.o" ¶
1136 "{PPCLibraries}PPCToolLibs.o"
1138 "{Lib-Src}make-docfile.c.x" Ä {Makefile} "{Lib-Src}make-docfile.c"
1139 {PPCC} "{Lib-Src}make-docfile.c" -o "{Lib-Src}make-docfile.c.x" {Make-DocFile-PPCCOptions}
1141 "{Source}chdir.c.x" Ä {Makefile} "{Source}chdir.c"
1142 {PPCC} "{Source}chdir.c" -o "{Source}chdir.c.x" {Make-DocFile-PPCCOptions}
1144 # arch-tag: c9d9bc1a-142f-41da-b75e-79e0c44ffbb4