Fix corner cases in AS_LITERAL_IF and AS_TR_SH.
commit81c80d1bf6c8ddf732d0b89f6fc5e306dac9705e
authorEric Blake <ebb9@byu.net>
Wed, 28 Oct 2009 21:58:43 +0000 (28 15:58 -0600)
committerEric Blake <ebb9@byu.net>
Thu, 29 Oct 2009 01:54:08 +0000 (28 19:54 -0600)
treeeb3f4d0f9d4600c49d6f4fef246b03d4ec2a5bf7
parentcff1fccb6e80125166972354f1e3e8c59703c374
Fix corner cases in AS_LITERAL_IF and AS_TR_SH.

* lib/m4sugar/m4sh.m4 (AS_LITERAL_IF): Fix bug with unbalanced
parens.  Move guts...
(_AS_LITERAL_IF): into new helper.
(AS_TR_SH, AS_TR_CPP): Fix bugs with expansion of wrong macro.
Move guts...
(_AS_TR_SH, _AS_TR_SH_LITERAL, _AS_TR_SH_INDIR, _AS_TR_CPP)
(_AS_TR_CPP_LITERAL, _AS_TR_CPP_INDIR): ...into new helpers.
(AS_VAR_PUSHDEF): Hoist m4_require, by moving guts...
(_AS_VAR_PUSHDEF): ...into new helper.
* tests/m4sh.at (AS@&t@_LITERAL_IF): Enhance test.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/m4sugar/m4sh.m4
tests/m4sh.at