shr table rendering touch-ups
[emacs.git] / lib-src / Makefile.in
blob8285910cdbff678a0d8fa18bd36ebed633fd9383
1 ### @configure_input@
3 # Copyright (C) 1985, 1987-1988, 1993-1994, 2001-2013
4 # Free Software Foundation, Inc.
6 # This file is part of GNU Emacs.
8 # GNU Emacs is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
13 # GNU Emacs is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
22 # Avoid trouble on systems where the `SHELL' variable might be
23 # inherited from the environment.
24 SHELL = /bin/sh
26 # Following ../lisp/Makefile.in.
27 EMACS = ../src/emacs
28 EMACSOPT = -batch --no-site-file --no-site-lisp
30 # ==================== Things `configure' will edit ====================
32 CC=@CC@
33 CFLAGS=@CFLAGS@
34 version=@version@
35 ## Used in $archlibdir.
36 configuration=@configuration@
37 EXEEXT=@EXEEXT@
38 C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
39 C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
40 PROFILING_CFLAGS = @PROFILING_CFLAGS@
41 WARN_CFLAGS = @WARN_CFLAGS@
42 WERROR_CFLAGS = @WERROR_CFLAGS@
44 # Program name transformation.
45 TRANSFORM = @program_transform_name@
47 # ==================== Where To Install Things ====================
49 # Location to install Emacs.app under GNUstep / Mac OS X.
50 # Later values may use this.
51 ns_appbindir=@ns_appbindir@
53 # The default location for installation. Everything is placed in
54 # subdirectories of this directory. The default values for many of
55 # the variables below are expressed in terms of this one, so you may
56 # not need to change them. This is set with the --prefix option to
57 # `../configure'.
58 prefix=@prefix@
60 # Like `prefix', but used for architecture-specific files. This is
61 # set with the --exec-prefix option to `../configure'.
62 exec_prefix=@exec_prefix@
64 # Where to install Emacs and other binaries that people will want to
65 # run directly (like etags). This is set with the --bindir option
66 # to `../configure'.
67 bindir=@bindir@
69 # Where to install and expect executable files to be run by Emacs
70 # rather than directly by users, and other architecture-dependent
71 # data. ${archlibdir} is usually below this. This is set with the
72 # --libexecdir option to `../configure'.
73 libexecdir=@libexecdir@
75 # Directory for local state files for all programs.
76 localstatedir=@localstatedir@
78 # Where to find the source code. This is set by the configure
79 # script's `--srcdir' option. However, the value of ${srcdir} in
80 # this makefile is not identical to what was specified with --srcdir,
81 # since the variable here has `/lib-src' added at the end.
83 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
84 srcdir=@srcdir@
85 VPATH=@srcdir@
87 # The top-level source directory, also set by configure.
88 top_srcdir=@top_srcdir@
90 # ==================== Emacs-specific directories ====================
92 # These variables hold the values Emacs will actually use. They are
93 # based on the values of the standard Make variables above.
95 # Where to put executables to be run by Emacs rather than the user.
96 # This path usually includes the Emacs version and configuration name,
97 # so that multiple configurations for multiple versions of Emacs may
98 # be installed at once. This can be set with the --archlibdir option
99 # to `../configure'.
100 archlibdir=@archlibdir@
102 gamedir=@gamedir@
103 gameuser=@gameuser@
105 # ==================== Utility Programs for the Build =================
107 # ../configure figures out the correct values for these.
108 INSTALL = @INSTALL@
109 INSTALL_PROGRAM = @INSTALL_PROGRAM@
110 INSTALL_SCRIPT = @INSTALL_SCRIPT@
111 # By default, we uphold the dignity of our programs.
112 INSTALL_STRIP =
113 MKDIR_P = @MKDIR_P@
115 # ========================== Lists of Files ===========================
117 # emacsclientw.exe for MinGW, empty otherwise
118 CLIENTW = @CLIENTW@
120 # Things that a user might actually run, which should be installed in bindir.
121 INSTALLABLES = etags${EXEEXT} ctags${EXEEXT} emacsclient${EXEEXT} $(CLIENTW) \
122 ebrowse${EXEEXT}
124 INSTALLABLE_SCRIPTS = grep-changelog
126 # Things that Emacs runs internally, or during the build process,
127 # which should not be installed in bindir.
128 UTILITIES = profile${EXEEXT} movemail${EXEEXT} hexl${EXEEXT} \
129 update-game-score${EXEEXT}
131 DONT_INSTALL= test-distrib${EXEEXT} make-docfile${EXEEXT}
133 # Like UTILITIES, but they're not system-dependent, and should not be
134 # deleted by the distclean target.
135 SCRIPTS= rcs2log
137 # All files that are created by the linker, i.e., whose names end in ${EXEEXT}.
138 EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL}
140 # Specify additional -D flags for movemail. Options:
141 # -DMAIL_USE_FLOCK or -DMAIL_USE_LOCKF (use flock or lockf for file locking).
142 # See the comments about locking in movemail.c. Normally the values
143 # set by configure should be correct and you should not need to do anything.
144 # If neither flag is set, you need to use blessmail.
145 MOVE_FLAGS=
147 ## Empty if either MAIL_USE_FLOCK or MAIL_USE_LOCKF, else need-blessmail.
148 BLESSMAIL_TARGET=@BLESSMAIL_TARGET@
150 ## -lkrb or -lkrb4 if needed
151 KRB4LIB=@KRB4LIB@
152 ## -ldes or -ldes425 if needed
153 DESLIB=@DESLIB@
154 ## -lkrb5 if needed
155 KRB5LIB=@KRB5LIB@
156 ## -lk5crypto or -lcrypto if needed
157 CRYPTOLIB=@CRYPTOLIB@
158 ## -lcom_err if needed
159 COM_ERRLIB=@COM_ERRLIB@
160 ## -lhesiod if needed
161 LIBHESIOD=@LIBHESIOD@
162 ## -lresolv if HAVE_LIBRESOLV
163 LIBRESOLV=@LIBRESOLV@
164 ## -llockfile if HAVE_LIBLOCKFILE or -lmail if HAVE_LIBMAIL
165 LIBS_MAIL=@LIBS_MAIL@
166 ## empty or -lrt or -lposix4 if HAVE_CLOCK_GETTIME
167 LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@
168 ## empty or -lrt or -lposix4 if HAVE_FDATASYNC
169 LIB_FDATASYNC = @LIB_FDATASYNC@
170 ## empty or -lwsock2 for MinGW
171 LIB_WSOCK32=@LIB_WSOCK32@
173 ## Extra libraries to use when linking movemail.
174 LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \
175 $(COM_ERRLIB) $(LIBHESIOD) $(LIBRESOLV) $(LIB_WSOCK32)
177 ## Extra libraries when linking emacsclient
178 ## (empty or -lcomctl32 for MinGW)
179 LIBS_ECLIENT = @LIBS_ECLIENT@
181 ## Extra object files for linking for MinGW
182 NTLIB = @NTLIB@
183 CLIENTRES = @CLIENTRES@
184 WINDRES = @WINDRES@
186 ## Some systems define this to request special libraries.
187 LIBS_SYSTEM = @LIBS_SYSTEM@
189 BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
190 $(WARN_CFLAGS) $(WERROR_CFLAGS) \
191 -I. -I../src -I../lib \
192 -I${srcdir} -I${srcdir}/../src -I${srcdir}/../lib
194 ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
195 LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS}
196 CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS}
198 # Configuration files for .o files to depend on.
199 config_h = ../src/config.h $(srcdir)/../src/conf_post.h
201 all: ${EXE_FILES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}
203 .PHONY: all need-blessmail maybe-blessmail
205 LOADLIBES = ../lib/libgnu.a $(LIBS_SYSTEM)
206 $(EXE_FILES): ../lib/libgnu.a
208 ## Only used if we need blessmail, but no harm in always defining.
209 ## This makes the actual blessmail executable.
210 blessmail:
211 $(EMACS) $(EMACSOPT) -l $(srcdir)/../lisp/mail/blessmail.el
212 chmod +x blessmail
214 ## This checks if we need to run blessmail.
215 ## Do not charge ahead and do it! Let the installer decide.
216 need-blessmail: blessmail
217 @if [ `wc -l <blessmail` != 2 ] ; then \
218 dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \
219 echo Assuming $$dir is really the mail spool directory, you should; \
220 echo run lib-src/blessmail $(DESTDIR)${archlibdir}/movemail${EXEEXT}; \
221 echo as root, to give movemail${EXEEXT} appropriate permissions.; \
222 echo Do that after running make install.; \
225 ## This is the target invoked by the top-level Makefile.
226 maybe-blessmail: $(BLESSMAIL_TARGET)
228 ## Install the internal utilities. Until they are installed, we can
229 ## just run them directly from lib-src.
230 ## If the chown/chmod commands fail, that is not a big deal.
231 ## update-game-score will detect at runtime that it is not setuid,
232 ## and handle things accordingly.
233 $(DESTDIR)${archlibdir}: all
234 @echo
235 @echo "Installing utilities run internally by Emacs."
236 umask 022; ${MKDIR_P} $(DESTDIR)${archlibdir}
237 if [ `cd $(DESTDIR)${archlibdir} && /bin/pwd` != `/bin/pwd` ]; then \
238 for file in ${UTILITIES}; do \
239 $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file $(DESTDIR)${archlibdir}/$$file ; \
240 done ; \
242 umask 022; ${MKDIR_P} $(DESTDIR)${gamedir}; \
243 touch $(DESTDIR)${gamedir}/snake-scores; \
244 touch $(DESTDIR)${gamedir}/tetris-scores
245 -if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score${EXEEXT} && chmod u+s $(DESTDIR)${archlibdir}/update-game-score${EXEEXT}; then \
246 chown ${gameuser} $(DESTDIR)${gamedir}; \
247 chmod u=rwx,g=rwx,o=rx $(DESTDIR)${gamedir}; \
249 if [ `cd $(DESTDIR)${archlibdir} && /bin/pwd` \
250 != `cd ${srcdir} && /bin/pwd` ]; then \
251 for file in ${SCRIPTS}; do \
252 $(INSTALL_SCRIPT) ${srcdir}/$$file $(DESTDIR)${archlibdir}/$$file; \
253 done ; \
256 .PHONY: install uninstall mostlyclean clean distclean maintainer-clean
257 .PHONY: extraclean check tags
259 install: $(DESTDIR)${archlibdir}
260 @echo
261 @echo "Installing utilities for users to run."
262 umask 022; ${MKDIR_P} $(DESTDIR)${bindir}
263 for file in ${INSTALLABLES} ; do \
264 $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} $(DESTDIR)${bindir}/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \
265 done
266 for file in ${INSTALLABLE_SCRIPTS} ; do \
267 $(INSTALL_SCRIPT) ${srcdir}/$${file} $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \
268 done
270 uninstall:
271 for file in ${INSTALLABLES}; do \
272 rm -f $(DESTDIR)${bindir}/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \
273 done
274 for file in ${INSTALLABLE_SCRIPTS}; do \
275 rm -f $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \
276 done
277 if [ -d $(DESTDIR)${archlibdir} ]; then \
278 (cd $(DESTDIR)${archlibdir} && rm -f ${UTILITIES} ${SCRIPTS}) \
281 mostlyclean:
282 -rm -f core *.o *.res
284 clean: mostlyclean
285 -rm -f ${EXE_FILES}
287 distclean: clean
288 -rm -f TAGS
289 -rm -f Makefile blessmail
291 maintainer-clean: distclean
292 true
294 extraclean: maintainer-clean
295 -rm -f *~ \#*
297 ## Test the contents of the directory.
298 check:
299 @echo "We don't have any tests for the lib-src/ directory yet."
301 tags: TAGS
302 TAGS: etags${EXEEXT}
303 etags *.[ch]
305 ## This verifies that the non-ASCII characters in the file \`testfile\'
306 ## have not been clobbered by whatever means were used to copy and
307 ## distribute Emacs. If they were clobbered, all the .elc files were
308 ## clobbered too.
309 test-distrib${EXEEXT}: ${srcdir}/test-distrib.c
310 $(CC) ${ALL_CFLAGS} -o test-distrib${EXEEXT} ${srcdir}/test-distrib.c
311 ./test-distrib ${srcdir}/testfile
313 ../lib/libgnu.a: $(config_h)
314 cd ../lib && $(MAKE) libgnu.a
316 regex.o: $(srcdir)/../src/regex.c $(srcdir)/../src/regex.h $(config_h)
317 ${CC} -c ${CPP_CFLAGS} -DCONFIG_BROKETS -DINHIBIT_STRING_HEADER \
318 ${srcdir}/../src/regex.c
320 etags${EXEEXT}: ${srcdir}/etags.c regex.o $(NTLIB) $(config_h)
321 $(CC) ${ALL_CFLAGS} -DEMACS_NAME="\"GNU Emacs\"" \
322 -DVERSION="\"${version}\"" ${srcdir}/etags.c \
323 regex.o $(LOADLIBES) $(NTLIB) -o etags${EXEEXT}
325 ebrowse${EXEEXT}: ${srcdir}/ebrowse.c ${srcdir}/../lib/min-max.h $(NTLIB) \
326 $(config_h)
327 $(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" \
328 ${srcdir}/ebrowse.c $(LOADLIBES) $(NTLIB) -o ebrowse${EXEEXT}
330 ## We depend on etags to assure that parallel makes do not write two
331 ## etags.o files on top of each other.
332 ctags${EXEEXT}: etags${EXEEXT}
333 $(CC) ${ALL_CFLAGS} -DCTAGS -DEMACS_NAME="\"GNU Emacs\"" \
334 -DVERSION="\"${version}\"" ${srcdir}/etags.c \
335 regex.o $(LOADLIBES) $(NTLIB) -o ctags${EXEEXT}
337 profile${EXEEXT}: ${srcdir}/profile.c $(NTLIB) $(config_h)
338 $(CC) ${ALL_CFLAGS} ${srcdir}/profile.c \
339 $(LOADLIBES) $(NTLIB) $(LIB_CLOCK_GETTIME) -o profile${EXEEXT}
341 make-docfile${EXEEXT}: ${srcdir}/make-docfile.c $(NTLIB) $(config_h)
342 $(CC) ${ALL_CFLAGS} ${srcdir}/make-docfile.c $(LOADLIBES) $(NTLIB) \
343 -o make-docfile${EXEEXT}
345 movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(NTLIB) $(config_h)
346 $(CC) ${ALL_CFLAGS} ${MOVE_FLAGS} ${srcdir}/movemail.c pop.o \
347 $(LOADLIBES) $(NTLIB) $(LIBS_MOVE) -o movemail${EXEEXT}
349 pop.o: ${srcdir}/pop.c ${srcdir}/pop.h ${srcdir}/../lib/min-max.h $(config_h)
350 $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c
352 emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(config_h)
353 $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \
354 -DVERSION="\"${version}\"" $(NTLIB) $(LOADLIBES) $(LIB_FDATASYNC) \
355 $(LIB_WSOCK32) $(LIBS_ECLIENT) -o emacsclient${EXEEXT}
357 emacsclientw${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(CLIENTRES) $(config_h)
358 $(CC) ${ALL_CFLAGS} $(CLIENTRES) -mwindows ${srcdir}/emacsclient.c \
359 -DVERSION="\"${version}\"" $(LOADLIBES) $(LIB_FDATASYNC) \
360 $(LIB_WSOCK32) $(LIBS_ECLIENT) -o emacsclientw${EXEEXT}
362 NTINC = ${srcdir}/../nt/inc
363 NTDEPS = $(NTINC)/ms-w32.h $(NTINC)/sys/stat.h $(NTINC)/inttypes.h \
364 $(NTINC)/stdint.h $(NTINC)/pwd.h $(NTINC)/sys/time.h $(NTINC)/stdbool.h \
365 $(NTINC)/sys/wait.h $(NTINC)/unistd.h $(NTINC)/sys/file.h $(NTINC)/netdb.h
367 # The dependency on $(NTDEPS) is a trick intended to cause recompile of
368 # programs on MinGW whenever some private header in nt/inc is modified.
369 ntlib.o: ${srcdir}/ntlib.c ${srcdir}/ntlib.h $(NTDEPS)
370 $(CC) -c ${CPP_CFLAGS} ${srcdir}/ntlib.c
372 hexl${EXEEXT}: ${srcdir}/hexl.c $(NTLIB) $(config_h)
373 $(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl${EXEEXT}
375 update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(NTLIB) $(config_h)
376 $(CC) ${ALL_CFLAGS} -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \
377 ${srcdir}/update-game-score.c $(LOADLIBES) $(NTLIB) \
378 -o update-game-score${EXEEXT}
380 emacsclient.res: $(NTINC)/../emacsclient.rc
381 $(WINDRES) -O coff --include-dir=$(NTINC)/.. -o emacsclient.res \
382 $(NTINC)/../emacsclient.rc
384 ## Makefile ends here.