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
-I
${srcdir}/..
/src
${CFLAGS}
108 ${CC} -c
${CPPFLAGS} ${ALL_CFLAGS} $<
112 ### Install the internal utilities. Until they are installed, we can
113 ### just run them directly from lib-src.
116 @echo
"Installing utilities run internally by Emacs."
117 .
/make-path
${archlibdir}
118 if
[ `(cd ${archlibdir};/bin/pwd)` != `/bin/pwd` ]; then \
119 for file in
${UTILITIES} ${INSTALLABLES}; do \
120 cp
$${file} ${archlibdir} ; \
121 chmod
755 ${archlibdir}/$${file} ; \
123 cd
${srcdir}; for file in
${SCRIPTS} ${INSTALLABLE_SCRIPTS}; do \
124 cp
$${file} ${archlibdir} ; \
125 chmod
755 ${archlibdir}/$${file} ; \
129 @echo
"Changing the owner and group of Emacs's utility programs to \`bin'."
130 @echo
"(You may ignore errors here if you don't care about this.)"
131 -for file in
${EXECUTABLES} ; do \
132 chgrp bin
${archlibdir}/$${file} ; \
133 chown bin
${archlibdir}/$${file} ; \
136 # We don't need to install `wakeup' explicitly, because it will be copied when
137 # this whole directory is copied.
138 install: ${archlibdir}
140 @echo
"Installing utilities for users to run."
141 for file in
${INSTALLABLES} ; do \
142 cp
$${file} ${bindir}/$${file}.new
; \
143 chmod
755 ${bindir}/$${file}.new
; \
146 @echo
"Changing the owner and group of utility programs to \`bin'."
147 @echo
"(You may ignore errors here if you don't care about this.)"
148 -for file in emacsclient etags ctags b2m
; do \
149 chgrp bin
${bindir}/$${file}.new
; \
150 chown bin
${bindir}/$${file}.new
; \
151 rm -f
${bindir}/$${file} ; \
152 mv
${bindir}/$${file}.new
${bindir}/$${file} ; \
156 -rm -f
${INSTALLABLES} ${UTILITIES} core
*.o
159 -rm -f
${INSTALLABLES} ${UTILITIES} ..
/etc
/DOC
* core
*.o
164 extraclean
: realclean
173 # Test the contents of the directory.
175 @echo
"We don't have any tests for GNU Emacs yet."
180 # This verifies that the non-ASCII characters in the file `testfile'
181 # have not been clobbered by whatever means were used to copy and
182 # distribute Emacs. If they were clobbered, all the .elc files were
184 test-distrib
: ${srcdir}/test-distrib.c
185 $(CC
) -o test-distrib
${srcdir}/test-distrib.c
186 .
/test-distrib
${srcdir}/testfile
188 GETOPTOBJS
= getopt.o getopt1.o
$(ALLOCA
)
189 GETOPTDEPS
= $(GETOPTOBJS
) ${srcdir}/getopt.h
190 getopt.o
: getopt.c getopt.h
191 getopt1.o
: getopt1.c getopt.h
193 etags
: ${srcdir}/etags.c
$(GETOPTDEPS
)
194 $(CC
) ${ALL_CFLAGS} -DETAGS
${srcdir}/etags.c
$(GETOPTOBJS
) $(LOADLIBES
) -o etags
196 ctags
: ${srcdir}/etags.c
$(GETOPTDEPS
)
197 $(CC
) ${ALL_CFLAGS} -DCTAGS
${srcdir}/etags.c
$(GETOPTOBJS
) $(LOADLIBES
) -o ctags
199 wakeup
: ${srcdir}/wakeup.c
200 $(CC
) ${ALL_CFLAGS} ${srcdir}/wakeup.c
$(LOADLIBES
) -o wakeup
202 make-docfile
: ${srcdir}/make-docfile.c
203 $(CC
) ${ALL_CFLAGS} ${srcdir}/make-docfile.c
$(LOADLIBES
) -o make-docfile
205 digest-doc
: ${srcdir}/digest-doc.c
206 $(CC
) ${ALL_CFLAGS} ${srcdir}/digest-doc.c
$(LOADLIBES
) -o digest-doc
208 sorted-doc
: ${srcdir}/sorted-doc.c
${ALLOCA}
209 $(CC
) ${ALL_CFLAGS} ${srcdir}/sorted-doc.c
${ALLOCA} $(LOADLIBES
) -o sorted-doc
211 b2m
: ${srcdir}/b2m.c ..
/src
/config.h
212 $(CC
) -I
${srcdir}/..
/src
${ALL_CFLAGS} ${srcdir}/b2m.c
$(LOADLIBES
) -o b2m
214 movemail
: ${srcdir}/movemail.c ..
/src
/config.h
215 $(CC
) -I
${srcdir}/..
/src
${ALL_CFLAGS} ${srcdir}/movemail.c
$(LOADLIBES
) -o movemail
217 cvtmail
: ${srcdir}/cvtmail.c
218 $(CC
) ${ALL_CFLAGS} ${srcdir}/cvtmail.c
$(LOADLIBES
) -o cvtmail
220 fakemail
: ${srcdir}/fakemail.c ..
/src
/config.h
221 $(CC
) -I
${srcdir}/..
/src
${ALL_CFLAGS} ${srcdir}/fakemail.c
$(LOADLIBES
) -o fakemail
223 yow
: ${srcdir}/yow.c ..
/src
/paths.h
224 $(CC
) ${ALL_CFLAGS} ${srcdir}/yow.c
$(LOADLIBES
) -o yow
226 env
: ${srcdir}/env.c ..
/src
/config.h
227 $(CC
) -DEMACS
-I
${srcdir}/..
/src
${ALL_CFLAGS} ${srcdir}/env.c
$(LOADLIBES
) -o env
229 emacsserver
: ${srcdir}/emacsserver.c ..
/src
/config.h
230 $(CC
) -I
${srcdir}/..
/src
${ALL_CFLAGS} ${srcdir}/emacsserver.c
$(LOADLIBES
) -o emacsserver
232 emacsclient
: ${srcdir}/emacsclient.c ..
/src
/config.h
233 $(CC
) -I
${srcdir}/..
/src
${ALL_CFLAGS} ${srcdir}/emacsclient.c
$(LOADLIBES
) -o emacsclient
235 hexl
: ${srcdir}/hexl.c
236 $(CC
) ${ALL_CFLAGS} ${srcdir}/hexl.c
$(LOADLIBES
) -o hexl
238 TIMEROBJS
=getdate.o timer.o
$(ALLOCA
)
239 getdate.o
: ${srcdir}/getdate.y ..
/src
/config.h
240 ${YACC} ${YFLAGS} ${srcdir}/getdate.y
241 $(CC
) -I
${srcdir}/..
/src
$(ALL_CFLAGS
) -c y.tab.c
243 timer.o
: ${srcdir}/timer.c ..
/src
/config.h
244 $(CC
) -c
-I
${srcdir}/..
/src
$(ALL_CFLAGS
) ${srcdir}/timer.c
246 $(CC
) -I
${srcdir}/..
/src
$(ALL_CFLAGS
) ${TIMEROBJS} -o timer
248 make-path
: ${srcdir}/make-path.c
249 $(CC
) $(ALL_CFLAGS
) ${srcdir}/make-path.c
-o make-path
251 # These are NOT included in INSTALLABLES or UTILITIES.
252 # See ../src/ymakefile.
253 emacstool
: ${srcdir}/emacstool.c
254 $(CC
) ${srcdir}/emacstool.c
-o emacstool
${ALL_CFLAGS} \
255 -lsuntool
-lsunwindow
-lpixrect
$(LOADLIBES
)
257 # For SUN Japanese Language Environment
258 nemacstool
: ${srcdir}/emacstool.c
259 $(CC
) -o nemacstool
-DJLE
${ALL_CFLAGS} ${srcdir}/emacstool.c \
260 -lsuntool
-lmle
-lsunwindow
-lpixrect
$(LOADLIBES
)
262 xvetool
: ${srcdir}/emacstool.c
263 $(CC
) -o xvetool
-DXVIEW
${ALL_CFLAGS} ${srcdir}/emacstool.c \
264 -lxview
-lX
-I
$(OPENWINHOME
)/include -L
$(OPENWINHOME
)/lib \
267 xveterm
: ${srcdir}/emacstool.c
268 $(CC
) -o xveterm
-DXVIEW
-DTTERM
${ALL_CFLAGS} ${srcdir}/emacstool.c \
269 -lxview
-lolgx
-lX
-I
$(OPENWINHOME
)/include -L
$(OPENWINHOME
)/lib \
272 aixcc
: ${srcdir}/aixcc.c
273 $(CC
) $(ALL_CFLAGS
) -o aixcc
${srcdir}/aixcc.c
275 aixcc.c
: ${srcdir}/aixcc.
lex
276 lex ${srcdir}/aixcc.
lex