From: Alexander Shukaev <haroogan@gmail.com>
To: emacs-devel <emacs-devel@gnu.org>
Subject: Whitespace in `${srcdir}' during `configure'
Date: Mon, 10 Nov 2014 03:28:21 +0100 [thread overview]
Message-ID: <CAKu-7WwZPAMgc3i0cju5Pv2tUnKVTcVEFZ_cbmFHxjVygwggZw@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 721 bytes --]
Currently in some places of `configure.ac' `${srcdir}' is used without
surrounding double quotes what results in `configure' failure. The attached
patch makes usage of `${srcdir}' more consistent and fixes it. Yes, I know
that when one enter `configure' phase with `${srcdir}' which contains
whitespace, one would see
checking whether build environment is sane... configure: error: unsafe
> srcdir value: ...
anyway. But that's another story. Maybe on some bright day, it would be
finally safe according to Autotools. Call this pedantic, but I think it is
better to receive this official prohibition error, rather than confusing
configure: line 3557: ...: No such file or directory
for `${srcdir}' with whitespace.
[-- Attachment #1.2: Type: text/html, Size: 1233 bytes --]
[-- Attachment #2: configure.ac.diff --]
[-- Type: text/plain, Size: 3626 bytes --]
--- configure.ac.orig 2014-11-10 03:06:29.602406600 +0100
+++ configure.ac 2014-11-10 03:05:41.103915800 +0100
@@ -27,9 +27,9 @@
dnl We get MINGW64 with MSYS2
if test "x$MSYSTEM" = "xMINGW32" -o "x$MSYSTEM" = "xMINGW64"
then
- . $srcdir/nt/mingw-cfg.site
+ . "${srcdir}"/nt/mingw-cfg.site
- case $srcdir in
+ case "${srcdir}" in
/* | ?:*)
# srcdir is an absolute path. In this case, force the format
# "/c/foo/bar", to simplify later conversions to native Windows
@@ -610,7 +610,7 @@
*-mingw32 )
opsys=mingw32
# MinGW overrides and adds some system headers in nt/inc.
- GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
+ GCC_TEST_OPTIONS="-I ${srcdir}/nt/inc"
;;
*-sysv4.2uw* ) opsys=unixware ;;
*-sysv5uw* ) opsys=unixware ;;
@@ -625,7 +625,7 @@
*-mingw32 )
opsys=mingw32
# MinGW overrides and adds some system headers in nt/inc.
- GCC_TEST_OPTIONS="-I $srcdir/nt/inc"
+ GCC_TEST_OPTIONS="-I ${srcdir}/nt/inc"
;;
## Otherwise, we'll fall through to the generic opsys code at the bottom.
esac
@@ -1042,7 +1042,7 @@
## In a repository checkout on the other hand, the manuals are not included.
## So makeinfo is a requirement to build from the repository, and configure
## should test for it as it does for any other build requirement.
-## We use the presence of $srcdir/info/emacs to distinguish a release,
+## We use the presence of ${srcdir}/info/emacs to distinguish a release,
## with pre-built manuals, from a repository checkout.
HAVE_MAKEINFO=yes
@@ -1050,7 +1050,7 @@
MAKEINFO=makeinfo
if test "x${with_makeinfo}" = "xno"; then
HAVE_MAKEINFO=no
- elif test ! -e "$srcdir/info/emacs" && test ! -e "$srcdir/info/emacs.info"; then
+ elif test ! -e "${srcdir}/info/emacs" && test ! -e "${srcdir}/info/emacs.info"; then
AC_MSG_ERROR( [You do not seem to have makeinfo >= 4.7, and your
source tree does not seem to have pre-built manuals in the `info' directory.
Either install a suitable version of makeinfo, or re-run configure
@@ -1566,13 +1566,13 @@
deps_frag=autodeps.mk
fi
fi
-deps_frag=$srcdir/src/$deps_frag
+deps_frag="${srcdir}/src/$deps_frag"
AC_SUBST(MKDEPDIR)
AC_SUBST(DEPFLAGS)
AC_SUBST_FILE(deps_frag)
-lisp_frag=$srcdir/src/lisp.mk
+lisp_frag="${srcdir}/src/lisp.mk"
AC_SUBST_FILE(lisp_frag)
@@ -5120,7 +5120,7 @@
dnl test/ is not present in release tarfiles.
opt_makefile=test/automated/Makefile
-if test -f "$srcdir/$opt_makefile.in"; then
+if test -f "${srcdir}/$opt_makefile.in"; then
SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES $opt_makefile"
dnl Again, it's best not to use a variable. Though you can add
dnl ", [], [opt_makefile='$opt_makefile']" and it should work.
@@ -5129,7 +5129,7 @@
dnl The admin/ directory used to be excluded from tarfiles.
-if test -d $srcdir/admin; then
+if test -d "${srcdir}/admin"; then
SUBDIR_MAKEFILES="$SUBDIR_MAKEFILES admin/unidata/Makefile admin/grammars/Makefile"
AC_CONFIG_FILES([admin/unidata/Makefile])
AC_CONFIG_FILES([admin/grammars/Makefile])
@@ -5157,10 +5157,10 @@
], [GCC="$GCC" CPPFLAGS="$CPPFLAGS" opsys="$opsys"])
dnl NB we have to cheat and use the ac_... version because abs_top_srcdir
-dnl is not yet set, sigh. Or we could use ../$srcdir/src/.gdbinit,
+dnl is not yet set, sigh. Or we could use ../${srcdir}/src/.gdbinit,
dnl or a symlink?
AC_CONFIG_COMMANDS([src/.gdbinit], [
-if test ! -f src/.gdbinit && test -f "$srcdir/src/.gdbinit"; then
+if test ! -f src/.gdbinit && test -f "${srcdir}/src/.gdbinit"; then
echo "source $ac_abs_top_srcdir/src/.gdbinit" > src/.gdbinit
fi
])
next reply other threads:[~2014-11-10 2:28 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 2:28 Alexander Shukaev [this message]
2014-11-10 7:14 ` Whitespace in `${srcdir}' during `configure' Glenn Morris
2014-11-10 7:20 ` Paul Eggert
2014-11-10 8:26 ` Glenn Morris
2014-11-10 14:28 ` Yuri Khan
2014-11-10 15:12 ` Eli Zaretskii
2014-11-10 16:03 ` Alexander Shukaev
2014-11-10 16:27 ` Eli Zaretskii
2014-11-10 17:17 ` Glenn Morris
2014-11-10 18:04 ` Alexander Shukaev
2014-11-10 19:25 ` Glenn Morris
2014-11-10 19:39 ` Glenn Morris
2014-11-17 2:24 ` Glenn Morris
2014-11-10 10:47 ` Eli Zaretskii
2014-11-10 7:17 ` Paul Eggert
2014-11-10 7:24 ` Glenn Morris
2014-11-10 9:04 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKu-7WwZPAMgc3i0cju5Pv2tUnKVTcVEFZ_cbmFHxjVygwggZw@mail.gmail.com \
--to=haroogan@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.