]> code.delx.au - gnu-emacs/blobdiff - Makefile.in
Stop keeping etc/refcards/emacsver.tex in the repository
[gnu-emacs] / Makefile.in
index 0c11828deb22250b9e87951dc0bcbe9ca8586422..458904710e0193959df895c6df6437e56028a999 100644 (file)
@@ -288,7 +288,18 @@ COPYDESTS = "$(DESTDIR)${etcdir}" "$(DESTDIR)${lispdir}"
 
 all: ${SUBDIR} info
 
-.PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32
+.PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 etc-emacsver
+
+# If configure were to just generate emacsver.tex from emacsver.tex.in
+# in the normal way, the timestamp of emacsver.tex would always be
+# newer than that of the pdf files, which are prebuilt in release tarfiles.
+# So we use this rule, and move-if-change, to avoid that.
+etc-emacsver:
+       majorversion=`echo ${version} | sed 's/\..*//'`; \
+       sed "s/[@]majorversion@/$${majorversion}/" \
+         ${srcdir}/etc/refcards/emacsver.tex.in > emacsver.tex.$$$$ && \
+         ${srcdir}/build-aux/move-if-change emacsver.tex.$$$$ \
+         ${srcdir}/etc/refcards/emacsver.tex
 
 removenullpaths=sed -e 's/^:*//' -e 's/:*$$//g' -e 's/::*/:/g'
 
@@ -323,14 +334,6 @@ epaths-force:
          -e 's;\(#.*PATH_DOC\).*$$;\1 "${etcdocdir}";') &&             \
        ${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h
 
-# Replace "${w32prefix}" with '%emacs_dir%' (which expands to install
-# directory at runtime).
-msys_w32prefix_subst=sed -e 's!\(^\|;\)'"$${w32prefixpattern}"'\([;/]\|$$\)!\1%emacs_dir%\2!g'
-
-# Quote Sed special characters (except backslash and newline) with
-# a double backslash.
-msys_sed_sh_escape=sed -e 's/[];$$*.^[]/\\\\&/g'
-
 # The w32 build needs a slightly different editing, and it uses
 # nt/epaths.nt as the template.
 #
@@ -342,12 +345,12 @@ msys_sed_sh_escape=sed -e 's/[];$$*.^[]/\\\\&/g'
 # program that doesn't support MSYS-style paths (e.g. '/c/foo/bar' or
 # '/foo/bar').
 epaths-force-w32:
-       @(w32srcdir=`${srcdir}/build-aux/msys-to-w32 "${srcdir}"`; \
-         w32prefix=`${srcdir}/build-aux/msys-to-w32 "${prefix}" N`; \
-         w32prefixpattern=`echo "$${w32prefix}" | ${msys_sed_sh_escape}` ; \
-         w32locallisppath=`${srcdir}/build-aux/msys-to-w32 "${locallisppath}" N ":" "\\;" | ${msys_w32prefix_subst}` ; \
+       @(w32srcdir=`${srcdir}/build-aux/msys-to-w32 "${abs_srcdir}"`; \
+         w32prefix=`${srcdir}/build-aux/msys-to-w32 "${prefix}"`; \
+         w32locallisppath=`${srcdir}/build-aux/msys-to-w32 "${locallisppath}"` ; \
+         w32locallisppath=$${w32locallisppath//$${w32prefix}/"%emacs_dir%"} ; \
          sed < ${srcdir}/nt/epaths.nt > epaths.h.$$$$          \
-         -e 's;\(#.*PATH_SITELOADSEARCH\).*$$;\1 "'"$${w32locallisppath}"'";' \
+         -e 's;\(#.*PATH_SITELOADSEARCH\).*$$;\1 "'"$${w32locallisppath//;/\\;}"'";' \
          -e '/^.*#/s/@VER@/${version}/g'                       \
          -e '/^.*#/s/@CFG@/${configuration}/g'                 \
          -e "/^.*#/s|@SRC@|$${w32srcdir}|g") &&                \
@@ -852,6 +855,7 @@ bootstrap-clean: $(distclean_dirs:=_bootstrap-clean)
        done
        [ ! -f config.log ] || mv -f config.log config.log~
        rm -rf ${srcdir}/info
+       rm -f ${srcdir}/etc/refcards/emacsver.tex
        ${top_bootclean}
 
 ### `maintainer-clean'