Discussion:
how to escape commas in m4?
(too old to reply)
Fletcher Mattox
2005-07-28 17:05:31 UTC
Permalink
If Iinclude these lines in site.config.m4:

APPENDDEF(`confLDOPTS', `-Wl,-rpath /lusr/opt/sasl-1.5.28/lib')
APPENDDEF(`confLDOPTS', `-L/lusr/lib')

m4 complains:

Warning: Excess arguments to built-in `define' ignored

and generats a Makefile line like this:

LDOPTS= -Wl -L/lusr/lib

i.e., it treats the comma in -Wl,-rpath as a parameter separator and
truncates everything after it. How do I make this work?

Thanks
Fletcher
Claus Aßmann
2005-07-28 18:29:36 UTC
Permalink
Post by Fletcher Mattox
i.e., it treats the comma in -Wl,-rpath as a parameter separator and
truncates everything after it. How do I make this work?
cf/README:

Remember that these options are M4 variables, and hence may need to
be quoted. In particular, arguments with commas will usually have to
be ``double quoted, like this phrase'' to avoid having the comma
confuse things. This is common for alias file definitions and for
the read timeout.
--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting my time.
Loading...