Paul Smith wrote:

> How can you determine what's a filename or not in a command 
> script,  or in a make function?

Well I vaguely remember things like that were actually discussed 
with gmake around it's 3.8x times. 

IIRC, it was when for example:

a\ b :
    ls -o $@

gave you something like this:

$ make-3.81
ls -o a b
ls: a: No such file or directory
ls: b: No such file or directory

Interesting, anyway. At some point it was solved together with a 
couple of similar problems also. Just for reference, this is how 
it works now (since ages):

a\ b :
    ls -o $@

$ make-4.2
ls -o a\ b
-rw-r--r--  1 Administ  6 May 20 15:45 a b

Same theme, slight variation:

"a b" : 
    ls -o $@

$ make-4.2
ls -o "a b"
-rw-r--r--  1 Administ  6 May 20 15:45 a b

Both in combination:

all: 
    ls -o $(addprefix "the dir/",the\ file) 

$ make-4.2
ls -o "the dir/"the\ file
-rw-r--r--  1 Administ  6 May 20 15:02 the dir/the file

I seem to recall people actually had some pains first, however
eventually it settled down along the lines "What you write is 
what you get." Well, what else anyway.

Be welcome to ask if you have questions on details.




_______________________________________________
Make-w32 mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/make-w32

Reply via email to