Makefile.in 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965
  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
  3. # DIST: that first.
  4. # Copyright (C) 1992-2012 Free Software Foundation, Inc.
  5. # This file is part of GNU Emacs.
  6. # GNU Emacs is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. # GNU Emacs is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
  16. ### Commentary:
  17. # make all to compile and build Emacs.
  18. # make install to install it.
  19. # make TAGS to update tags tables.
  20. #
  21. # make clean or make mostlyclean
  22. # Delete all files from the current directory that are normally
  23. # created by building the program. Don't delete the files that
  24. # record the configuration. Also preserve files that could be made
  25. # by building, but normally aren't because the distribution comes
  26. # with them.
  27. #
  28. # Delete `.dvi' files here if they are not part of the distribution.
  29. #
  30. # make distclean
  31. # Delete all files from the current directory that are created by
  32. # configuring or building the program. If you have unpacked the
  33. # source and built the program without creating any other files,
  34. # `make distclean' should leave only the files that were in the
  35. # distribution.
  36. #
  37. # make maintainer-clean
  38. # Delete everything from the current directory that can be
  39. # reconstructed with this Makefile. This typically includes
  40. # everything deleted by distclean, plus more: .elc files,
  41. # C source files produced by Bison, tags tables, info files,
  42. # and so on.
  43. #
  44. # make extraclean
  45. # Still more severe - delete backup and autosave files, too.
  46. #
  47. # make bootstrap
  48. # Removes all the compiled files to force a new bootstrap from a
  49. # clean slate, and then build in the normal way.
  50. SHELL = /bin/sh
  51. # This may not work with certain non-GNU make's. It only matters when
  52. # inheriting a CDPATH not starting with the current directory.
  53. CDPATH=
  54. # If Make doesn't predefine MAKE, set it here.
  55. @SET_MAKE@
  56. # ==================== Things `configure' Might Edit ====================
  57. MAINTAINER_MODE_FLAG = --disable-maintainer-mode
  58. @MAINT@MAINTAINER_MODE_FLAG = --enable-maintainer-mode
  59. cache_file = @cache_file@
  60. CONFIGURE_FLAGS = --cache-file=$(cache_file) $(MAINTAINER_MODE_FLAG)
  61. CC=@CC@
  62. CFLAGS=@CFLAGS@
  63. LDFLAGS=@LDFLAGS@
  64. CPPFLAGS=@CPPFLAGS@
  65. EXEEXT=@EXEEXT@
  66. ### These help us choose version- and architecture-specific directories
  67. ### to install files in.
  68. ### This should be the number of the Emacs version we're building,
  69. ### like `18.59' or `19.0'.
  70. version=@version@
  71. ### This should be the name of the configuration we're building Emacs
  72. ### for, like `mips-dec-ultrix' or `sparc-sun-sunos'.
  73. configuration=@configuration@
  74. # ==================== Where To Install Things ====================
  75. # The default location for installation. Everything is placed in
  76. # subdirectories of this directory. The default values for many of
  77. # the variables below are expressed in terms of this one, so you may
  78. # not need to change them. This defaults to /usr/local.
  79. prefix=@prefix@
  80. # Like `prefix', but used for architecture-specific files.
  81. exec_prefix=@exec_prefix@
  82. # Where to install Emacs and other binaries that people will want to
  83. # run directly (like etags).
  84. bindir=@bindir@
  85. # The root of the directory tree for read-only architecture-independent
  86. # data files. ${datadir}, ${infodir} and ${mandir} are based on this.
  87. datarootdir=@datarootdir@
  88. # Where to install architecture-independent data files. ${lispdir}
  89. # and ${etcdir} are subdirectories of this.
  90. datadir=@datadir@
  91. # Where to install and expect the files that Emacs modifies as it
  92. # runs. These files are all architecture-independent.
  93. # Right now, this is not used.
  94. sharedstatedir=@sharedstatedir@
  95. # Where to install and expect executable files to be run by Emacs
  96. # rather than directly by users, and other architecture-dependent
  97. # data. ${archlibdir} is a subdirectory of this.
  98. libexecdir=@libexecdir@
  99. # Where to install Emacs's man pages.
  100. # This used to allow choice of the numeric extension, but this made
  101. # little sense since the files were always installed in man1/
  102. # (and they contain cross-references that expect them to be there).
  103. mandir=@mandir@
  104. man1dir=$(mandir)/man1
  105. MAN_PAGES=ctags.1 ebrowse.1 emacs.1 emacsclient.1 etags.1 \
  106. grep-changelog.1 rcs-checkin.1
  107. # Where to install and expect the info files describing Emacs. In the
  108. # past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but
  109. # since there are now many packages documented with the texinfo
  110. # system, it is inappropriate to imply that it is part of Emacs.
  111. infodir=@infodir@
  112. INFO_FILES=ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse \
  113. ede ediff edt eieio efaq eintr elisp emacs emacs-gnutls emacs-mime epa erc \
  114. ert eshell eudc flymake forms gnus idlwave info mairix-el \
  115. message mh-e newsticker nxml-mode org pcl-cvs pgg rcirc \
  116. reftex remember sasl sc semantic ses sieve smtpmail speedbar \
  117. tramp url vip viper widget woman
  118. # If no makeinfo was found and configured --without-makeinfo, "no"; else "yes".
  119. HAVE_MAKEINFO=@HAVE_MAKEINFO@
  120. # Directory for local state files for all programs.
  121. localstatedir=@localstatedir@
  122. # Where to look for bitmap files.
  123. bitmapdir=@bitmapdir@
  124. # Where to find the source code. The source code for Emacs's C kernel is
  125. # expected to be in ${srcdir}/src, and the source code for Emacs's
  126. # utility programs is expected to be in ${srcdir}/lib-src. This is
  127. # set by the configure script's `--srcdir' option.
  128. # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
  129. srcdir=@srcdir@
  130. # Where the manpage source files are kept.
  131. mansrcdir=$(srcdir)/doc/man
  132. # Tell make where to find source files; this is needed for the makefiles.
  133. VPATH=@srcdir@
  134. # Where to find the application default.
  135. x_default_search_path=@x_default_search_path@
  136. # Location to install Emacs.app under NeXT/Open/GNUstep / Cocoa
  137. ns_appbindir=@ns_appbindir@
  138. ns_appresdir=@ns_appresdir@
  139. # Where the etc/emacs.desktop file is to be installed.
  140. desktopdir=$(datarootdir)/applications
  141. # Where the etc/images/icons/hicolor directory is to be installed.
  142. icondir=$(datarootdir)/icons
  143. # The source directory for the icon files.
  144. iconsrcdir=$(srcdir)/etc/images/icons
  145. # ==================== Emacs-specific directories ====================
  146. # These variables hold the values Emacs will actually use. They are
  147. # based on the values of the standard Make variables above.
  148. # Where to install the lisp files distributed with
  149. # Emacs. This includes the Emacs version, so that the
  150. # lisp files for different versions of Emacs will install
  151. # themselves in separate directories.
  152. lispdir=@lispdir@
  153. # Directories Emacs should search for lisp files specific
  154. # to this site (i.e. customizations), before consulting
  155. # ${lispdir}. This should be a colon-separated list of
  156. # directories.
  157. locallisppath=@locallisppath@
  158. # Where Emacs will search to find its lisp files. Before
  159. # changing this, check to see if your purpose wouldn't
  160. # better be served by changing locallisppath. This
  161. # should be a colon-separated list of directories.
  162. lisppath=@lisppath@
  163. # Where Emacs will search for its lisp files while
  164. # building. This is only used during the process of
  165. # compiling Emacs, to help Emacs find its lisp files
  166. # before they've been installed in their final location.
  167. # This should be a colon-separated list of directories.
  168. # Normally it points to the lisp/ directory in the sources.
  169. buildlisppath=${srcdir}/lisp
  170. # Where to install the other architecture-independent
  171. # data files distributed with Emacs (like the tutorial,
  172. # the cookie recipes and the Zippy database). This path
  173. # usually contains the Emacs version number, so the data
  174. # files for multiple versions of Emacs may be installed
  175. # at once.
  176. etcdir=@etcdir@
  177. # Where to put executables to be run by Emacs rather than
  178. # the user. This path usually includes the Emacs version
  179. # and configuration name, so that multiple configurations
  180. # for multiple versions of Emacs may be installed at
  181. # once.
  182. archlibdir=@archlibdir@
  183. # Where to put the docstring file.
  184. docdir=@docdir@
  185. # Where to install Emacs game score files.
  186. gamedir=@gamedir@
  187. # ==================== Utility Programs for the Build ====================
  188. # Allow the user to specify the install program.
  189. # Note that if the system does not provide a suitable install,
  190. # configure will use build-aux/install-sh. Annoyingly, it does
  191. # not use an absolute path. So we must take care to always run
  192. # INSTALL-type commands from the top-level directory.
  193. # This explains (I think) the cd thisdir seen in several install rules.
  194. INSTALL = @INSTALL@
  195. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  196. INSTALL_DATA = @INSTALL_DATA@
  197. INSTALL_INFO = @INSTALL_INFO@
  198. # By default, we uphold the dignity of our programs.
  199. INSTALL_STRIP =
  200. # We use gzip to compress installed .el files.
  201. GZIP_PROG = @GZIP_PROG@
  202. # If non-nil, gzip the installed Info and man pages.
  203. GZIP_INFO = @GZIP_INFO@
  204. # ============================= Targets ==============================
  205. # Program name transformation.
  206. TRANSFORM = @program_transform_name@
  207. # What emacs should be called when installed.
  208. EMACS = `echo emacs${EXEEXT} | sed '$(TRANSFORM)'`
  209. EMACSFULL = `echo emacs-${version}${EXEEXT} | sed '$(TRANSFORM)'`
  210. # Subdirectories to make recursively. `lisp' is not included
  211. # because the compiled lisp files are part of the distribution.
  212. # leim is not included because it needs special handling.
  213. #
  214. # Actually, we now include `lisp' as well, since the compiled files
  215. # are not included any more in case of bootstrap or in case Emacs was
  216. # checked out from a VCS.
  217. SUBDIR = lib lib-src src lisp
  218. # The subdir makefiles created by config.status.
  219. SUBDIR_MAKEFILES_IN = @SUBDIR_MAKEFILES_IN@
  220. SUBDIR_MAKEFILES = `echo $(SUBDIR_MAKEFILES_IN:.in=) | sed 's|$(srcdir)/||g'`
  221. # Subdirectories to install, and where they'll go.
  222. # lib-src's makefile knows how to install it, so we don't do that here.
  223. # leim's makefile also knows how to install it, so we don't do that here.
  224. # When installing the info files, we need to do special things to
  225. # avoid nuking an existing dir file, so we don't do that here;
  226. # instead, we have written out explicit code in the `install' targets.
  227. COPYDIR = ${srcdir}/etc ${srcdir}/lisp
  228. COPYDESTS = $(DESTDIR)${etcdir} $(DESTDIR)${lispdir}
  229. all: ${SUBDIR} leim
  230. removenullpaths=sed -e 's/^://g' -e 's/:$$//g' -e 's/::/:/g'
  231. # Generate epaths.h from epaths.in. This target is invoked by `configure'.
  232. # See comments in configure.in for why it is done this way, as opposed
  233. # to just letting configure generate epaths.h from epaths.in in a
  234. # similar way to how Makefile is made from Makefile.in.
  235. epaths-force: FRC
  236. @(lisppath=`echo ${lisppath} | ${removenullpaths}` ; \
  237. buildlisppath=`echo ${buildlisppath} | ${removenullpaths}` ; \
  238. x_default_search_path=`echo ${x_default_search_path}`; \
  239. gamedir=`echo ${gamedir}`; \
  240. sed < ${srcdir}/src/epaths.in > epaths.h.$$$$ \
  241. -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'"$${lisppath}"'";' \
  242. -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'"$${buildlisppath}"'";' \
  243. -e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";' \
  244. -e 's;\(#.*PATH_INFO\).*$$;\1 "${infodir}";' \
  245. -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";' \
  246. -e 's;\(#.*PATH_BITMAPS\).*$$;\1 "${bitmapdir}";' \
  247. -e 's;\(#.*PATH_X_DEFAULTS\).*$$;\1 "${x_default_search_path}";' \
  248. -e 's;\(#.*PATH_GAME\).*$$;\1 "${gamedir}";' \
  249. -e 's;\(#.*PATH_DOC\).*$$;\1 "${docdir}";') && \
  250. ${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h
  251. # For parallel make, src should be built before leim.
  252. # "export PARALLEL=0" is for SGI's Make, to prevent it from
  253. # running more than 1 process in the leim directory, especially for
  254. # the $TIT files there.
  255. leim: src Makefile FRC
  256. (export PARALLEL; PARALLEL=0; cd $@; $(MAKE) all $(MFLAGS) \
  257. CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
  258. LDFLAGS='${LDFLAGS}' MAKE='${MAKE}')
  259. lib-src src: lib
  260. src: lib-src FRC
  261. .RECURSIVE: ${SUBDIR} leim
  262. # We need to build `emacs' in `src' to compile the *.elc files in `lisp'.
  263. lisp: src
  264. # Maintainers can put a copy of gnulib into $(gnulib_srcdir).
  265. gnulib_srcdir = ../gnulib
  266. $(gnulib_srcdir):
  267. git clone git://git.savannah.gnu.org/gnulib.git $@
  268. # A shorter name that satisfies MS-DOS 8+3 constraints.
  269. DOS_gnulib_comp.m4 = gl-comp.m4
  270. # Update modules from gnulib, for maintainers, who should have it in
  271. # $(gnulib_srcdir) (relative to $(srcdir) and should have build tools
  272. # as per $(gnulib_srcdir)/DEPENDENCIES.
  273. GNULIB_MODULES = \
  274. alloca-opt \
  275. careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr \
  276. dup2 \
  277. filemode getloadavg getopt-gnu ignore-value intprops lstat \
  278. mktime pthread_sigmask readlink \
  279. socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
  280. GNULIB_TOOL_FLAGS = \
  281. --avoid=msvc-inval --avoid=msvc-nothrow \
  282. --avoid=raise --avoid=threadlib \
  283. --conditional-dependencies --import --no-changelog --no-vc-files \
  284. --makefile-name=gnulib.mk
  285. sync-from-gnulib: $(gnulib_srcdir)
  286. -cd $(srcdir)/m4 && cp $(DOS_gnulib_comp.m4) gnulib-comp.m4
  287. cd $(srcdir) && \
  288. $(gnulib_srcdir)/gnulib-tool $(GNULIB_TOOL_FLAGS) $(GNULIB_MODULES)
  289. cd $(srcdir)/m4 && rm gnulib-cache.m4 warn-on-use.m4
  290. cd $(srcdir)/m4 && mv gnulib-comp.m4 $(DOS_gnulib_comp.m4)
  291. cp $(gnulib_srcdir)/build-aux/texinfo.tex $(srcdir)/doc/misc
  292. cp \
  293. $(gnulib_srcdir)/build-aux/move-if-change \
  294. $(srcdir)/build-aux
  295. cd $(srcdir) && autoreconf -i -I m4
  296. .PHONY: sync-from-gnulib
  297. # These targets should be "${SUBDIR} without `src'".
  298. lib lib-src lisp: Makefile FRC
  299. cd $@; $(MAKE) all $(MFLAGS) \
  300. CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
  301. LDFLAGS='${LDFLAGS}' MAKE='${MAKE}'
  302. # Pass to src/Makefile.in an additional BOOTSTRAPEMACS variable which
  303. # is either set to bootstrap-emacs (in case bootstrap-emacs has not been
  304. # constructed yet) or the empty string (otherwise).
  305. # src/Makefile.in uses it to implement conditional dependencies, so that
  306. # files that need bootstrap-emacs to be built do not additionally need
  307. # to be kept fresher than bootstrap-emacs. Otherwise changing a single
  308. # file src/foo.c forces dumping a new bootstrap-emacs, then re-byte-compiling
  309. # all preloaded elisp files, and only then dump the actual src/emacs, which
  310. # is not wrong, but is overkill in 99.99% of the cases.
  311. src: Makefile FRC
  312. boot=bootstrap-emacs$(EXEEXT); \
  313. if [ ! -x "src/$$boot" ]; then \
  314. cd $@; $(MAKE) all $(MFLAGS) \
  315. CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
  316. LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot"; \
  317. fi;
  318. if [ -r .bzr/checkout/dirstate ]; then \
  319. vcswitness="`pwd`/.bzr/checkout/dirstate"; \
  320. fi; \
  321. cd $@; $(MAKE) all $(MFLAGS) \
  322. CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
  323. LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="" \
  324. VCSWITNESS="$$vcswitness"
  325. blessmail: Makefile src FRC
  326. cd lib-src; $(MAKE) maybe-blessmail $(MFLAGS) \
  327. MAKE='${MAKE}' archlibdir='$(archlibdir)'
  328. # We used to have one rule per */Makefile.in, but that leads to race
  329. # conditions with parallel makes, so let's assume that the time stamp on
  330. # ./Makefile is representative of the time stamp on all the other Makefiles.
  331. Makefile: config.status $(srcdir)/src/config.in \
  332. $(srcdir)/Makefile.in $(SUBDIR_MAKEFILES_IN)
  333. ./config.status
  334. # Don't erase config.status if make is interrupted while refreshing it.
  335. .PRECIOUS: config.status
  336. config.status: ${srcdir}/configure ${srcdir}/lisp/version.el
  337. if [ -x ./config.status ]; then \
  338. ./config.status --recheck; \
  339. else \
  340. ./configure $(CONFIGURE_FLAGS); \
  341. fi
  342. AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/aclocal.m4
  343. $(srcdir)/configure: $(AUTOCONF_INPUTS)
  344. cd ${srcdir} && autoconf
  345. ACLOCAL_INPUTS = @MAINT@ $(srcdir)/m4/$(DOS_gnulib_comp.m4)
  346. $(srcdir)/aclocal.m4: $(ACLOCAL_INPUTS)
  347. cd $(srcdir) && aclocal -I m4
  348. AUTOMAKE_INPUTS = @MAINT@ $(srcdir)/aclocal.m4 $(srcdir)/lib/Makefile.am $(srcdir)/lib/gnulib.mk
  349. $(srcdir)/lib/Makefile.in: $(AUTOMAKE_INPUTS)
  350. cd $(srcdir) && automake --gnu -a -c lib/Makefile
  351. am--refresh: $(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/src/config.in
  352. .PHONY: am--refresh
  353. $(srcdir)/src/config.in: $(srcdir)/src/stamp-h.in
  354. @ # Usually, there's no need to rebuild src/config.in just
  355. @ # because stamp-h.in has changed (since building stamp-h.in
  356. @ # refreshes config.in as well), but if config.in is missing
  357. @ # then we really need to do something more.
  358. [ -r "$@" ] || ( cd ${srcdir} && autoheader )
  359. $(srcdir)/src/stamp-h.in: $(AUTOCONF_INPUTS)
  360. cd ${srcdir} && autoheader
  361. rm -f $(srcdir)/src/stamp-h.in
  362. echo timestamp > $(srcdir)/src/stamp-h.in
  363. # ==================== Installation ====================
  364. ## If we let lib-src do its own installation, that means we
  365. ## don't have to duplicate the list of utilities to install in
  366. ## this Makefile as well.
  367. ## On AIX, use tar xBf.
  368. ## On Xenix, use tar xpf.
  369. .PHONY: install mkdir
  370. ## We delete each directory in ${COPYDESTS} before we copy into it;
  371. ## that way, we can reinstall over directories that have been put in
  372. ## place with their files read-only (perhaps because they are checked
  373. ## into RCS). In order to make this safe, we make sure that the
  374. ## source exists and is distinct from the destination.
  375. ### We do install-arch-indep first because
  376. ### the executable needs the Lisp files and DOC file to work properly.
  377. install: all install-arch-indep install-arch-dep install-leim blessmail
  378. @true
  379. MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done
  380. ### Install the executables that were compiled specifically for this machine.
  381. ### It would be nice to do something for a parallel make
  382. ### to ensure that install-arch-indep finishes before this starts.
  383. install-arch-dep: mkdir
  384. (cd lib-src; \
  385. $(MAKE) install $(MFLAGS) prefix=${prefix} \
  386. exec_prefix=${exec_prefix} bindir=${bindir} \
  387. libexecdir=${libexecdir} archlibdir=${archlibdir} \
  388. INSTALL_STRIP=${INSTALL_STRIP})
  389. ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} $(DESTDIR)${bindir}/$(EMACSFULL)
  390. -chmod 1755 $(DESTDIR)${bindir}/$(EMACSFULL)
  391. rm -f $(DESTDIR)${bindir}/$(EMACS)
  392. -ln $(DESTDIR)${bindir}/$(EMACSFULL) $(DESTDIR)${bindir}/$(EMACS)
  393. if test "${ns_appresdir}" != ""; then \
  394. ( cd ${ns_appresdir} ; \
  395. if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\
  396. if test -d share/info ; then dir=share/info; $(MV_DIRS) ; fi ; \
  397. rm -fr share ) ; \
  398. ( cd ${ns_appbindir} ; \
  399. if cd libexec ; then dir=emacs/*/*/* ; $(MV_DIRS); \
  400. rm -fr emacs; if cd ../bin; then rm -f emacs emacs-24*; \
  401. ln -sf ../libexec/* . ; fi ; fi ) ; \
  402. else true ; fi
  403. ## FIXME is the emacs-24* bit above really necessary and correct?
  404. ## What if I have 24.1 and 24.2 installed at the same time?
  405. ## In any case, it should use something like echo $version | sed 's/\..*//'
  406. ## instead of hard-coding a version.
  407. ## http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg01672.html
  408. ## Needs to be the user running install, so configure can't set it.
  409. set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \
  410. `id -un 2> /dev/null`; do \
  411. [ -n "$${installuser}" ] && break ; \
  412. done
  413. ### Install the files that are machine-independent.
  414. ### Most of them come straight from the distribution;
  415. ### the exception is the DOC-* files, which are copied
  416. ### from the build directory.
  417. ## Note that we copy DOC* and then delete DOC
  418. ## as a workaround for a bug in tar on Ultrix 4.2.
  419. ## We install only the relevant DOC file if possible
  420. ## (ie DOC-${version}.buildnumber), otherwise DOC-${version}*.
  421. ## If people complain about the h flag in tar command, take that out.
  422. ## That flag is also used in leim/Makefile.in
  423. ## Note that the Makefiles in the etc directory are potentially useful
  424. ## in an installed Emacs, so should not be excluded.
  425. install-arch-indep: mkdir info install-etc
  426. -set ${COPYDESTS} ; \
  427. unset CDPATH; \
  428. for dir in ${COPYDIR} ; do \
  429. if [ `(cd $$1 && /bin/pwd)` != `(cd $${dir} && /bin/pwd)` ] ; then \
  430. rm -rf $$1 ; \
  431. fi ; \
  432. shift ; \
  433. done
  434. -set ${COPYDESTS} ; \
  435. mkdir ${COPYDESTS} ; \
  436. chmod ugo+rx ${COPYDESTS} ; \
  437. unset CDPATH; \
  438. $(set_installuser); \
  439. for dir in ${COPYDIR} ; do \
  440. dest=$$1 ; shift ; \
  441. [ -d $${dir} ] \
  442. && [ `(cd $${dir} && /bin/pwd)` != `(cd $${dest} && /bin/pwd)` ] \
  443. && (echo "Copying $${dir} to $${dest}..." ; \
  444. (cd $${dir}; tar -chf - . ) \
  445. | (cd $${dest}; umask 022; \
  446. tar -xvf - && cat > /dev/null) || exit 1; \
  447. find $${dest} -exec chown $${installuser} {} ';' ;\
  448. for subdir in `find $${dest} -type d -print` ; do \
  449. chmod a+rx $${subdir} ; \
  450. rm -f $${subdir}/.gitignore ; \
  451. rm -f $${subdir}/.arch-inventory ; \
  452. rm -f $${subdir}/.DS_Store ; \
  453. rm -f $${subdir}/\#* ; \
  454. rm -f $${subdir}/.\#* ; \
  455. rm -f $${subdir}/*~ ; \
  456. rm -f $${subdir}/*.orig ; \
  457. [ "$${dir}" != "${srcdir}/etc" ] && \
  458. rm -f $${subdir}/[mM]akefile*.c $${subdir}/[mM]akefile*[.-]in \
  459. $${subdir}/[mM]akefile ; \
  460. rm -f $${subdir}/ChangeLog* ; \
  461. done) ; \
  462. done
  463. -rm -f $(DESTDIR)${lispdir}/subdirs.el
  464. $(srcdir)/update-subdirs $(DESTDIR)${lispdir}
  465. if [ -f $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el ]; \
  466. then true; \
  467. else \
  468. (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \
  469. echo " (normal-top-level-add-subdirs-to-load-path))") \
  470. > $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el; \
  471. fi
  472. chmod a+r $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el
  473. -if [ -f $(DESTDIR)${datadir}/emacs/site-lisp/subdirs.el ]; \
  474. then true; \
  475. else \
  476. (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \
  477. echo " (normal-top-level-add-subdirs-to-load-path))") \
  478. > $(DESTDIR)${datadir}/emacs/site-lisp/subdirs.el; \
  479. fi
  480. -chmod a+r $(DESTDIR)${datadir}/emacs/site-lisp/subdirs.el
  481. -unset CDPATH; \
  482. if [ `(cd ./etc; /bin/pwd)` != `(cd $(DESTDIR)${docdir}; /bin/pwd)` ]; \
  483. then \
  484. fullversion=`./src/emacs --version | sed -n '1 s/GNU Emacs *//p'`; \
  485. if [ -f "./etc/DOC-$${fullversion}" ]; \
  486. then \
  487. docfile="DOC-$${fullversion}"; \
  488. else \
  489. docfile="DOC"; \
  490. fi; \
  491. echo "Copying etc/$${docfile} to $(DESTDIR)${docdir} ..." ; \
  492. (cd ./etc; tar -chf - $${docfile}) \
  493. |(cd $(DESTDIR)${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
  494. (cd $(DESTDIR)$(docdir); \
  495. $(set_installuser); \
  496. chown $${installuser} DOC*; chmod a+r DOC*; \
  497. if test "`echo DOC-*`" != "DOC-*"; then rm -f DOC; fi); \
  498. else true; fi
  499. -unset CDPATH; \
  500. if [ -r ./lisp ] \
  501. && [ -r ./lisp/simple.el ] \
  502. && [ x`(cd ./lisp; /bin/pwd)` != x`(cd $(DESTDIR)${lispdir}; /bin/pwd)` ] \
  503. && [ x`(cd ${srcdir}/lisp; /bin/pwd)` != x`(cd ./lisp; /bin/pwd)` ]; \
  504. then \
  505. echo "Copying lisp/*.el and lisp/*.elc to $(DESTDIR)${lispdir} ..." ; \
  506. (cd lisp; tar -chf - *.el *.elc) \
  507. |(cd $(DESTDIR)${lispdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
  508. (cd $(DESTDIR)${lispdir}; \
  509. $(set_installuser); \
  510. find . -exec chown $${installuser} {} ';') ; \
  511. else true; fi
  512. -unset CDPATH; \
  513. if [ -n "${GZIP_PROG}" ]; \
  514. then \
  515. echo "Compressing *.el ..." ; \
  516. (cd $(DESTDIR)${lispdir}; for f in `find . -name "*.elc" -print`; do \
  517. ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
  518. done) \
  519. else true; fi
  520. -unset CDPATH; \
  521. thisdir=`/bin/pwd`; \
  522. if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
  523. then \
  524. (cd $(DESTDIR)${infodir}; \
  525. if [ -f dir ]; then true; \
  526. else \
  527. (cd $${thisdir}; \
  528. ${INSTALL_DATA} ${srcdir}/info/dir $(DESTDIR)${infodir}/dir; \
  529. chmod a+r $(DESTDIR)${infodir}/dir); \
  530. fi; \
  531. cd ${srcdir}/info ; \
  532. for elt in $(INFO_FILES); do \
  533. test "$(HAVE_MAKEINFO)" = "no" && test ! -f $$elt && continue; \
  534. for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
  535. (cd $${thisdir}; \
  536. ${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f); \
  537. chmod a+r $(DESTDIR)${infodir}/$$f; \
  538. if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
  539. rm -f $(DESTDIR)${infodir}/$$f.gz; \
  540. ${GZIP_PROG} -9n $(DESTDIR)${infodir}/$$f; \
  541. else true; fi; \
  542. done; \
  543. done); \
  544. else true; fi
  545. -unset CDPATH; \
  546. thisdir=`/bin/pwd`; \
  547. if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
  548. then \
  549. for elt in $(INFO_FILES); do \
  550. test "$(HAVE_MAKEINFO)" = "no" && test ! -f $$elt && continue; \
  551. (cd $${thisdir}; \
  552. ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
  553. done; \
  554. else true; fi
  555. -chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} ${COPYDESTS}
  556. thisdir=`/bin/pwd`; \
  557. cd ${mansrcdir}; \
  558. for page in ${MAN_PAGES}; do \
  559. (cd $${thisdir}; \
  560. ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${page}; \
  561. chmod a+r $(DESTDIR)${man1dir}/$${page}; \
  562. if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
  563. rm -f $(DESTDIR)${man1dir}/$${page}.gz; \
  564. ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${page}; \
  565. else true; fi ); \
  566. done
  567. ## Install those items from etc/ that need to end up elsewhere.
  568. install-etc: mkdir
  569. ${INSTALL_DATA} ${srcdir}/etc/emacs.desktop \
  570. $(DESTDIR)${desktopdir}/emacs.desktop
  571. for icon in $(iconsrcdir)/*/*/apps/*.* \
  572. $(iconsrcdir)/*/*/mimetypes/*.*; do \
  573. if [ -r $${icon} ]; then \
  574. iicon=`echo "$${icon}" | sed 's,$(srcdir)/etc/images/icons,$(DESTDIR)${icondir},'` ; \
  575. ${INSTALL_DATA} $${icon} $${iicon} ; \
  576. fi ; \
  577. done
  578. ### Install LEIM files. Although they are machine-independent, we
  579. ### have separate target here instead of including it in
  580. ### `install-arch-indep'. People who extracted LEIM files after they
  581. ### installed Emacs itself can install only LEIM files by this target.
  582. install-leim: leim/Makefile mkdir
  583. cd leim; $(MAKE) install
  584. ### Build Emacs and install it, stripping binaries while installing them.
  585. install-strip:
  586. $(MAKE) INSTALL_STRIP=-s install
  587. ### Build all the directories we're going to install Emacs in. Since
  588. ### we may be creating several layers of directories (for example,
  589. ### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use install-sh -d
  590. ### instead of mkdir. Not all systems' mkdir programs have the `-p' flag.
  591. ### We set the umask so that any created directories are world-readable.
  592. ### FIXME it would be good to warn about non-standard permissions of
  593. ### pre-existing directories, but that does not seem easy.
  594. mkdir: FRC
  595. icondirs= ; \
  596. for dir in $(iconsrcdir)/*/*/apps $(iconsrcdir)/*/*/mimetypes; do \
  597. if [ -d $${dir} ]; then \
  598. icondirs="$${icondirs} $${dir}" ; \
  599. fi ; \
  600. done ; \
  601. icondirs=`echo "$${icondirs}" | sed 's,$(srcdir)/etc/images/icons,$(DESTDIR)${icondir},g'` ; \
  602. umask 022 ; \
  603. $(srcdir)/build-aux/install-sh -d $(DESTDIR)${datadir} ${COPYDESTS} \
  604. $(DESTDIR)${infodir} $(DESTDIR)${man1dir} \
  605. $(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \
  606. $(DESTDIR)${datadir}/emacs/site-lisp \
  607. $(DESTDIR)${datadir}/emacs/${version}/site-lisp \
  608. $(DESTDIR)`echo ${locallisppath} | sed 's,:, $(DESTDIR),g'` \
  609. $(DESTDIR)${desktopdir} $${icondirs}
  610. ### Delete all the installed files that the `install' target would
  611. ### create (but not the noninstalled files such as `make all' would create).
  612. ###
  613. ### Don't delete the lisp and etc directories if they're in the source tree.
  614. uninstall:
  615. (cd lib-src; \
  616. $(MAKE) $(MFLAGS) uninstall \
  617. prefix=${prefix} exec_prefix=${exec_prefix} \
  618. bindir=${bindir} libexecdir=${libexecdir} archlibdir=${archlibdir})
  619. -unset CDPATH; \
  620. for dir in $(DESTDIR)${lispdir} $(DESTDIR)${etcdir} ; do \
  621. if [ -d $${dir} ]; then \
  622. case `(cd $${dir} ; /bin/pwd)` in \
  623. `(cd ${srcdir} ; /bin/pwd)`* ) ;; \
  624. * ) rm -rf $${dir} ;; \
  625. esac ; \
  626. case $${dir} in \
  627. $(DESTDIR)${datadir}/emacs/${version}/* ) \
  628. rm -rf $(DESTDIR)${datadir}/emacs/${version} \
  629. ;; \
  630. esac ; \
  631. fi ; \
  632. done
  633. -rm -rf $(DESTDIR)${libexecdir}/emacs/${version}
  634. thisdir=`/bin/pwd`; \
  635. (cd $(DESTDIR)${infodir} && \
  636. for elt in $(INFO_FILES); do \
  637. (cd $${thisdir}; \
  638. $(INSTALL_INFO) --remove --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
  639. if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
  640. ext=.gz; else ext=; fi; \
  641. rm -f $$elt$$ext $$elt-[1-9]$$ext $$elt-[1-9][0-9]$$ext; \
  642. done;)
  643. (if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
  644. ext=.gz; else ext=; fi; \
  645. cd $(DESTDIR)${man1dir} && for page in ${MAN_PAGES}; do \
  646. rm -f $$page$$ext; done )
  647. (cd $(DESTDIR)${bindir} && rm -f $(EMACSFULL) $(EMACS))
  648. (cd $(DESTDIR)${icondir} && rm -f hicolor/*x*/apps/emacs.png hicolor/*x*/apps/emacs22.png hicolor/scalable/apps/emacs.svg hicolor/scalable/mimetypes/emacs-document.svg )
  649. -rm -f $(DESTDIR)${desktopdir}/emacs.desktop
  650. for file in snake-scores tetris-scores; do \
  651. file=$(DESTDIR)${gamedir}/$${file}; \
  652. [ -s $${file} ] || rm -f $$file; \
  653. done
  654. FRC:
  655. # ==================== Cleaning up and miscellanea ====================
  656. .PHONY: mostlyclean clean distclean maintainer-clean extraclean
  657. ### `mostlyclean'
  658. ### Like `clean', but may refrain from deleting a few files that people
  659. ### normally don't want to recompile. For example, the `mostlyclean'
  660. ### target for GCC does not delete `libgcc.a', because recompiling it
  661. ### is rarely necessary and takes a lot of time.
  662. mostlyclean: FRC
  663. (cd src; $(MAKE) $(MFLAGS) mostlyclean)
  664. (cd oldXMenu; $(MAKE) $(MFLAGS) mostlyclean)
  665. (cd lwlib; $(MAKE) $(MFLAGS) mostlyclean)
  666. (cd lib; $(MAKE) $(MFLAGS) mostlyclean)
  667. (cd lib-src; $(MAKE) $(MFLAGS) mostlyclean)
  668. -(cd doc/emacs && $(MAKE) $(MFLAGS) mostlyclean)
  669. -(cd doc/misc && $(MAKE) $(MFLAGS) mostlyclean)
  670. -(cd doc/lispref && $(MAKE) $(MFLAGS) mostlyclean)
  671. -(cd doc/lispintro && $(MAKE) $(MFLAGS) mostlyclean)
  672. (cd leim; $(MAKE) $(MFLAGS) mostlyclean)
  673. ### `clean'
  674. ### Delete all files from the current directory that are normally
  675. ### created by building the program. Don't delete the files that
  676. ### record the configuration. Also preserve files that could be made
  677. ### by building, but normally aren't because the distribution comes
  678. ### with them.
  679. ###
  680. ### Delete `.dvi' files here if they are not part of the distribution.
  681. clean: FRC
  682. (cd src; $(MAKE) $(MFLAGS) clean)
  683. (cd oldXMenu; $(MAKE) $(MFLAGS) clean)
  684. (cd lwlib; $(MAKE) $(MFLAGS) clean)
  685. (cd lib; $(MAKE) $(MFLAGS) clean)
  686. (cd lib-src; $(MAKE) $(MFLAGS) clean)
  687. -(cd doc/emacs && $(MAKE) $(MFLAGS) clean)
  688. -(cd doc/misc && $(MAKE) $(MFLAGS) clean)
  689. -(cd doc/lispref && $(MAKE) $(MFLAGS) clean)
  690. -(cd doc/lispintro && $(MAKE) $(MFLAGS) clean)
  691. (cd leim; $(MAKE) $(MFLAGS) clean)
  692. ### `bootclean'
  693. ### Delete all files that need to be remade for a clean bootstrap.
  694. top_bootclean=\
  695. rm -f config.cache config.log
  696. ### `distclean'
  697. ### Delete all files from the current directory that are created by
  698. ### configuring or building the program. If you have unpacked the
  699. ### source and built the program without creating any other files,
  700. ### `make distclean' should leave only the files that were in the
  701. ### distribution.
  702. top_distclean=\
  703. ${top_bootclean}; \
  704. rm -f config.status config.log~ Makefile stamp-h1 ${SUBDIR_MAKEFILES}
  705. distclean: FRC
  706. (cd src; $(MAKE) $(MFLAGS) distclean)
  707. (cd oldXMenu; $(MAKE) $(MFLAGS) distclean)
  708. (cd lwlib; $(MAKE) $(MFLAGS) distclean)
  709. (cd lib; $(MAKE) $(MFLAGS) distclean)
  710. (cd lib-src; $(MAKE) $(MFLAGS) distclean)
  711. (cd doc/emacs && $(MAKE) $(MFLAGS) distclean)
  712. (cd doc/misc && $(MAKE) $(MFLAGS) distclean)
  713. (cd doc/lispref && $(MAKE) $(MFLAGS) distclean)
  714. (cd doc/lispintro && $(MAKE) $(MFLAGS) distclean)
  715. (cd leim; $(MAKE) $(MFLAGS) distclean)
  716. (cd lisp; $(MAKE) $(MFLAGS) distclean)
  717. ${top_distclean}
  718. ### `bootstrap-clean'
  719. ### Delete everything that can be reconstructed by `make' and that
  720. ### needs to be deleted in order to force a bootstrap from a clean state.
  721. bootstrap-clean: FRC
  722. (cd src; $(MAKE) $(MFLAGS) bootstrap-clean)
  723. (cd oldXMenu; $(MAKE) $(MFLAGS) maintainer-clean)
  724. (cd lwlib; $(MAKE) $(MFLAGS) maintainer-clean)
  725. (cd lib; $(MAKE) $(MFLAGS) maintainer-clean)
  726. (cd lib-src; $(MAKE) $(MFLAGS) maintainer-clean)
  727. -(cd doc/emacs && $(MAKE) $(MFLAGS) maintainer-clean)
  728. -(cd doc/misc && $(MAKE) $(MFLAGS) maintainer-clean)
  729. -(cd doc/lispref && $(MAKE) $(MFLAGS) maintainer-clean)
  730. -(cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean)
  731. (cd leim; $(MAKE) $(MFLAGS) maintainer-clean)
  732. (cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean)
  733. [ ! -f config.log ] || mv -f config.log config.log~
  734. ${top_bootclean}
  735. ## configure; make bootstrap replaces the real config.log from configure
  736. ## with the truncated one from config.status. The former is more useful.
  737. ### `maintainer-clean'
  738. ### Delete everything from the current directory that can be
  739. ### reconstructed with this Makefile. This typically includes
  740. ### everything deleted by distclean, plus more: C source files
  741. ### produced by Bison, tags tables, info files, and so on.
  742. ###
  743. ### One exception, however: `make maintainer-clean' should not delete
  744. ### `configure' even if `configure' can be remade using a rule in the
  745. ### Makefile. More generally, `make maintainer-clean' should not delete
  746. ### anything that needs to exist in order to run `configure' and then
  747. ### begin to build the program.
  748. top_maintainer_clean=\
  749. ${top_distclean}; \
  750. rm -fr autom4te.cache
  751. maintainer-clean: bootstrap-clean FRC
  752. (cd src; $(MAKE) $(MFLAGS) maintainer-clean)
  753. (cd lisp; $(MAKE) $(MFLAGS) maintainer-clean)
  754. ${top_maintainer_clean}
  755. ### This doesn't actually appear in the coding standards, but Karl
  756. ### says GCC supports it, and that's where the configuration part of
  757. ### the coding standards seem to come from. It's like distclean, but
  758. ### it deletes backup and autosave files too.
  759. extraclean:
  760. for i in ${SUBDIR} leim; do (cd $$i; $(MAKE) $(MFLAGS) extraclean); done
  761. ${top_maintainer_clean}
  762. -rm -f config-tmp-*
  763. -rm -f *~ \#*
  764. # The src subdir knows how to do the right thing
  765. # even when the build directory and source dir are different.
  766. TAGS tags: lib lib-src src
  767. cd src; $(MAKE) $(MFLAGS) tags
  768. check:
  769. @if test ! -d test/automated; then \
  770. echo "You do not seem to have the test/ directory."; \
  771. echo "Maybe you are using a release tarfile, rather than a repository checkout."; \
  772. else \
  773. cd test/automated && $(MAKE) $(MFLAGS) check; \
  774. fi
  775. dist:
  776. cd ${srcdir}; ./make-dist
  777. .PHONY: info dvi dist check html
  778. info-real:
  779. (cd doc/emacs; $(MAKE) $(MFLAGS) info)
  780. (cd doc/misc; $(MAKE) $(MFLAGS) info)
  781. (cd doc/lispref; $(MAKE) $(MFLAGS) info)
  782. (cd doc/lispintro; $(MAKE) $(MFLAGS) info)
  783. force-info:
  784. # Note that man/Makefile knows how to put the info files in $(srcdir),
  785. # so we can do ok running make in the build dir.
  786. # This used to have a clause that exited with an error if MAKEINFO = no.
  787. # But it is inappropriate to do so without checking if makeinfo is
  788. # actually needed - it is not if the info files are up-to-date. (Bug#3982)
  789. # Only the doc/*/Makefiles can decide that, so we let those rules run
  790. # and give a standard error if makeinfo is needed but missing.
  791. # While it would be nice to give a more detailed error message, that
  792. # would require changing every rule in doc/ that builds an info file,
  793. # and it's not worth it. This case is only relevant if you download a
  794. # release, then change the .texi files.
  795. info: force-info
  796. @if test "$(HAVE_MAKEINFO)" = "no"; then \
  797. echo "Configured --without-makeinfo, not building manuals" ; \
  798. else \
  799. $(MAKE) $(MFLAGS) info-real ; \
  800. fi
  801. # The info/dir file must be updated by hand when new manuals are added.
  802. check-info-dir: info
  803. cd info ; \
  804. missing= ; \
  805. for file in *; do \
  806. test -f "$${file}" || continue ; \
  807. case $${file} in \
  808. *-[0-9]*|COPYING|dir) continue ;; \
  809. esac ; \
  810. grep -q -F ": ($${file})." dir || missing="$${missing} $${file}" ; \
  811. done ; \
  812. if test -n "$${missing}"; then \
  813. echo "Missing info/dir entries: $${missing}" ; \
  814. exit 1 ; \
  815. fi ; \
  816. echo "info/dir is OK"
  817. dvi:
  818. (cd doc/emacs; $(MAKE) $(MFLAGS) dvi)
  819. (cd doc/misc; $(MAKE) $(MFLAGS) dvi)
  820. (cd doc/lispref; $(MAKE) $(MFLAGS) elisp.dvi)
  821. (cd doc/lispintro; $(MAKE) $(MFLAGS) emacs-lisp-intro.dvi)
  822. #### Bootstrapping.
  823. ### This first cleans the lisp subdirectory, removing all compiled
  824. ### Lisp files. Then re-run make to build all the files anew.
  825. .PHONY: bootstrap
  826. ## configure; make bootstrap replaces the real config.log from configure
  827. ## with the truncated one from config.status. The former is more useful.
  828. bootstrap: bootstrap-clean FRC
  829. if [ -x ./config.status ]; then \
  830. ./config.status; \
  831. else \
  832. ./configure $(CONFIGURE_FLAGS); \
  833. fi
  834. $(MAKE) $(MFLAGS) info all
  835. .PHONY: check-declare
  836. check-declare:
  837. @if [ ! -f $(srcdir)/src/emacs ]; then \
  838. echo "You must build Emacs to use this command"; \
  839. exit 1; \
  840. fi
  841. (cd leim; $(MAKE) $(MFLAGS) $@)
  842. (cd lisp; $(MAKE) $(MFLAGS) $@)