Summary: fix, properly expand OG_MULTIARG_ITEM indirections
authorSebastian Freundt <hroptatyr@fresse.org>
Fri, 20 Jan 2012 23:58:10 +0000 (23:58 +0000)
committerSebastian Freundt <hroptatyr@fresse.org>
Fri, 20 Jan 2012 23:58:10 +0000 (23:58 +0000)
Keywords: bldchn

This changeset expands the explanations of multiarg items in option
groups properly (again), m4_text_wrap (and AS_HELP_STRING) fail to
evaluate arguments that come from the temporary redefinition of
OG_MULTIARG_ITEM.

* m4/sxe-option-groups.m4: mimic AS_HELP_STRING in temporary expansion
  of OG_MULTIARG_ITEM

Signed-off-by: Sebastian Freundt <hroptatyr@fresse.org>
m4/sxe-option-groups.m4

index 67e960e..68dde84 100644 (file)
@@ -173,9 +173,18 @@ OG_ERROR_ADDITIONAL_VERBOSITY($1)
         popdef([og_group])
 ])
 
+dnl helper for OG_MULTIARG_HELP_STINGS
+dnl mimicking AS_HELP_STRING here
+dnl we can't use AS_HELP_STRING (or m4_text_wrap) directly because
+dnl we need $1 and $2 expanded and indirected, a bit like a lisp `
+AC_DEFUN([_OG_MULTIARG_ITEM_EXPL], [dnl
+[                          ][- $1 for $2]
+])dnl _OG_MULTIARG_ITEM_EXPL
+
 dnl automatically generated help string
 AC_DEFUN([OG_MULTIARG_HELP_STRINGS], [dnl
-       pushdef([OG_MULTIARG_ITEM], AS_HELP_STRING([], - $[1] for $[3]))
+       pushdef([OG_MULTIARG_ITEM],
+               _OG_MULTIARG_ITEM_EXPL($[1], $[3]))
        pushdef([OG_MULTIARG_MUTEX], [])
 AS_HELP_STRING([], [Explanation of the items:])
 $1