[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: concatenate words with no space
From: |
Paul Smith |
Subject: |
Re: concatenate words with no space |
Date: |
Fri, 13 Jun 2008 14:12:24 -0400 |
On Fri, 2008-06-13 at 13:14 -0400, Robert Swan wrote:
> Can anyone provide a method to concatenate a directory listing into a
> list of directory names separated only by semicolons without any
> spaces?
You need to replace the space. To do this you need to play a trick on
make since make treats whitespace as a word delimiter. However, it's
easy to do once you know the secret: hide the special character inside a
variable: make only expands things AFTER it's parsed the function.
Here's how I do it:
E := #empty variable
S := $(E) $(E)#one space
... $(subst $(S),;,$(dir $(wildcard */*.h)))