# 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; \
+ vcswitness='$$(srcdir)/../'$$dirstate; \
[ -r "$(srcdir)/$$dirstate" ] || vcswitness=''; \
cd $@ || exit; \
boot=bootstrap-emacs$(EXEEXT); \
$(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