make-w32
[Top][All Lists]
Advanced

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

Re: Environment variables in makefiles with DOS


From: grischka
Subject: Re: Environment variables in makefiles with DOS
Date: Mon, 21 May 2007 01:51:31 +0200

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.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]