VIM: configure script sed and escapes (yikes help please)

25 views
Skip to first unread message

Bovy, Stephen

unread,
May 3, 2012, 2:37:37 PM5/3/12
to vim...@googlegroups.com, MVS OpenEdition (MVS-OE@vm.marist.edu)
I am trying to add the following to the configure script >>

if test "$zOSUnix" = "yes"; then
CFLAGS=`$as_echo "$CFLAGS" | sed 's/(/\\(/g;s/)/\\)/g'`
# CFLAGS="-D_ALL_SOURCE -Wc,float\(IEEE\),dll"
fi

And it does not seem to be working

The resulting config.mk has the following >>

CFLAGS = -O -D_ALL_SOURCE -Wc,float(IEEE),haltonmsg(3296) -W c,dll

>>>>

On the shell command line the following works great >>

echo "()" | sed 's/(/\\(/g;s/)/\\)/g'

I am not a unix guru, what am I missing ??

John Little

unread,
May 3, 2012, 9:35:31 PM5/3/12
to vim...@googlegroups.com, MVS OpenEdition (MVS-OE@vm.marist.edu)
On Friday, May 4, 2012 6:37:37 AM UTC+12, Bovy, Stephen wrote:

> I am not a unix guru, what am I missing ??

Four more backslashes.

CFLAGS=`$as_echo "$CFLAGS" | sed 's/(/\\\\(/g;s/)/\\\\)/g'`

Regards, John

Bovy, Stephen

unread,
May 4, 2012, 1:11:15 AM5/4/12
to vim...@googlegroups.com, MVS OpenEdition (MVS-OE@vm.marist.edu)
Thanks John

That did the trick

>> CFLAGS = -O -D_ALL_SOURCE -Wc,float\(IEEE\),haltonmsg\(3296\) -W c,dll <<

But this is not the optimum solution , because I added { haltonmsg\(3296\) } to get the configure script to work better,

But we do not want { haltonmsg\(3296\) } to go into config.mk

There fore the following seems to be the only acceptable "simple" solution >>>>

if test "$zOSUnix" = "yes"; then
# CFLAGS=`$as_echo "$CFLAGS" | sed 's/(/\\\\(/g;s/)/\\\\)/g'`
CFLAGS="-D_ALL_SOURCE -Wc,float\(IEEE\),dll"
fi

ac_config_files="$ac_config_files auto/config.mk:config.mk.in"
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply all
Reply to author
Forward
0 new messages