[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How can I call "notdir" on a file name that contains spaces?
From: |
Paul D. Smith |
Subject: |
Re: How can I call "notdir" on a file name that contains spaces? |
Date: |
Fri, 3 Mar 2006 13:03:08 -0500 |
%% Eric Hanchrow <address@hidden> writes:
eh> At first, I thought this behavior was a bug, but then I realized
eh> that it's working exactly as specified: notdir treats its argument
eh> as a _whitespace-separated_ list of file names. That makes it
eh> difficult to deal with file names that themselves contains spaces.
eh> Is there a way to do it?
The short answer is no, there's no easy way to deal with file names
containing whitespace. This is fundamental to the definition of make,
really: make looks like it deals with files but really, internally, it
mainly deals with strings. It has to slice and dice those strings all
over the place, and it uses whitespace as a word delimiter almost
everywhere.
Changing this would be a HUGE undertaking. There is a Savannah bug on
this:
https://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=712
There have been some discussions on possible ways to resolve this
without wholesale rewriting of make internals, but so far no code has
been written.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist