# make bootstrap
# Removes all the compiled files to force a new bootstrap from a
# clean slate, and then build in the normal way.
+#
+# make docs
+# Make Emacs documentation files from their sources; requires makeinfo.
SHELL = /bin/sh
# If Make doesn't predefine MAKE, set it here.
@SET_MAKE@
+# Prevent submakes from outputting "Entering directory ..." and
+# "Leaving directory..." diagnostics that would mess up 'make echo-info'.
+QUIET_SUBMAKE = MAKELEVEL=0
+
# ==================== Things `configure' Might Edit ====================
cache_file = @cache_file@
tar -xvf - && cat > /dev/null) || exit 1; \
[ "$${dir}" != "${srcdir}/etc" ] || rm -f $${dest}/DOC* ; \
for subdir in `find $${dest} -type d -print` ; do \
+ chmod a+rx $${subdir} ; \
rm -f $${subdir}/.gitignore ; \
rm -f $${subdir}/.arch-inventory ; \
rm -f $${subdir}/.DS_Store ; \
done )
-chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} ${COPYDESTS}
-# The last chmod isn't needed at present.
+## The above chmods are needed because "umask 022; tar ..." is not
+## guaranteed to do the right thing; eg if we are root and tar is
+## preserving source permissions.
## We install only the relevant DOC file if possible
## (ie DOC-${version}.buildnumber), otherwise DOC-${version}*.
[ -f dir ] || \
(cd $${thisdir}; \
${INSTALL_DATA} ${srcdir}/info/dir $(DESTDIR)${infodir}/dir) ; \
- info_misc=`cd $${thisdir}/doc/misc; ${MAKE} -s echo-info`; \
+ info_misc=`cd $${thisdir}/doc/misc && \
+ $(QUIET_SUBMAKE) $(MAKE) -s echo-info \
+ `; \
cd ${srcdir}/info ; \
for elt in ${INFO_NONMISC} $${info_misc}; do \
test "$(HAVE_MAKEINFO)" = "no" && test ! -f $$elt && continue; \
${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
done)
+## "gzip || true" is because some gzips exit with non-zero status
+## if compression would not reduce the file size. Eg, the gzip in
+## OpenBSD 4.9 seems to do this (2013/03). In Emacs, this can
+## only happen with the tiny ctags.1 manpage. We don't really care if
+## ctags.1 is compressed or not. "gzip -f" is another option here,
+## but not sure if portable.
install-man:
umask 022; ${MKDIR_P} $(DESTDIR)${man1dir}
thisdir=`/bin/pwd`; \
${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${dest}); \
( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \
rm -f $(DESTDIR)${man1dir}/$${dest}.gz; \
- ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${dest}; \
+ ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${dest} || true; \
done
## Install those items from etc/ that need to end up elsewhere.
done
-rm -rf $(DESTDIR)${libexecdir}/emacs/${version}
thisdir=`/bin/pwd`; \
- (info_misc=`cd doc/misc; ${MAKE} -s echo-info`; \
+ (info_misc=`cd doc/misc && $(QUIET_SUBMAKE) $(MAKE) -s echo-info`; \
if cd $(DESTDIR)${infodir}; then \
for elt in ${INFO_NONMISC} $${info_misc}; do \
(cd $${thisdir}; \
dist:
cd ${srcdir}; ./make-dist
+DVIS = lispref-dvi lispintro-dvi emacs-dvi misc-dvi
+HTMLS = lispref-html lispintro-html emacs-html misc-html
+INFOS = lispref-info lispintro-info emacs-info misc-info
+PDFS = lispref-pdf lispintro-pdf emacs-pdf misc-pdf
+PSS = lispref-ps lispintro-ps emacs-ps # no misc-ps
+
+DOCS = $(DVIS) $(HTMLS) $(INFOS) $(PDFS) $(PSS)
+$(DOCS):
+ t=$@; IFS=-; set $$t; IFS=; cd doc/$$1 && $(MAKE) $(MFLAGS) $$2
+
+.PHONY: $(DOCS) docs pdf ps
.PHONY: info dvi dist check html info-real force-info check-info-dir
-info-real:
- (cd doc/emacs; $(MAKE) $(MFLAGS) info)
- (cd doc/misc; $(MAKE) $(MFLAGS) info)
- (cd doc/lispref; $(MAKE) $(MFLAGS) info)
- (cd doc/lispintro; $(MAKE) $(MFLAGS) info)
+docs: $(DOCS)
+dvi: $(DVIS)
+html: $(HTMLS)
+info-real: $(INFOS)
+pdf: $(PDFS)
+ps: $(PSS)
force-info:
# Note that man/Makefile knows how to put the info files in $(srcdir),
fi ; \
echo "info/dir is OK"
-dvi:
- (cd doc/emacs; $(MAKE) $(MFLAGS) dvi)
- (cd doc/misc; $(MAKE) $(MFLAGS) dvi)
- (cd doc/lispref; $(MAKE) $(MFLAGS) elisp.dvi)
- (cd doc/lispintro; $(MAKE) $(MFLAGS) emacs-lisp-intro.dvi)
-
#### Bootstrapping.
### This first cleans the lisp subdirectory, removing all compiled