# 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
# 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.$$$$ \
$(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
install-arch-dep: src install-arch-indep install-etcdoc install-$(NTDIR)
umask 022; ${MKDIR_P} "$(DESTDIR)${bindir}"
cd lib-src && \
- $(MAKE) install $(MFLAGS) prefix=${prefix} \
- exec_prefix=${exec_prefix} bindir=${bindir} \
- libexecdir=${libexecdir} archlibdir=${archlibdir} \
+ $(MAKE) install $(MFLAGS) prefix="${prefix}" \
+ exec_prefix="${exec_prefix}" bindir="${bindir}" \
+ libexecdir="${libexecdir}" archlibdir="${archlibdir}" \
INSTALL_STRIP=${INSTALL_STRIP}
if test "${ns_self_contained}" = "no"; then \
${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} "$(DESTDIR)${bindir}/$(EMACSFULL)" || exit 1 ; \
install-:
install-nt:
cd $(NTDIR) && \
- $(MAKE) install $(MFLAGS) prefix=${prefix} \
- exec_prefix=${exec_prefix} bindir=${bindir} \
- libexecdir=${libexecdir} archlibdir=${archlibdir} \
+ $(MAKE) install $(MFLAGS) prefix="${prefix}" \
+ exec_prefix="${exec_prefix}" bindir="${bindir}" \
+ libexecdir="${libexecdir}" archlibdir="${archlibdir}" \
INSTALL_STRIP=${INSTALL_STRIP}
## In the share directory, we are deleting:
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 ; \
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}
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} ..." ; \
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}"; \
uninstall: uninstall-$(NTDIR) uninstall-doc
cd lib-src && \
$(MAKE) $(MFLAGS) uninstall \
- prefix=${prefix} exec_prefix=${exec_prefix} \
- bindir=${bindir} libexecdir=${libexecdir} archlibdir=${archlibdir}
+ prefix="${prefix}" exec_prefix="${exec_prefix}" \
+ bindir="${bindir}" libexecdir="${libexecdir}" \
+ archlibdir="${archlibdir}"
-unset CDPATH; \
for dir in "$(DESTDIR)${lispdir}" "$(DESTDIR)${etcdir}" ; do \
uninstall-nt:
cd $(NTDIR) && \
$(MAKE) $(MFLAGS) uninstall \
- prefix=${prefix} exec_prefix=${exec_prefix} \
- bindir=${bindir} libexecdir=${libexecdir} archlibdir=${archlibdir}
+ prefix="${prefix}" exec_prefix="${exec_prefix}" \
+ bindir="${bindir}" libexecdir="${libexecdir}" \
+ archlibdir="${archlibdir}"
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'
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}
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
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."; \
# 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