[Top][All Lists]

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

Using "m4_bpatsubst/patsubst" to remove a string from a variable

From: Manuel Bachmann
Subject: Using "m4_bpatsubst/patsubst" to remove a string from a variable
Date: Mon, 6 Jun 2016 11:17:11 +0200

Hi folks,

I am trying to use the "m4_bpatsubst" and/or "patsubst" macros (which I
found documented here : [1] [2]), to remove a string from a variable in my "" ; and pass it to "", so it ends up in final

I was able to get some kind of output, with this in "" :

VAR="text1 text2"
VAR2=m4_bpatsubst("$VAR", "text1")

with the hope of obtaining "VAR2="text2"", but when running "autoreconf
--install; ./configure", and opening "Makefile", the final variable is
still :
VAR2="text1 text2"
no text was removed...

I've also tried only syntaxes, such as :
VAR2=m4_bpatsubst([VAR], [text1])
or :
AC_DEFINE(VAR2, m4_bpatsubst([VAR], [text1])
but they all issue errors or the resulting "VAR2" is empty.

Any ideas on this ?

[1] :
[2] :


*Manuel Bachmann, Graphics & Multimedia Engineer
<> *

reply via email to

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