Re: Mangled argument vector choking on spaces?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David A. Wheeler wrote:
> > Sure, but this minor variation WOULD work in a makefile, and it's an easy fix:
> >   $(MAKE) SBCL='$(SBCL)'

On Wed, 31 Dec 2014 11:31:58 -0800, Paul Eggert <eggert@xxxxxxxxxxx> wrote:
> That won't work if SBCL contains single quotes, another common practice.

That's pretty rare in my experience.  In any case,
that is just the symptom of the problem.  Because there is no standard
way to distinguish spaces as argument separators vs. spaces in pathnames,
people feel free to do anything.  By defining a convention, people can use the
sequence in the ways intended, and avoid them for other reasons.

> GNU make would be just the first step.  The next step would be to get the fix 
> into POSIX and into other 'make' implementations.  This sort of thing has been 
> done before.

That certainly sounds promising.  What's the plan?  I know there was some
discussion about how to handle spaces in GNU make, but I haven't been following it closely
for a while.

> How about fixing Autoconf to create a symlink from /tmp to srcdir if srcdir 
> contains a space, and using the symlink instead?  That should work too.  Please 
> feel free to propose a patch along those lines.

That is irrelevant for my use case, if I understand you correctly.
In all the cases I'm concerned about, spaces are *NOT* in any path
inside a source directory srcdir.  So "fixing the distributed filenames"
or "creating a symlink to srcdir" does NOTHING useful for my users.

In all cases I'm concerned about, the spaces are the correct results
of system probing by "./configure"; these values are NOT in any sense within srcdir.
E.G., when installing an application that requires sbcl, the autoconf-generated
"configure.ac" needs to find where sbcl is installed.  On Windows systems
with Cygwin that value will normally be this (note the spaces):
  /cygdrive/c/Program Files/Steel Bank Common Lisp/1.2.6/sbcl
Thus, autoconf+automake might put this in the Makefile:
  SBCL = /cygdrive/c/Program Files/Steel Bank Common Lisp/1.2.6/sbcl
Similarly, autoconf+automake might decide to put this in the Makefile for EGREP:
  EGREP = /usr/bin/grep -E
The cause is that the space character has two *incompatible* meanings when autoconf
returns probe results.
These makefile values need to be used during build, and often end up getting
stored in generated executables that are then shared across the system.
Creating a symlink from /tmp to srcdir does nothing useful in these cases.

--- David A. Wheeler

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux