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 ====================
20 version
=version-not-set
21 configname
=configuration-name-not-set
23 # ==================== Where To Install Things ====================
25 # The default location for installation. Everything is placed in
26 # subdirectories of this directory. The default values for many of
27 # the variables below are expressed in terms of this one, so you may
28 # not need to change them.
31 # Like `prefix', but used for architecture-specific files.
34 # Where to install Emacs and other binaries that people will want to
35 # run directly (like etags).
36 bindir=${exec_prefix}/bin
38 # Where to install and expect executable files to be run by Emacs
39 # rather than directly by users, and other architecture-dependent
40 # data. ${archlibdir} is usually below this.
41 libdir=${exec_prefix}/lib
43 # Where to find the source code - setting this to anything but
44 # . doesn't work yet. 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.
50 # ==================== Emacs-specific directories ====================
52 # These variables hold the values Emacs will actually use. They are
53 # based on the values of the standard Make variables above.
55 # Where to put executables to be run by Emacs rather than the user.
56 # This path usually includes the Emacs version and configuration name,
57 # so that multiple configurations for multiple versions of Emacs may
58 # be installed at once.
59 archlibdir
=${libdir}/emacs
/${version}/${configname}
61 # ====================== Developer's configuration =======================
63 # The following assignments make sense if you're running Emacs on a single
64 # machine, one version at a time, and you want changes to the lisp and etc
65 # directories in the source tree to show up immediately in your working
66 # environment. It saves a great deal of disk space by not duplicating the
67 # lisp and etc directories.
69 # archlibdir=${srcdir}/bin
71 # ==================== Utility Programs for the Build ====================
73 # Allow the user to specify the install program.
76 INSTALL_PROGRAM
= ${INSTALL}
77 INSTALL_DATA
= ${INSTALL}
79 # ============================= Targets ==============================
81 # Things that a user might actually run, which should be installed in bindir.
82 INSTALLABLES
= etags ctags emacsclient b2m rcs-checkin
84 # Things that Emacs runs internally, or during the build process,
85 # which should not be installed in bindir.
86 UTILITIES
= test-distrib make-path wakeup make-docfile digest-doc sorted-doc \
87 movemail cvtmail fakemail yow env emacsserver hexl timer
89 # Like UTILITIES, but they're not system-dependent, and should not be
90 # deleted by the distclean target.
91 SCRIPTS
= rcs2log vcdiff
93 EXECUTABLES
= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS}
95 SOURCES
= COPYING ChangeLog Makefile.in README aixcc.
lex emacs.csh \
96 makedoc.com
*.
[chy
] rcs2log vcdiff
98 ### We need to #define emacs to get the right versions of some files.
99 ### Some other files - those shared with other GNU utilities - need
100 ### HAVE_CONFIG_H #defined before they know they can take advantage of
101 ### the information in ../src/config.h.
102 CFLAGS
=${CONFIG_CFLAGS} -Demacs
-DHAVE_CONFIG_H
-I..
/src
106 ### Install the internal utilities. Until they are installed, we can
107 ### just run them directly from lib-src.
110 @echo
"Installing utilities run internally by Emacs."
111 .
/make-path
${archlibdir}
112 if
[ `(cd ${archlibdir};/bin/pwd)` != `/bin/pwd` ]; then \
113 for file in
${EXECUTABLES} ; do \
114 cp
$${file} ${archlibdir} ; \
115 chmod
755 ${archlibdir}/$${file} ; \
119 @echo
"Changing the owner and group of Emacs's utility programs to \`bin'."
120 @echo
"(You may ignore errors here if you don't care about this.)"
121 -for file in
${EXECUTABLES} ; do \
122 chgrp bin
${archlibdir}/$${file} ; \
123 chown bin
${archlibdir}/$${file} ; \
126 # We don't need to install `wakeup' explicitly, because it will be copied when
127 # this whole directory is copied.
128 install: ${archlibdir}
130 @echo
"Installing utilities for users to run."
131 for file in emacsclient etags ctags b2m
; do \
132 cp
$${file} ${bindir}/$${file}.new
; \
133 chmod
755 ${bindir}/$${file}.new
; \
136 @echo
"Changing the owner and group of utility programs to \`bin'."
137 @echo
"(You may ignore errors here if you don't care about this.)"
138 -for file in emacsclient etags ctags b2m
; do \
139 chgrp bin
${bindir}/$${file}.new
; \
140 chown bin
${bindir}/$${file}.new
; \
141 mv
${bindir}/$${file}.new
${bindir}/$${file} ; \
145 -rm -f
${INSTALLABLES} ${UTILITIES} core
*.o
148 -rm -f
${INSTALLABLES} ${UTILITIES} ..
/etc
/DOC
* core
*.o
153 extraclean
: realclean
162 # Test the contents of the directory.
164 @echo
"We don't have any tests for GNU Emacs yet."
169 # This verifies that the non-ASCII characters in the file `testfile'
170 # have not been clobbered by whatever means were used to copy and
171 # distribute Emacs. If they were clobbered, all the .elc files were
173 test-distrib
: test-distrib.c
174 $(CC
) -o test-distrib test-distrib.c
177 GETOPTOBJS
= getopt.o getopt1.o
178 GETOPTDEPS
= $(GETOPTOBJS
) getopt.h
179 getopt.o
: getopt.c getopt.h
180 getopt1.o
: getopt1.c getopt.h
182 etags
: etags.c
$(GETOPTDEPS
)
183 $(CC
) ${CFLAGS} -DETAGS etags.c
$(GETOPTOBJS
) $(LOADLIBES
) -o etags
185 ctags
: etags.c
$(GETOPTDEPS
)
186 $(CC
) ${CFLAGS} -DCTAGS etags.c
$(GETOPTOBJS
) $(LOADLIBES
) -o ctags
189 $(CC
) ${CFLAGS} wakeup.c
$(LOADLIBES
) -o wakeup
191 make-docfile
: make-docfile.c
192 $(CC
) ${CFLAGS} make-docfile.c
$(LOADLIBES
) -o make-docfile
194 digest-doc
: digest-doc.c
195 $(CC
) ${CFLAGS} digest-doc.c
$(LOADLIBES
) -o digest-doc
197 sorted-doc
: sorted-doc.c
198 $(CC
) ${CFLAGS} sorted-doc.c
$(LOADLIBES
) -o sorted-doc
200 b2m
: b2m.c ..
/src
/config.h
201 $(CC
) ${CFLAGS} b2m.c
$(LOADLIBES
) -o b2m
203 movemail
: movemail.c ..
/src
/config.h
204 $(CC
) ${CFLAGS} movemail.c
$(LOADLIBES
) -o movemail
207 $(CC
) ${CFLAGS} cvtmail.c
$(LOADLIBES
) -o cvtmail
209 fakemail
: fakemail.c ..
/src
/config.h
210 $(CC
) ${CFLAGS} fakemail.c
$(LOADLIBES
) -o fakemail
212 yow
: yow.c ..
/src
/paths.h
213 $(CC
) ${CFLAGS} yow.c
$(LOADLIBES
) -o yow
215 env
: env.c ..
/src
/config.h
216 $(CC
) -DEMACS
${CFLAGS} env.c
$(LOADLIBES
) -o env
218 emacsserver
: emacsserver.c ..
/src
/config.h
219 $(CC
) ${CFLAGS} emacsserver.c
$(LOADLIBES
) -o emacsserver
221 emacsclient
: emacsclient.c ..
/src
/config.h
222 $(CC
) ${CFLAGS} emacsclient.c
$(LOADLIBES
) -o emacsclient
225 $(CC
) ${CFLAGS} hexl.c
$(LOADLIBES
) -o hexl
227 getdate.o
: getdate.y ..
/src
/config.h
228 ${YACC} ${YFLAGS} getdate.y
229 $(CC
) $(CFLAGS
) -c y.tab.c
231 timer
: getdate.o timer.o
232 $(CC
) $(CFLAGS
) getdate.o timer.o
-o timer
234 make-path
: make-path.c
235 $(CC
) $(CFLAGS
) make-path.c
-o make-path
237 # These are NOT included in INSTALLABLES or UTILITIES.
238 # See ../src/ymakefile.
239 emacstool
: emacstool.c
240 $(CC
) emacstool.c
-o emacstool
${CFLAGS} \
241 -lsuntool
-lsunwindow
-lpixrect
$(LOADLIBES
)
243 # For SUN Japanese Language Environment
244 nemacstool
: emacstool.c
245 $(CC
) -o nemacstool
-DJLE
${CFLAGS} emacstool.c \
246 -lsuntool
-lmle
-lsunwindow
-lpixrect
$(LOADLIBES
)
249 $(CC
) -o xvetool
-DXVIEW
${CFLAGS} emacstool.c \
250 -lxview
-lX
-I
$(OPENWINHOME
)/include -L
$(OPENWINHOME
)/lib \
254 $(CC
) -o xveterm
-DXVIEW
-DTTERM
${CFLAGS} emacstool.c \
255 -lxview
-lolgx
-lX
-I
$(OPENWINHOME
)/include -L
$(OPENWINHOME
)/lib \
259 $(CC
) $(CFLAGS
) -o aixcc aixcc.c