[mm-common] Add implicit pre-initialization to mm-module
- From: Daniel Elstner <daniel src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [mm-common] Add implicit pre-initialization to mm-module
- Date: Sun, 9 Aug 2009 15:12:36 +0000 (UTC)
commit 18f602f49ddc14f3e4452dedd62b69c5d958881d
Author: Daniel Elstner <daniel kitta gmail com>
Date: Sun Aug 9 16:13:15 2009 +0200
Add implicit pre-initialization to mm-module
* macros/mm-module.m4 (_MM_PRE_INIT): New private pre-initialization
macro. For now, it does not do much except for installing a forbidden
token pattern in order to catch unexpanded MM_ macros.
(MM_INIT_MODULE): Invoke _MM_PRE_INIT through AC_REQUIRE().
macros/mm-module.m4 | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/macros/mm-module.m4 b/macros/mm-module.m4
index bbbf531..014cad5 100644
--- a/macros/mm-module.m4
+++ b/macros/mm-module.m4
@@ -15,7 +15,15 @@
## You should have received a copy of the GNU General Public License
## along with mm-common. If not, see <http://www.gnu.org/licenses/>.
-#serial 20090806
+#serial 20090809
+
+## _MM_PRE_INIT
+##
+## Private pre-initialization macro for use with AC_REQUIRE(). For now,
+## all it does is register a forbidden token pattern with autom4te, so
+## that unexpanded macro calls in the output can be caught.
+##
+AC_DEFUN([_MM_PRE_INIT], [m4_pattern_forbid([^_?MM_])])
## _MM_INIT_MODULE_VERSION(basename, BASENAME, [major], [minor], [micro])
##
@@ -62,6 +70,7 @@ m4_define([_MM_INIT_MODULE_BASENAME],
AC_DEFUN([MM_INIT_MODULE],
[dnl
m4_assert([$# >= 2])[]dnl
+AC_REQUIRE([_MM_PRE_INIT])[]dnl
_MM_INIT_MODULE_BASENAME([$1], [$2],
m4_quote(m4_bpatsubst([$1], [-[.0123456789]+$])),
m4_quote(m4_bregexp([$1], [-\([.0123456789]+\)$], [\1])))[]dnl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]