### @configure_input@
-# Copyright (C) 1992-2013 Free Software Foundation, Inc.
+# Copyright (C) 1992-2014 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
# file src/foo.c forces dumping a new bootstrap-emacs, then re-byte-compiling
# all preloaded elisp files, and only then dump the actual src/emacs, which
# is not wrong, but is overkill in 99.99% of the cases.
+#
+# Note the use of single quotes in the value of vcswitness.
+# This passes an unexpanded $srcdir to src's Makefile, which then
+# expands it using its own value of srcdir (which points to the
+# source directory of src/).
src: Makefile FRC
dirstate='.bzr/checkout/dirstate'; \
vcswitness='$$(srcdir)/../'$$dirstate; \
$(MAKE) install $(MFLAGS) prefix="${prefix}" \
exec_prefix="${exec_prefix}" bindir="${bindir}" \
libexecdir="${libexecdir}" archlibdir="${archlibdir}" \
+ datadir="${datadir}" \
INSTALL_STRIP=${INSTALL_STRIP}
## In the share directory, we are deleting:
${write_subdir}
subdir="$(DESTDIR)${datadir}/emacs/site-lisp" ; \
${write_subdir} || true
- [ -z "${GZIP_PROG}" ] || \
- ( echo "Compressing *.el ..." ; \
- unset CDPATH; \
- thisdir=`/bin/pwd`; \
- for dir in "$(DESTDIR)${lispdir}"; do \
- cd "$${thisdir}" ; \
- cd "$${dir}" || exit 1 ; \
- for f in `find . -name "*.elc" -print`; do \
- f_el=`echo "$$f" | sed 's/.elc$$/.el/'`; \
- ${GZIP_PROG} -9n "$$f_el" ; \
- done ; \
- done )
+ [ -z "${GZIP_PROG}" ] || { \
+ echo "Compressing *.el ..." && \
+ cd "$(DESTDIR)${lispdir}" && \
+ find . -name '*.elc' -exec $(SHELL) -c \
+ '${GZIP_PROG} -9n `expr "$$1" : "\\(.*\\)c"`' dummy '{}' ';'; \
+ }
-chmod -R a+r "$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS}
## The above chmods are needed because "umask 022; tar ..." is not
## If info/dir is missing, but we have install-info, we should let
## that handle it. If info/dir is present and we do not have install-info,
## we should check for missing entries and add them by hand.
+##
+## FIXME:
+## If HAVE_MAKEINFO = no and there are no info files, do not install info/dir.
install-info: info
umask 022; ${MKDIR_P} "$(DESTDIR)${infodir}"
-unset CDPATH; \
if [ "`cd ${srcdir}/info && /bin/pwd`" = "$$exp_infodir" ]; then \
true; \
else \
- (cd "$(DESTDIR)${infodir}"; \
- [ -f dir ] || \
- (cd "$${thisdir}"; \
- ${INSTALL_DATA} ${srcdir}/info/dir "$(DESTDIR)${infodir}/dir") ); \
+ [ -f "$(DESTDIR)${infodir}/dir" ] || \
+ [ ! -f ${srcdir}/info/dir ] || \
+ ${INSTALL_DATA} ${srcdir}/info/dir "$(DESTDIR)${infodir}/dir"; \
info_misc=`cd doc/misc && $(QUIET_SUBMAKE) $(MAKE) -s echo-info`; \
cd ${srcdir}/info ; \
for elt in ${INFO_NONMISC} $${info_misc}; do \
info-dir: ${srcdir}/info/dir
+## Not strictly necessary, but speeds things up a bit by stopping
+## the info-dir rule from running when not needed.
+## Hopefully doc/misc/*.texi is not too long for some systems?
+info_dir_deps = ${srcdir}/build-aux/dir_top \
+ ${srcdir}/doc/emacs/emacs.texi \
+ ${srcdir}/doc/lispintro/emacs-lisp-intro.texi \
+ ${srcdir}/doc/lispref/elisp.texi ${srcdir}/doc/misc/*.texi
+
## It would be much simpler if info/dir was only created in the
## installation location by the install-info rule, but we also
## need one in the source directory for people running uninstalled.
-## The dependency on *.texi is not essential, but it keeps
-## this rule from running needlessly when there are no changes.
-${srcdir}/info/dir: ${srcdir}/build-aux/dir_top ${srcdir}/doc/*/*.texi
- ${MAKE} ${MFLAGS} info-real
+## FIXME it would be faster to use the install-info program if we have it,
+## but then we would need to depend on info-real, which would
+## slow down parallelization.
+${srcdir}/info/dir: ${info_dir_deps}
tempfile=info-dir.$$$$; \
rm -f $${tempfile}; \
thisdir=`pwd`; \
esac ; \
cat=`sed -n 's/^INFO-DIR-SECTION //p' $${file}`; \
case $${cat} in \
- "Texinfo documentation system" | "Emacs"| "GNU Emacs Lisp" | \
+ "Texinfo documentation system" | "Emacs"| "Emacs lisp" | \
"Emacs editing modes" | "Emacs network features" | \
"Emacs misc features" | "Emacs lisp libraries" ) : ;; \
*) bad="$${bad} $${file}" ;; \