help-make
[Top][All Lists]
Advanced

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

Re: whitespace in filenames


From: Louis-David Mitterrand
Subject: Re: whitespace in filenames
Date: Wed, 24 Sep 2008 22:37:37 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Sorry my spam filter rejected your reply. The IP range you are in 
probably sent us a flurry of spams in the past. Then again, there was no 
need to CC me on the list reply, which I didn't get by the way 
(apparently this list software avoids sending CC'ed posts).

On Wed, Sep 24, 2008 at 10:58:05AM -0700, Brian Dessent wrote:
> Louis-David Mitterrand wrote:
> 
> > I've got these rules to transcode my .flac music files to .mp3:
> >
> >         FLACS := $(shell find ./flac -name "*.flac" -print)
> >
> >         MP3 := $(patsubst ./flac/%.flac,./mp3/%.mp3,$(FLACS))
> 
> Why do you even need these two lines?  They seem extraneous, as you
> never use the resulting variables.

Actually this line was missing from my post:

        all: $(MP3) 

So I only have to type 'make' to encode/update my .flac collection.

> The problem is that all of the built-in make functions treat variables
> containing lists of items as "words separated by spaces" and there is no
> way to change that with quoting.  So if you want to use built-in
> functions like patsubst and so on that act on variables containing lists
> of things, prepare for it to not work when an item in the list contains
> spaces.
> 
> If you avoid the built-in functions then you might be able to get by
> with just proper shell quoting alone.

OK, this makes sense now. Is the culprit 'shell' or 'patsubst' or both?

Thanks for your clear explanation,




reply via email to

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