unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Whitespace in `${srcdir}' during `configure'
@ 2014-11-10  2:28 Alexander Shukaev
  2014-11-10  7:14 ` Glenn Morris
  2014-11-10  7:17 ` Paul Eggert
  0 siblings, 2 replies; 17+ messages in thread
From: Alexander Shukaev @ 2014-11-10  2:28 UTC (permalink / raw)
  To: emacs-devel


[-- 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
 ])

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-11-17  2:24 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-10  2:28 Whitespace in `${srcdir}' during `configure' Alexander Shukaev
2014-11-10  7:14 ` 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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).