]> code.delx.au - gnu-emacs/blobdiff - Makefile.in
Improve MS-Windows build instructions (Bug#19989)
[gnu-emacs] / Makefile.in
index 8ef9760153709b80f107973521361638569c686b..4987cf6bd4ccb48e28fb57397dc08da4fa25ce26 100644 (file)
@@ -1,6 +1,6 @@
 ### @configure_input@
 
-# Copyright (C) 1992-2014 Free Software Foundation, Inc.
+# Copyright (C) 1992-2015 Free Software Foundation, Inc.
 
 # This file is part of GNU Emacs.
 
@@ -373,13 +373,27 @@ lib lib-src lisp nt: Makefile FRC
 # 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.
+#
+# Ideally, VCSWITNESS should be a file that is modified whenever the
+# repository registers a commit from either a local checkin or a
+# repository pull. In git there is no single file that guarantees
+# this, but the local log for the current head should be close enough.
+#
+# 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='.git/logs/HEAD';                              \
+       vcswitness='$$(srcdir)/../'$$dirstate;                          \
+       [ -r "$(srcdir)/$$dirstate" ] || vcswitness='';                 \
        cd $@ || exit;                                                  \
        boot=bootstrap-emacs$(EXEEXT);                                  \
        [ ! -x "$$boot" ] || boot='';                                   \
        $(MAKE) all $(MFLAGS)                                           \
          CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}'          \
-         LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot"
+         LDFLAGS='${LDFLAGS}' MAKE='${MAKE}' BOOTSTRAPEMACS="$$boot"   \
+         VCSWITNESS="$$vcswitness"
 
 blessmail: Makefile src FRC
        cd lib-src && $(MAKE) maybe-blessmail $(MFLAGS) \
@@ -501,6 +515,7 @@ install-nt:
          $(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:
@@ -602,18 +617,13 @@ install-arch-indep: lisp install-info install-man ${INSTALL_ARCH_INDEP_EXTRA}
          ${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}" && \
+         for f in `find . -name "*.elc" -print | sed 's/.elc$$/.el/'`; do \
+           ${GZIP_PROG} -9n "$$f"; \
+         done; \
+       }
        -chmod -R a+r "$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS}
 
 ## The above chmods are needed because "umask 022; tar ..." is not
@@ -653,7 +663,7 @@ install-info: info
           [ -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`; \
+          info_misc=`cd doc/misc && LANG=C $(QUIET_SUBMAKE) $(MAKE) -s echo-info | sed '/ing directory/d'`; \
           cd ${srcdir}/info ; \
           for elt in ${INFO_NONMISC} $${info_misc}; do \
              test "$(HAVE_MAKEINFO)" = "no" && test ! -f $$elt && continue; \
@@ -749,7 +759,7 @@ uninstall: uninstall-$(NTDIR) uninstall-doc
        done
        -rm -rf "$(DESTDIR)${libexecdir}/emacs/${version}"
        thisdir=`/bin/pwd`; \
-       (info_misc=`cd doc/misc && $(QUIET_SUBMAKE) $(MAKE) -s echo-info`; \
+       (info_misc=`cd doc/misc && LANG=C $(QUIET_SUBMAKE) $(MAKE) -s echo-info | sed '/ing directory/d'`; \
         if cd "$(DESTDIR)${infodir}"; then \
           for elt in ${INFO_NONMISC} $${info_misc}; do \
             (cd "$${thisdir}"; \
@@ -976,6 +986,7 @@ info_dir_deps = ${srcdir}/build-aux/dir_top \
 ## but then we would need to depend on info-real, which would
 ## slow down parallelization.
 ${srcdir}/info/dir: ${info_dir_deps}
+       ${MKDIR_P} ${srcdir}/info
        tempfile=info-dir.$$$$; \
        rm -f $${tempfile}; \
        thisdir=`pwd`; \