help-make
[Top][All Lists]
Advanced

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

join?


From: Michael Sterrett -Mr. Bones.-
Subject: join?
Date: Wed, 7 Mar 2001 16:43:16 -0500 (EST)

How can I produce the functionality of the perl function join() in gmake.

I have a list of directories:

    A = /usr/bin /bin

and I want this:

    A = /usr/bin:/bin

I could do this in perl:

    $A = join(':', $A);

Something like this I thought would work in gmake, but doesn't seem to:

    A := $(subst  ,:,$(A))

The info page on text functions gives an example going the other direction
for VPATH:

    $(subst :, ,$(VPATH))

but doesn't say how to do what I want.

Do I have to resort to $(shell echo $(A) | sed 's/ /:/g')?

Michael Sterrett
  -Mr. Bones.-
address@hidden




reply via email to

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