Subject: Re: make: removing/replace spaces in expansion?
To: Simon Gerraty <sjg@juniper.net>
From: Todd Vierling <tv@wasabisystems.com>
List: tech-toolchain
Date: 05/21/2002 16:04:38
On Mon, 20 May 2002, Simon Gerraty wrote:
: LIST=one two
: LIST+= three
:
: how does one output one,two,three or one|two|three
: since make insists on separating the words with space.
You don't, in make(1)? (This is pretty long standing `tradition'.)
: I suspect the solution is to provide a modifier that defines the
: separator to use, or a modifier that allows one to a regexp
: substitution on the expanded buffer.
To keep from doing something really drastic (such as warping C/// or S/// to
work on the whole string 8-), I'd suggest a "join" operator -- such that
doing something like ${VAR:J,} would replace the separator with a ",".
(A "split" operator is not necessary; this can be done with S///.)
--
-- Todd Vierling <tv@wasabisystems.com> * Wasabi & NetBSD: Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/