* vc/vc-git.el (vc-git-dir-extra-headers): Add headers
[bpt/emacs.git] / Makefile.in
index f97b03b..e00eb79 100644 (file)
@@ -164,6 +164,8 @@ bitmapdir=@bitmapdir@
 # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
 srcdir=@srcdir@
 abs_srcdir=@abs_srcdir@
+# MinGW CPPFLAGS may use this.
+abs_top_srcdir=@abs_top_srcdir@
 
 # Where the manpage source files are kept.
 mansrcdir=$(srcdir)/doc/man
@@ -340,8 +342,16 @@ msys_sed_sh_escape=sed -e 's/[];$$*.^[]/\\\\&/g'
 # nt/epaths.nt as the template.
 # Use the value of ${locallisppath} supplied by `configure',
 # to support the --enable-locallisppath argument.
+#
+# When building with MinGW inside the MSYS tree, 'pwd' produces directories
+# relative to the root of the MSYS tree, e.g. '/home/user/foo' instead of
+# '/d/MSYS/home/user/foo'.  If such a value of srcdir is written to
+# src/epaths.h, that causes temacs to fail, because, being a MinGW
+# program that knows nothing of MSYS root substitution, it cannot find
+# the data directory.  "pwd -W" produces Windows-style 'd:/foo/bar'
+# absolute directory names, so we use it here to countermand that lossage.
 epaths-force-w32: FRC
-       @(w32srcdir=`echo "${srcdir}" | ${msys_to_w32}` ;       \
+       @(w32srcdir=`cd "${srcdir}" && pwd -W` ; \
          prefixpattern=`echo '${prefix}' | ${msys_to_w32} | ${msys_sed_sh_escape}` ; \
          locallisppath=`echo '${locallisppath}' | ${msys_lisppath_to_w32} | ${msys_prefix_subst}` ; \
          sed < ${srcdir}/nt/epaths.nt > epaths.h.$$$$          \
@@ -425,7 +435,7 @@ AUTOCONF_INPUTS = $(srcdir)/configure.ac $(srcdir)/aclocal.m4
 $(srcdir)/configure: $(AUTOCONF_INPUTS)
        cd ${srcdir} && autoconf
 
-ACLOCAL_INPUTS = $(srcdir)/m4/gnulib-comp.m4
+ACLOCAL_INPUTS = $(srcdir)/configure.ac $(srcdir)/m4/gnulib-comp.m4
 $(srcdir)/aclocal.m4: $(ACLOCAL_INPUTS)
        cd $(srcdir) && aclocal -I m4
 
@@ -569,9 +579,11 @@ install-arch-indep: lisp leim install-info install-man ${INSTALL_ARCH_INDEP_EXTR
        for dir in ${COPYDIR} ; do \
          [ -d $${dir} ] || exit 1 ; \
          dest="$$1" ; shift ; \
-         [ -d "$${dest}" ] && \
-           [ "`cd \"$${dest}\" && /bin/pwd`" = "`cd $${dir} && /bin/pwd`" ] && \
-           continue ; \
+         if [ -d "$${dest}" ]; then \
+           exp_dest=`cd "$${dest}" && /bin/pwd`; \
+           [ "$$exp_dest" = "`cd $${dir} && /bin/pwd`" ] && continue ; \
+         else true; \
+         fi; \
          if [ "$${dir}" = "leim/quail" ]; then \
            [ "`cd $${dir} && /bin/pwd`" = "`cd ${srcdir}/leim/quail && /bin/pwd`" ] && \
              continue ; \
@@ -621,7 +633,8 @@ install-arch-indep: lisp leim install-info install-man ${INSTALL_ARCH_INDEP_EXTR
              cd "$${thisdir}" ; \
              cd "$${dir}" || exit 1 ; \
              for f in `find . -name "*.elc" -print`; do \
-               ${GZIP_PROG} -9n "`echo \"$$f\" | sed 's/.elc$$/.el/'`" ; \
+               f_el=`echo "$$f" | sed 's/.elc$$/.el/'`; \
+               ${GZIP_PROG} -9n "$$f_el" ; \
              done ; \
            done )
        -chmod -R a+r "$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS}
@@ -635,7 +648,8 @@ install-arch-indep: lisp leim install-info install-man ${INSTALL_ARCH_INDEP_EXTR
 install-etcdoc: src install-arch-indep
        -unset CDPATH; \
        umask 022; ${MKDIR_P} "$(DESTDIR)${etcdocdir}" ; \
-       if [ "`cd ./etc; /bin/pwd`" != "`cd \"$(DESTDIR)${etcdocdir}\"; /bin/pwd`" ]; \
+       exp_etcdocdir=`cd "$(DESTDIR)${etcdocdir}"; /bin/pwd`; \
+       if [ "`cd ./etc; /bin/pwd`" != "$$exp_etcdocdir" ]; \
        then \
           docfile="DOC"; \
           echo "Copying etc/$${docfile} to $(DESTDIR)${etcdocdir} ..." ; \
@@ -648,7 +662,8 @@ install-info: info
        umask 022; ${MKDIR_P} "$(DESTDIR)${infodir}"
        -unset CDPATH; \
        thisdir=`/bin/pwd`; \
-       if [ "`cd ${srcdir}/info && /bin/pwd`" = "`cd \"$(DESTDIR)${infodir}\" && /bin/pwd`" ]; then \
+       exp_infodir=`cd "$(DESTDIR)${infodir}" && /bin/pwd`; \
+       if [ "`cd ${srcdir}/info && /bin/pwd`" = "$$exp_infodir" ]; then \
          true; \
        else \
          (cd "$(DESTDIR)${infodir}"; \
@@ -863,9 +878,9 @@ distclean: FRC
        cd leim     && $(MAKE) $(MFLAGS) distclean
        cd lisp     && $(MAKE) $(MFLAGS) distclean
        cd nextstep && $(MAKE) $(MFLAGS) distclean
-       [ ! -d test/automated ] || { \
-         cd test/automated && $(MAKE) $(MFLAGS) distclean; \
-       }
+       for dir in test/automated admin/unidata; do \
+         [ ! -d $$dir ] || (cd $$dir && $(MAKE) $(MFLAGS) distclean); \
+       done
        ${top_distclean}
 
 ### `bootstrap-clean'
@@ -885,9 +900,9 @@ bootstrap-clean: FRC
        cd leim     && $(MAKE) $(MFLAGS) maintainer-clean
        cd lisp     && $(MAKE) $(MFLAGS) bootstrap-clean
        cd nextstep && $(MAKE) $(MFLAGS) maintainer-clean
-       [ ! -d test/automated ] || { \
-         cd test/automated && $(MAKE) $(MFLAGS) bootstrap-clean; \
-       }
+       for dir in test/automated admin/unidata; do \
+         [ ! -d $$dir ] || (cd $$dir && $(MAKE) $(MFLAGS) bootstrap-clean); \
+       done
        [ ! -f config.log ] || mv -f config.log config.log~
        ${top_bootclean}
 
@@ -908,9 +923,9 @@ top_maintainer_clean=\
 maintainer-clean: bootstrap-clean FRC
        cd src  && $(MAKE) $(MFLAGS) maintainer-clean
        cd lisp && $(MAKE) $(MFLAGS) maintainer-clean
-       [ ! -d test/automated ] || { \
-         cd test/automated && $(MAKE) $(MFLAGS) maintainer-clean; \
-       }
+       for dir in test/automated admin/unidata; do \
+         [ ! -d $$dir ] || (cd $$dir && $(MAKE) $(MFLAGS) maintainer-clean); \
+       done
        ${top_maintainer_clean}
 
 ### This doesn't actually appear in the coding standards, but Karl
@@ -929,7 +944,7 @@ extraclean:
 TAGS tags: lib lib-src src
        cd src; $(MAKE) $(MFLAGS) tags
 
-check:
+check: all
        @if test ! -d test/automated; then \
          echo "You do not seem to have the test/ directory."; \
          echo "Maybe you are using a release tarfile, rather than a repository checkout."; \
@@ -1058,11 +1073,11 @@ check-info-dir: info
 
 # Bootstrapping does the following:
 #  * Remove files to start from a bootstrap-clean slate.
-#  * Run autogen.sh, falling back on copy_autogen if autogen.sh fails.
+#  * Run autogen.sh.
 #  * Rebuild Makefile, to update the build procedure itself.
 #  * Do the actual build.
 bootstrap: bootstrap-clean FRC
-       cd $(srcdir) && { ./autogen.sh || autogen/copy_autogen; }
+       cd $(srcdir) && ./autogen.sh
        $(MAKE) $(MFLAGS) MAKEFILE_NAME=force-Makefile force-Makefile
        $(MAKE) $(MFLAGS) info all