Prev: Ports in use
Next: sendmail to pipe problem
From: Jaroslav Škarvada on 16 Feb 2010 06:29 I have encountered problem with APPENDDEF, PREPENDDEF macros, when used with arguments containing commas: .... define(`confOPTIMIZE', `-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2') .... APPENDDEF(`confOPTIMIZE', `-DSM_CONF_SHM=0') .... When building with the above config, the build fails due to comma after the '-Wp'. It needs four time nested quoting in first define in order to work correctly. I am not m4 expert, but I think the APPENDDEF, PREPENDDEF macros definitions need some more quoting such as: $ diff ./devtools/M4/header.m4.orig ./devtools/M4/header.m4 35,36c35,37 < define(`APPENDDEF', `define(`$1', ifdef(`$1', `$1 $2', `$2'))') < define(`PREPENDDEF', `define(`$1', ifdef(`$1', `$2 $1', `$2'))') --- > define(`quote', `ifelse(`$#', `0', `', ``$*'')') > define(`APPENDDEF', `define(`$1', quote(ifdef(`$1', `$1 $2', `$2')))') > define(`PREPENDDEF', `define(`$1', quote(ifdef(`$1', `$2 $1', `$2')))') I am not sure for possible side effects of this particular solution (none encountered so far), but the idea behind should be clear.
|
Pages: 1 Prev: Ports in use Next: sendmail to pipe problem |