1 # DIST: This is the distribution Makefile for Emacs. configure can
2 # DIST: make most of the changes to this file you might want, so try
5 # add -DUSG for SysV movemail and timer
6 # For Xenix, add the following for movemail:
8 # For Mips, the following is needed for who knows what.
9 # LOADLIBES = -lmld /usr/bsd43/usr/lib/libc.a
11 # Avoid trouble on systems where the `SHELL' variable might be
12 # inherited from the environment.
15 # ==================== Things `configure' might edit ====================
22 version
=version-not-set
23 configname
=configuration-name-not-set
25 # ==================== Where To Install Things ====================
27 # The default location for installation. Everything is placed in
28 # subdirectories of this directory. The default values for many of
29 # the variables below are expressed in terms of this one, so you may
30 # not need to change them.
33 # Like `prefix', but used for architecture-specific files.
36 # Where to install Emacs and other binaries that people will want to
37 # run directly (like etags).
38 bindir=${exec_prefix}/bin
40 # Where to install and expect executable files to be run by Emacs
41 # rather than directly by users, and other architecture-dependent
42 # data. ${archlibdir} is usually below this.
43 libdir=${exec_prefix}/lib
45 # Where to find the source code. This is
46 # set by the configure script's `--srcdir' option.
47 # However, the value of ${srcdir} in this makefile
48 # is not identical to what was specified with --srcdir.
49 # The variable here has `/lib-src' added at the end.
50 srcdir=@
srcdir@
/lib-src
51 VPATH
=@
srcdir@
/lib-src
53 # ==================== Emacs-specific directories ====================
55 # These variables hold the values Emacs will actually use. They are
56 # based on the values of the standard Make variables above.
58 # Where to put executables to be run by Emacs rather than the user.
59 # This path usually includes the Emacs version and configuration name,
60 # so that multiple configurations for multiple versions of Emacs may
61 # be installed at once.
62 archlibdir
=${libdir}/emacs
/${version}/${configname}
64 # ====================== Developer's configuration =======================
66 # The following assignments make sense if you're running Emacs on a single
67 # machine, one version at a time, and you want changes to the lisp and etc
68 # directories in the source tree to show up immediately in your working
69 # environment. It saves a great deal of disk space by not duplicating the
70 # lisp and etc directories.
72 # archlibdir=${srcdir}/bin
74 # ==================== Utility Programs for the Build ====================
76 # Allow the user to specify the install program.
79 INSTALL_PROGRAM
= ${INSTALL}
80 INSTALL_DATA
= ${INSTALL}
82 # ============================= Targets ==============================
84 # Things that a user might actually run, which should be installed in bindir.
85 INSTALLABLES
= etags ctags emacsclient b2m
86 INSTALLABLE_SCRIPTS
= rcs-checkin
88 # Things that Emacs runs internally, or during the build process,
89 # which should not be installed in bindir.
90 UTILITIES
= test-distrib make-path wakeup make-docfile digest-doc sorted-doc \
91 movemail cvtmail fakemail yow env emacsserver hexl timer
93 # Like UTILITIES, but they're not system-dependent, and should not be
94 # deleted by the distclean target.
95 SCRIPTS
= rcs2log vcdiff
97 EXECUTABLES
= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}
99 SOURCES
= COPYING ChangeLog Makefile.in README aixcc.
lex emacs.csh \
100 makedoc.com
*.
[chy
] rcs2log vcdiff
102 ### We need to #define emacs to get the right versions of some files.
103 ### Some other files - those shared with other GNU utilities - need
104 ### HAVE_CONFIG_H #defined before they know they can take advantage of
105 ### the information in ../src/config.h.
106 ALL_CFLAGS
= ${C_SWITCH_SYSTEM} -Demacs
-DHAVE_CONFIG_H \
107 -I
${srcdir} -I
${srcdir}/..
/src
-I.
-I..
/src
${CFLAGS}
109 ${CC} -c
${CPPFLAGS} ${ALL_CFLAGS} $<
113 ### Install the internal utilities. Until they are installed, we can
114 ### just run them directly from lib-src.
117 @echo
"Installing utilities run internally by Emacs."
118 .
/make-path
${archlibdir}
119 if
[ `(cd ${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \
120 for file in
${UTILITIES} ${INSTALLABLES}; do \
121 cp
$${file} ${archlibdir} ; \
122 chmod
755 ${archlibdir}/$${file} ; \
124 cd
${srcdir}; for file in
${SCRIPTS} ${INSTALLABLE_SCRIPTS}; do \
125 cp
$${file} ${archlibdir} ; \
126 chmod
755 ${archlibdir}/$${file} ; \
130 @echo
"Changing the owner and group of Emacs's utility programs to \`bin'."
131 @echo
"(You may ignore errors here if you don't care about this.)"
132 -for file in
${EXECUTABLES} ; do \
133 chgrp bin
${archlibdir}/$${file} ; \
134 chown bin
${archlibdir}/$${file} ; \
137 # We don't need to install `wakeup' explicitly, because it will be copied when
138 # this whole directory is copied.
139 install: ${archlibdir}
141 @echo
"Installing utilities for users to run."
142 for file in
${INSTALLABLES} ; do \
143 cp
$${file} ${bindir}/$${file}.new
; \
144 chmod
755 ${bindir}/$${file}.new
; \
146 for file in
${INSTALLABLE_SCRIPTS} ; do \
147 cp
${srcdir}/$${file} ${bindir}/$${file}.new
; \
148 chmod
755 ${bindir}/$${file}.new
; \
151 @echo
"Changing the owner and group of utility programs to \`bin'."
152 @echo
"(You may ignore errors here if you don't care about this.)"
153 -for file in
${INSTALLABLES} ${INSTALLABLE_SCRIPTS} ; do \
154 chgrp bin
${bindir}/$${file}.new
; \
155 chown bin
${bindir}/$${file}.new
; \
156 rm -f
${bindir}/$${file} ; \
157 mv
${bindir}/$${file}.new
${bindir}/$${file} ; \
161 -rm -f
${INSTALLABLES} ${UTILITIES} core
*.o
164 -rm -f
${INSTALLABLES} ${UTILITIES} ..
/etc
/DOC
* core
*.o
169 extraclean
: realclean
178 # Test the contents of the directory.
180 @echo
"We don't have any tests for GNU Emacs yet."
185 # This verifies that the non-ASCII characters in the file `testfile'
186 # have not been clobbered by whatever means were used to copy and
187 # distribute Emacs. If they were clobbered, all the .elc files were
189 test-distrib
: ${srcdir}/test-distrib.c
190 $(CC
) -o test-distrib
${srcdir}/test-distrib.c
191 .
/test-distrib
${srcdir}/testfile
193 GETOPTOBJS
= getopt.o getopt1.o
$(ALLOCA
)
194 GETOPTDEPS
= $(GETOPTOBJS
) ${srcdir}/getopt.h
195 getopt.o
: ${srcdir}/getopt.c
${srcdir}/getopt.h
196 getopt1.o
: ${srcdir}/getopt1.c
${srcdir}/getopt.h
198 etags
: ${srcdir}/etags.c
$(GETOPTDEPS
)
199 $(CC
) ${ALL_CFLAGS} -DETAGS
${srcdir}/etags.c
$(GETOPTOBJS
) $(LOADLIBES
) -o etags
201 ctags
: ${srcdir}/etags.c
$(GETOPTDEPS
)
202 $(CC
) ${ALL_CFLAGS} -DCTAGS
${srcdir}/etags.c
$(GETOPTOBJS
) $(LOADLIBES
) -o ctags
204 wakeup
: ${srcdir}/wakeup.c
205 $(CC
) ${ALL_CFLAGS} ${srcdir}/wakeup.c
$(LOADLIBES
) -o wakeup
207 make-docfile
: ${srcdir}/make-docfile.c
208 $(CC
) ${ALL_CFLAGS} ${srcdir}/make-docfile.c
$(LOADLIBES
) -o make-docfile
210 digest-doc
: ${srcdir}/digest-doc.c
211 $(CC
) ${ALL_CFLAGS} ${srcdir}/digest-doc.c
$(LOADLIBES
) -o digest-doc
213 sorted-doc
: ${srcdir}/sorted-doc.c
${ALLOCA}
214 $(CC
) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c
${ALLOCA} $(LOADLIBES
) -o sorted-doc
216 b2m
: ${srcdir}/b2m.c ..
/src
/config.h
217 $(CC
) -I
${srcdir}/..
/src
${ALL_CFLAGS} ${srcdir}/b2m.c
$(LOADLIBES
) -o b2m
219 movemail
: ${srcdir}/movemail.c ..
/src
/config.h
220 $(CC
) -I
${srcdir}/..
/src
${ALL_CFLAGS} ${srcdir}/movemail.c
$(LOADLIBES
) -o movemail
222 cvtmail
: ${srcdir}/cvtmail.c
223 $(CC
) ${ALL_CFLAGS} ${srcdir}/cvtmail.c
$(LOADLIBES
) -o cvtmail
225 fakemail
: ${srcdir}/fakemail.c ..
/src
/config.h
226 $(CC
) -I
${srcdir}/..
/src
${ALL_CFLAGS} ${srcdir}/fakemail.c
$(LOADLIBES
) -o fakemail
228 yow
: ${srcdir}/yow.c ..
/src
/paths.h
229 $(CC
) ${ALL_CFLAGS} ${srcdir}/yow.c
$(LOADLIBES
) -o yow
231 env
: ${srcdir}/env.c ..
/src
/config.h
232 $(CC
) -DEMACS
-I
${srcdir}/..
/src
${ALL_CFLAGS} ${srcdir}/env.c
$(LOADLIBES
) -o env
234 emacsserver
: ${srcdir}/emacsserver.c ..
/src
/config.h
235 $(CC
) -I
${srcdir}/..
/src
${ALL_CFLAGS} ${srcdir}/emacsserver.c
$(LOADLIBES
) -o emacsserver
237 emacsclient
: ${srcdir}/emacsclient.c ..
/src
/config.h
238 $(CC
) -I
${srcdir}/..
/src
${ALL_CFLAGS} ${srcdir}/emacsclient.c
$(LOADLIBES
) -o emacsclient
240 hexl
: ${srcdir}/hexl.c
241 $(CC
) ${ALL_CFLAGS} ${srcdir}/hexl.c
$(LOADLIBES
) -o hexl
243 TIMEROBJS
=getdate.o timer.o
$(ALLOCA
)
244 getdate.o
: ${srcdir}/getdate.y ..
/src
/config.h
245 ${YACC} ${YFLAGS} ${srcdir}/getdate.y
246 $(CC
) -I
${srcdir}/..
/src
$(ALL_CFLAGS
) -c y.tab.c
248 timer.o
: ${srcdir}/timer.c ..
/src
/config.h
249 $(CC
) -c
-I
${srcdir}/..
/src
$(ALL_CFLAGS
) ${srcdir}/timer.c
251 $(CC
) -I
${srcdir}/..
/src
$(ALL_CFLAGS
) ${TIMEROBJS} $(LOADLIBES
) -o timer
253 make-path
: ${srcdir}/make-path.c
254 $(CC
) $(ALL_CFLAGS
) ${srcdir}/make-path.c
-o make-path
256 # These are NOT included in INSTALLABLES or UTILITIES.
257 # See ../src/ymakefile.
258 emacstool
: ${srcdir}/emacstool.c
259 $(CC
) ${srcdir}/emacstool.c
-o emacstool
${ALL_CFLAGS} \
260 -lsuntool
-lsunwindow
-lpixrect
$(LOADLIBES
)
262 # For SUN Japanese Language Environment
263 nemacstool
: ${srcdir}/emacstool.c
264 $(CC
) -o nemacstool
-DJLE
${ALL_CFLAGS} ${srcdir}/emacstool.c \
265 -lsuntool
-lmle
-lsunwindow
-lpixrect
$(LOADLIBES
)
267 xvetool
: ${srcdir}/emacstool.c
268 $(CC
) -o xvetool
-DXVIEW
${ALL_CFLAGS} ${srcdir}/emacstool.c \
269 -lxview
-lX
-I
$(OPENWINHOME
)/include -L
$(OPENWINHOME
)/lib \
272 xveterm
: ${srcdir}/emacstool.c
273 $(CC
) -o xveterm
-DXVIEW
-DTTERM
${ALL_CFLAGS} ${srcdir}/emacstool.c \
274 -lxview
-lolgx
-lX
-I
$(OPENWINHOME
)/include -L
$(OPENWINHOME
)/lib \
277 aixcc
: ${srcdir}/aixcc.c
278 $(CC
) $(ALL_CFLAGS
) -o aixcc
${srcdir}/aixcc.c
280 aixcc.c
: ${srcdir}/aixcc.
lex
281 lex ${srcdir}/aixcc.
lex