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 ====================
21 version
=version-not-set
22 configname
=configuration-name-not-set
24 # ==================== Where To Install Things ====================
26 # The default location for installation. Everything is placed in
27 # subdirectories of this directory. The default values for many of
28 # the variables below are expressed in terms of this one, so you may
29 # not need to change them.
32 # Like `prefix', but used for architecture-specific files.
35 # Where to install Emacs and other binaries that people will want to
36 # run directly (like etags).
37 bindir=${exec_prefix}/bin
39 # Where to install and expect executable files to be run by Emacs
40 # rather than directly by users, and other architecture-dependent
41 # data. ${archlibdir} is usually below this.
42 libdir=${exec_prefix}/lib
44 # Where to find the source code. The source code for Emacs's C kernel is
45 # expected to be in ${srcdir}/src, and the source code for Emacs's
46 # utility programs is expected to be in ${srcdir}/lib-src. This is
47 # set by the configure script's `--srcdir' option.
48 srcdir=@
srcdir@
/lib-src
49 VPATH
=@
srcdir@
/lib-src
51 # ==================== Emacs-specific directories ====================
53 # These variables hold the values Emacs will actually use. They are
54 # based on the values of the standard Make variables above.
56 # Where to put executables to be run by Emacs rather than the user.
57 # This path usually includes the Emacs version and configuration name,
58 # so that multiple configurations for multiple versions of Emacs may
59 # be installed at once.
60 archlibdir
=${libdir}/emacs
/${version}/${configname}
62 # ====================== Developer's configuration =======================
64 # The following assignments make sense if you're running Emacs on a single
65 # machine, one version at a time, and you want changes to the lisp and etc
66 # directories in the source tree to show up immediately in your working
67 # environment. It saves a great deal of disk space by not duplicating the
68 # lisp and etc directories.
70 # archlibdir=${srcdir}/bin
72 # ==================== Utility Programs for the Build ====================
74 # Allow the user to specify the install program.
77 INSTALL_PROGRAM
= ${INSTALL}
78 INSTALL_DATA
= ${INSTALL}
80 # ============================= Targets ==============================
82 # Things that a user might actually run, which should be installed in bindir.
83 INSTALLABLES
= etags ctags emacsclient b2m
84 INSTALLABLE_SCRIPTS
= rcs-checkin
86 # Things that Emacs runs internally, or during the build process,
87 # which should not be installed in bindir.
88 UTILITIES
= test-distrib make-path wakeup make-docfile digest-doc sorted-doc \
89 movemail cvtmail fakemail yow env emacsserver hexl timer
91 # Like UTILITIES, but they're not system-dependent, and should not be
92 # deleted by the distclean target.
93 SCRIPTS
= rcs2log vcdiff
95 EXECUTABLES
= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}
97 SOURCES
= COPYING ChangeLog Makefile.in README aixcc.
lex emacs.csh \
98 makedoc.com
*.
[chy
] rcs2log vcdiff
100 ### We need to #define emacs to get the right versions of some files.
101 ### Some other files - those shared with other GNU utilities - need
102 ### HAVE_CONFIG_H #defined before they know they can take advantage of
103 ### the information in ../src/config.h.
104 CFLAGS
=${DEFS} ${C_SWITCH_SYSTEM} -Demacs
-DHAVE_CONFIG_H
-I..
/src
108 ### Install the internal utilities. Until they are installed, we can
109 ### just run them directly from lib-src.
112 @echo
"Installing utilities run internally by Emacs."
113 .
/make-path
${archlibdir}
114 if
[ `(cd ${archlibdir};/bin/pwd)` != `/bin/pwd` ]; then \
115 for file in
${UTILITIES} ${INSTALLABLES}; do \
116 cp
$${file} ${archlibdir} ; \
117 chmod
755 ${archlibdir}/$${file} ; \
119 cd
${srcdir}; for file in
${SCRIPTS} ${INSTALLABLE_SCRIPTS}; do \
120 cp
$${file} ${archlibdir} ; \
121 chmod
755 ${archlibdir}/$${file} ; \
125 @echo
"Changing the owner and group of Emacs's utility programs to \`bin'."
126 @echo
"(You may ignore errors here if you don't care about this.)"
127 -for file in
${EXECUTABLES} ; do \
128 chgrp bin
${archlibdir}/$${file} ; \
129 chown bin
${archlibdir}/$${file} ; \
132 # We don't need to install `wakeup' explicitly, because it will be copied when
133 # this whole directory is copied.
134 install: ${archlibdir}
136 @echo
"Installing utilities for users to run."
137 for file in emacsclient etags ctags b2m
; do \
138 cp
$${file} ${bindir}/$${file}.new
; \
139 chmod
755 ${bindir}/$${file}.new
; \
142 @echo
"Changing the owner and group of utility programs to \`bin'."
143 @echo
"(You may ignore errors here if you don't care about this.)"
144 -for file in emacsclient etags ctags b2m
; do \
145 chgrp bin
${bindir}/$${file}.new
; \
146 chown bin
${bindir}/$${file}.new
; \
147 mv
${bindir}/$${file}.new
${bindir}/$${file} ; \
151 -rm -f
${INSTALLABLES} ${UTILITIES} core
*.o
154 -rm -f
${INSTALLABLES} ${UTILITIES} ..
/etc
/DOC
* core
*.o
159 extraclean
: realclean
168 # Test the contents of the directory.
170 @echo
"We don't have any tests for GNU Emacs yet."
175 # This verifies that the non-ASCII characters in the file `testfile'
176 # have not been clobbered by whatever means were used to copy and
177 # distribute Emacs. If they were clobbered, all the .elc files were
179 test-distrib
: ${srcdir}/test-distrib.c
180 $(CC
) -o test-distrib
${srcdir}/test-distrib.c
181 .
/test-distrib
${srcdir}/testfile
183 GETOPTOBJS
= getopt.o getopt1.o
184 GETOPTDEPS
= $(GETOPTOBJS
) ${srcdir}/getopt.h
185 getopt.o
: getopt.c getopt.h
186 getopt1.o
: getopt1.c getopt.h
188 etags
: ${srcdir}/etags.c
$(GETOPTDEPS
)
189 $(CC
) ${CFLAGS} -DETAGS
${srcdir}/etags.c
$(GETOPTOBJS
) $(LOADLIBES
) -o etags
191 ctags
: ${srcdir}/etags.c
$(GETOPTDEPS
)
192 $(CC
) ${CFLAGS} -DCTAGS
${srcdir}/etags.c
$(GETOPTOBJS
) $(LOADLIBES
) -o ctags
194 wakeup
: ${srcdir}/wakeup.c
195 $(CC
) ${CFLAGS} ${srcdir}/wakeup.c
$(LOADLIBES
) -o wakeup
197 make-docfile
: ${srcdir}/make-docfile.c
198 $(CC
) ${CFLAGS} ${srcdir}/make-docfile.c
$(LOADLIBES
) -o make-docfile
200 digest-doc
: ${srcdir}/digest-doc.c
201 $(CC
) ${CFLAGS} ${srcdir}/digest-doc.c
$(LOADLIBES
) -o digest-doc
203 sorted-doc
: ${srcdir}/sorted-doc.c
204 $(CC
) ${CFLAGS} ${srcdir}/sorted-doc.c
$(LOADLIBES
) -o sorted-doc
206 b2m
: ${srcdir}/b2m.c ..
/src
/config.h
207 $(CC
) -I
${srcdir}/..
/src
${CFLAGS} ${srcdir}/b2m.c
$(LOADLIBES
) -o b2m
209 movemail
: ${srcdir}/movemail.c ..
/src
/config.h
210 $(CC
) -I
${srcdir}/..
/src
${CFLAGS} ${srcdir}/movemail.c
$(LOADLIBES
) -o movemail
212 cvtmail
: ${srcdir}/cvtmail.c
213 $(CC
) ${CFLAGS} ${srcdir}/cvtmail.c
$(LOADLIBES
) -o cvtmail
215 fakemail
: ${srcdir}/fakemail.c ..
/src
/config.h
216 $(CC
) -I
${srcdir}/..
/src
${CFLAGS} ${srcdir}/fakemail.c
$(LOADLIBES
) -o fakemail
218 yow
: ${srcdir}/yow.c ..
/src
/paths.h
219 $(CC
) ${CFLAGS} ${srcdir}/yow.c
$(LOADLIBES
) -o yow
221 env
: ${srcdir}/env.c ..
/src
/config.h
222 $(CC
) -DEMACS
-I
${srcdir}/..
/src
${CFLAGS} ${srcdir}/env.c
$(LOADLIBES
) -o env
224 emacsserver
: ${srcdir}/emacsserver.c ..
/src
/config.h
225 $(CC
) -I
${srcdir}/..
/src
${CFLAGS} ${srcdir}/emacsserver.c
$(LOADLIBES
) -o emacsserver
227 emacsclient
: ${srcdir}/emacsclient.c ..
/src
/config.h
228 $(CC
) -I
${srcdir}/..
/src
${CFLAGS} ${srcdir}/emacsclient.c
$(LOADLIBES
) -o emacsclient
230 hexl
: ${srcdir}/hexl.c
231 $(CC
) ${CFLAGS} ${srcdir}/hexl.c
$(LOADLIBES
) -o hexl
233 getdate.o
: ${srcdir}/getdate.y ..
/src
/config.h
234 ${YACC} ${YFLAGS} ${srcdir}/getdate.y
235 $(CC
) -I
${srcdir}/..
/src
$(CFLAGS
) -c y.tab.c
237 timer.o
: ${srcdir}/timer.c ..
/src
/config.h
238 $(CC
) -c
-I
${srcdir}/..
/src
$(CFLAGS
) ${srcdir}/timer.c
239 timer
: getdate.o timer.o
240 $(CC
) -I
${srcdir}/..
/src
$(CFLAGS
) getdate.o timer.o
-o timer
242 make-path
: ${srcdir}/make-path.c
243 $(CC
) $(CFLAGS
) ${srcdir}/make-path.c
-o make-path
245 # These are NOT included in INSTALLABLES or UTILITIES.
246 # See ../src/ymakefile.
247 emacstool
: ${srcdir}/emacstool.c
248 $(CC
) ${srcdir}/emacstool.c
-o emacstool
${CFLAGS} \
249 -lsuntool
-lsunwindow
-lpixrect
$(LOADLIBES
)
251 # For SUN Japanese Language Environment
252 nemacstool
: ${srcdir}/emacstool.c
253 $(CC
) -o nemacstool
-DJLE
${CFLAGS} ${srcdir}/emacstool.c \
254 -lsuntool
-lmle
-lsunwindow
-lpixrect
$(LOADLIBES
)
256 xvetool
: ${srcdir}/emacstool.c
257 $(CC
) -o xvetool
-DXVIEW
${CFLAGS} ${srcdir}/emacstool.c \
258 -lxview
-lX
-I
$(OPENWINHOME
)/include -L
$(OPENWINHOME
)/lib \
261 xveterm
: ${srcdir}/emacstool.c
262 $(CC
) -o xveterm
-DXVIEW
-DTTERM
${CFLAGS} ${srcdir}/emacstool.c \
263 -lxview
-lolgx
-lX
-I
$(OPENWINHOME
)/include -L
$(OPENWINHOME
)/lib \
266 aixcc
: ${srcdir}/aixcc.c
267 $(CC
) $(CFLAGS
) -o aixcc
${srcdir}/aixcc.c
269 aixcc.c
: ${srcdir}/aixcc.
lex
270 lex ${srcdir}/aixcc.
lex