help-make
[Top][All Lists]
Advanced

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

Re: whitespace in filenames


From: Brian Dessent
Subject: Re: whitespace in filenames
Date: Wed, 24 Sep 2008 09:09:27 -0700

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.

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.

Brian




reply via email to

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