[GRASS-dev] [GRASS GIS] #682: Allow compilation in directory with spaces

#682: Allow compilation in directory with spaces
-------------------------+--------------------------------------------------
Reporter: marisn | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: minor | Milestone: 6.5.0
Component: Compiling | Version: svn-develbranch6
Keywords: | Platform: Linux
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
As of GRASS 6.5 it's not possible to configure and make GRASS if it's
source is located in directory containing spaces in it's path.

Steps to reproduce:
{{{
make distclean
mv /path/to/my/grass/source "/path/with/spaces/to/grass source"
./configure && make
}}}

Configure part is easy but other Make system parts are more tricky.
{{{
--- configure (revision 38380)
+++ configure (working copy)
@@ -716,18 +716,18 @@

  ac_aux_dir=
  for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/install-sh; then
- ac_aux_dir=$ac_dir
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir="$ac_dir"
      ac_install_sh="$ac_aux_dir/install-sh -c"
      break
- elif test -f $ac_dir/install.sh; then
- ac_aux_dir=$ac_dir
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir="$ac_dir"
      ac_install_sh="$ac_aux_dir/install.sh -c"
      break
    fi
  done
  if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in
$srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+ { echo "configure: error: can not find install-sh or install.sh in
\"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" 1>&2; exit 1; }
  fi
  ac_config_guess=$ac_aux_dir/config.guess
  ac_config_sub=$ac_aux_dir/config.sub
@@ -1235,19 +1235,19 @@
  # Use absolute path for aux directory so that install-sh works

  ac_aux_dir=
-for ac_dir in $SRCDIR $srcdir/$SRCDIR; do
- if test -f $ac_dir/install-sh; then
+for ac_dir in "$SRCDIR" "$srcdir/$SRCDIR"; do
+ if test -f "$ac_dir/install-sh"; then
      ac_aux_dir=$ac_dir
      ac_install_sh="$ac_aux_dir/install-sh -c"
      break
- elif test -f $ac_dir/install.sh; then
+ elif test -f "$ac_dir/install.sh"; then
      ac_aux_dir=$ac_dir
      ac_install_sh="$ac_aux_dir/install.sh -c"
      break
    fi
  done
  if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in
$SRCDIR $srcdir/$SRCDIR" 1>&2; exit 1; }
+ { echo "configure: error: can not find install-sh or install.sh in
\"$SRCDIR\" \"$srcdir/$SRCDIR\"" 1>&2; exit 1; }
  fi
  ac_config_guess=$ac_aux_dir/config.guess
  ac_config_sub=$ac_aux_dir/config.sub
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/682&gt;
GRASS GIS <http://grass.osgeo.org>

#682: Allow compilation in directory with spaces
------------------------+---------------------------------------------------
  Reporter: marisn | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: minor | Milestone: 6.5.0
Component: Compiling | Version: svn-develbranch6
Resolution: | Keywords:
  Platform: Linux | Cpu: Unspecified
------------------------+---------------------------------------------------
Comment (by glynn):

Replying to [ticket:682 marisn]:

> As of GRASS 6.5 it's not possible to configure and make GRASS if it's
source is located in directory containing spaces in it's path.

> Configure part is easy but other Make system parts are more tricky.

The configure script is generated from configure.in by autoconf. You can't
modify configure directly.

Beyond that, the portions of the configure script which you changed are
inserted verbatim by autoconf, so the only way to fix this is to fix
autoconf; there isn't anything that can be done within GRASS.

BTW, non-trivial patches should normally be added as attachments, rather
than inserted into the body of the message.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/682#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#682: Allow compilation in directory with spaces
------------------------+---------------------------------------------------
  Reporter: marisn | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: minor | Milestone: 6.5.0
Component: Compiling | Version: svn-develbranch6
Resolution: wontfix | Keywords:
  Platform: Linux | Cpu: Unspecified
------------------------+---------------------------------------------------
Changes (by hamish):

  * status: new => closed
  * resolution: => wontfix

Comment:

Replying to [comment:1 glynn]:
> Beyond that, the portions of the configure script which you
> changed are inserted verbatim by autoconf, so the only way to
> fix this is to fix autoconf; there isn't anything that can be
> done within GRASS.

I have now (well some weeks ago) quoted everything in configure.in and
install-sh that could be quoted, but as Glynn explains there are parts of
configure which are automatically added by autoconf, and unfortunately
those bits are not all quoted.

closing as "wontfix", even though it is more accurately "cantfix".
(without moving away from autoconf2.13, and to justify that I'd say we
need a more compelling reason than this problem)

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/682#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>