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 - setting this to anything but
45 # . doesn't work yet. The source code for Emacs's C kernel is
46 # expected to be in ${srcdir}/src, and the source code for Emacs's
47 # utility programs is expected to be in ${srcdir}/lib-src. This is
48 # set by the configure script's `--srcdir' option.
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 rcs-checkin
85 # Things that Emacs runs internally, or during the build process,
86 # which should not be installed in bindir.
87 UTILITIES
= test-distrib make-path wakeup make-docfile digest-doc sorted-doc \
88 movemail cvtmail fakemail yow env emacsserver hexl timer
90 # Like UTILITIES, but they're not system-dependent, and should not be
91 # deleted by the distclean target.
92 SCRIPTS
= rcs2log vcdiff
94 EXECUTABLES
= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS}
96 SOURCES
= COPYING ChangeLog Makefile.in README aixcc.
lex emacs.csh \
97 makedoc.com
*.
[chy
] rcs2log vcdiff
99 ### We need to #define emacs to get the right versions of some files.
100 ### Some other files - those shared with other GNU utilities - need
101 ### HAVE_CONFIG_H #defined before they know they can take advantage of
102 ### the information in ../src/config.h.
103 CFLAGS
=${CONFIG_CFLAGS} ${C_SWITCH_SYSTEM} -Demacs
-DHAVE_CONFIG_H
-I..
/src
107 ### Install the internal utilities. Until they are installed, we can
108 ### just run them directly from lib-src.
111 @echo
"Installing utilities run internally by Emacs."
112 .
/make-path
${archlibdir}
113 if
[ `(cd ${archlibdir};/bin/pwd)` != `/bin/pwd` ]; then \
114 for file in
${EXECUTABLES} ; do \
115 cp
$${file} ${archlibdir} ; \
116 chmod
755 ${archlibdir}/$${file} ; \
120 @echo
"Changing the owner and group of Emacs's utility programs to \`bin'."
121 @echo
"(You may ignore errors here if you don't care about this.)"
122 -for file in
${EXECUTABLES} ; do \
123 chgrp bin
${archlibdir}/$${file} ; \
124 chown bin
${archlibdir}/$${file} ; \
127 # We don't need to install `wakeup' explicitly, because it will be copied when
128 # this whole directory is copied.
129 install: ${archlibdir}
131 @echo
"Installing utilities for users to run."
132 for file in emacsclient etags ctags b2m
; do \
133 cp
$${file} ${bindir}/$${file}.new
; \
134 chmod
755 ${bindir}/$${file}.new
; \
137 @echo
"Changing the owner and group of utility programs to \`bin'."
138 @echo
"(You may ignore errors here if you don't care about this.)"
139 -for file in emacsclient etags ctags b2m
; do \
140 chgrp bin
${bindir}/$${file}.new
; \
141 chown bin
${bindir}/$${file}.new
; \
142 mv
${bindir}/$${file}.new
${bindir}/$${file} ; \
146 -rm -f
${INSTALLABLES} ${UTILITIES} core
*.o
149 -rm -f
${INSTALLABLES} ${UTILITIES} ..
/etc
/DOC
* core
*.o
154 extraclean
: realclean
163 # Test the contents of the directory.
165 @echo
"We don't have any tests for GNU Emacs yet."
170 # This verifies that the non-ASCII characters in the file `testfile'
171 # have not been clobbered by whatever means were used to copy and
172 # distribute Emacs. If they were clobbered, all the .elc files were
174 test-distrib
: test-distrib.c
175 $(CC
) -o test-distrib test-distrib.c
178 GETOPTOBJS
= getopt.o getopt1.o
179 GETOPTDEPS
= $(GETOPTOBJS
) getopt.h
180 getopt.o
: getopt.c getopt.h
181 getopt1.o
: getopt1.c getopt.h
183 etags
: etags.c
$(GETOPTDEPS
)
184 $(CC
) ${CFLAGS} -DETAGS etags.c
$(GETOPTOBJS
) $(LOADLIBES
) -o etags
186 ctags
: etags.c
$(GETOPTDEPS
)
187 $(CC
) ${CFLAGS} -DCTAGS etags.c
$(GETOPTOBJS
) $(LOADLIBES
) -o ctags
190 $(CC
) ${CFLAGS} wakeup.c
$(LOADLIBES
) -o wakeup
192 make-docfile
: make-docfile.c
193 $(CC
) ${CFLAGS} make-docfile.c
$(LOADLIBES
) -o make-docfile
195 digest-doc
: digest-doc.c
196 $(CC
) ${CFLAGS} digest-doc.c
$(LOADLIBES
) -o digest-doc
198 sorted-doc
: sorted-doc.c
199 $(CC
) ${CFLAGS} sorted-doc.c
$(LOADLIBES
) -o sorted-doc
201 b2m
: b2m.c ..
/src
/config.h
202 $(CC
) ${CFLAGS} b2m.c
$(LOADLIBES
) -o b2m
204 movemail
: movemail.c ..
/src
/config.h
205 $(CC
) ${CFLAGS} movemail.c
$(LOADLIBES
) -o movemail
208 $(CC
) ${CFLAGS} cvtmail.c
$(LOADLIBES
) -o cvtmail
210 fakemail
: fakemail.c ..
/src
/config.h
211 $(CC
) ${CFLAGS} fakemail.c
$(LOADLIBES
) -o fakemail
213 yow
: yow.c ..
/src
/paths.h
214 $(CC
) ${CFLAGS} yow.c
$(LOADLIBES
) -o yow
216 env
: env.c ..
/src
/config.h
217 $(CC
) -DEMACS
${CFLAGS} env.c
$(LOADLIBES
) -o env
219 emacsserver
: emacsserver.c ..
/src
/config.h
220 $(CC
) ${CFLAGS} emacsserver.c
$(LOADLIBES
) -o emacsserver
222 emacsclient
: emacsclient.c ..
/src
/config.h
223 $(CC
) ${CFLAGS} emacsclient.c
$(LOADLIBES
) -o emacsclient
226 $(CC
) ${CFLAGS} hexl.c
$(LOADLIBES
) -o hexl
228 getdate.o
: getdate.y ..
/src
/config.h
229 ${YACC} ${YFLAGS} getdate.y
230 $(CC
) $(CFLAGS
) -c y.tab.c
232 timer
: getdate.o timer.o
233 $(CC
) $(CFLAGS
) getdate.o timer.o
-o timer
235 make-path
: make-path.c
236 $(CC
) $(CFLAGS
) make-path.c
-o make-path
238 # These are NOT included in INSTALLABLES or UTILITIES.
239 # See ../src/ymakefile.
240 emacstool
: emacstool.c
241 $(CC
) emacstool.c
-o emacstool
${CFLAGS} \
242 -lsuntool
-lsunwindow
-lpixrect
$(LOADLIBES
)
244 # For SUN Japanese Language Environment
245 nemacstool
: emacstool.c
246 $(CC
) -o nemacstool
-DJLE
${CFLAGS} emacstool.c \
247 -lsuntool
-lmle
-lsunwindow
-lpixrect
$(LOADLIBES
)
250 $(CC
) -o xvetool
-DXVIEW
${CFLAGS} emacstool.c \
251 -lxview
-lX
-I
$(OPENWINHOME
)/include -L
$(OPENWINHOME
)/lib \
255 $(CC
) -o xveterm
-DXVIEW
-DTTERM
${CFLAGS} emacstool.c \
256 -lxview
-lolgx
-lX
-I
$(OPENWINHOME
)/include -L
$(OPENWINHOME
)/lib \
260 $(CC
) $(CFLAGS
) -o aixcc aixcc.c