List Info

Thread: spaces...




spaces...
country flaguser name
France
2008-03-29 14:54:36
hello,
I would like to test if a library file exist. To make this,
I have used the function "wildcard" who return me
nothing if the file doesn't exist.
My problem is when the full path of the file contain a
space. In this case, the function wildcard test separately
the different parts around the space and so see nothing...
To manipulate a list of files with spaces I have replace the
spaces by a pattern and the others spaces are only to
separate the elements of the list. So my question is : Can I
use a specific pattern to replace the space who will be
recognize by the function wildcard as a space in my file
name (and not as a space-separation of the list) ? (like
" " or "%SPACE%", etc.)
Or what other solution is possible to test if a file (with
spaces in his name) exist ?
I use my makefile on Linux, Mac and Windows (and a stup**
man has called the main directory "Program
Files").
Best regards,
Fabien

NB: sorry for my English, I hope you can understand me...


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make

Re: spaces...
country flaguser name
France
2008-03-30 05:46:53
Hi,

> I would like to test if a library file exist. To make
this, I have used the
> function "wildcard" who return me nothing if
the file doesn't exist. My
> problem is when the full path of the file contain a
space. In this case,
> the function wildcard test separately the different
parts around the space
> and so see nothing... To manipulate a list of files
with spaces I have
> replace the spaces by a pattern and the others spaces
are only to separate
> the elements of the list. So my question is : Can I use
a specific pattern
> to replace the space who will be recognize by the
function wildcard as a
> space in my file name (and not as a space-separation of
the list) ? (like
> " " or "%SPACE%", etc.) Or what
other solution is possible to test if a
> file (with spaces in his name) exist ? I use my
makefile on Linux, Mac and
> Windows (and a stup** man has called the main directory
"Program Files").
> Best regards,
> Fabien

afaik make doesn't like spaces in filenames and their use is
strongly 
discouraged. I think there are some tricks to handle them
but it'll soon 
become a nightmare to maintain (I've read something about
that, probably in 
the info page, but can't find it now). So if possible I'd
rather suggest to 
modify your project and just avoid them.

-- 
Cédric Lucantis


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make

Re: spaces...
country flaguser name
United States
2008-03-30 10:08:26
> From: omer <omerno-log.org>
> Date: Sun, 30 Mar 2008 12:46:53 +0200
> 
> Hi,
> 
> > I would like to test if a library file exist. To
make this, I have used the
> > function "wildcard" who return me
nothing if the file doesn't exist. My
> > problem is when the full path of the file contain
a space. In this case,
> > the function wildcard test separately the
different parts around the space
> > and so see nothing... To manipulate a list of
files with spaces I have
> > replace the spaces by a pattern and the others
spaces are only to separate
> > the elements of the list. So my question is : Can
I use a specific pattern
> > to replace the space who will be recognize by the
function wildcard as a
> > space in my file name (and not as a
space-separation of the list) ? (like
> > " " or "%SPACE%", etc.) Or
what other solution is possible to test if a
> > file (with spaces in his name) exist ? I use my
makefile on Linux, Mac and
> > Windows (and a stup** man has called the main
directory "Program Files").
> > Best regards,
> > Fabien
> 
> afaik make doesn't like spaces in filenames and their
use is strongly 
> discouraged. I think there are some tricks to handle
them but it'll soon 
> become a nightmare to maintain (I've read something
about that, probably in 
> the info page, but can't find it now). So if possible
I'd rather suggest to 
> modify your project and just avoid them.
> 

One trick is to use the short 8+3 alias of the long file
name.  For
example, the short alias of "Program Files" is
"PROGRA~1" on most
machines (use "dir /x" to show the actual short
alias on your system).


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )