summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Burgmeier <armin@openismus.com>2007-10-12 19:56:35 +0000
committerArmin Burgmeier <arminb@src.gnome.org>2007-10-12 19:56:35 +0000
commit861e209d36f2afc48b3773338d72f9b35d3c1f4f (patch)
tree263c6a3c30433c2e75cbedff0885224f5b7ee1cd
parentdf43547c1f3e49fcfec3a0ce0bbf8ff6e45d5ace (diff)
downloadglibmm-861e209d36f2afc48b3773338d72f9b35d3c1f4f.tar.gz
Added a new section called SECTION_HEADER_FIRST that within the header
2007-10-12 Armin Burgmeier <armin@openismus.com> * tools/m4/base.m4: Added a new section called SECTION_HEADER_FIRST that within the header file that is before any generated code (apart from the include guards) and a _CONFIGINCLUDE macro that includes a file within this section. This is intended to be used with g*mmconfig.h so the *_DISABLE_DEPRECATED define is set for deprecated classes also when included from other code. svn path=/branches/glibmm-2-12/; revision=453
-rw-r--r--ChangeLog9
-rw-r--r--tools/m4/base.m411
2 files changed, 20 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2adb4316..f84e5449 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-10-12 Armin Burgmeier <armin@openismus.com>
+
+ * tools/m4/base.m4: Added a new section called SECTION_HEADER_FIRST
+ that within the header file that is before any generated code (apart
+ from the include guards) and a _CONFIGINCLUDE macro that includes a
+ file within this section. This is intended to be used with
+ g*mmconfig.h so the *_DISABLE_DEPRECATED define is set for deprecated
+ classes also when included from other code.
+
2.12.10:
2007-06-10 Kalle Vahlman <zuh@iki.fi>
diff --git a/tools/m4/base.m4 b/tools/m4/base.m4
index 2c18bc50..3ae2c2a7 100644
--- a/tools/m4/base.m4
+++ b/tools/m4/base.m4
@@ -152,6 +152,7 @@ dnl
dnl ----------------------- Main Headers -------------------------
dnl
+_NEW_SECTION(SECTION_HEADER_FIRST)dnl Before any generated code
_NEW_SECTION(SECTION_HEADER1) dnl header up to the first namespace
_NEW_SECTION(SECTION_HEADER2) dnl header after the first namespace
_NEW_SECTION(SECTION_HEADER3) dnl header after the first namespace
@@ -208,6 +209,14 @@ _PUSH(SECTION_CHECK)
_POP()
')
+dnl This macro is for including the config header before any code (such as
+dnl the #ifndef *_DISABLE_DEPRECATED in deprecated classes) is generated.
+define(`_CONFIGINCLUDE',`dnl
+_PUSH(SECTION_HEADER_FIRST)
+#include <$1>
+_POP()
+')
+
dnl Start of processing
dnl
dnl _START(filname, module,modulecanonical) .e.g _START(button, gtkmm, gtkmm)
@@ -257,6 +266,8 @@ m4_divert(0)dnl
#ifndef __HEADER_GUARD__`'_H
#define __HEADER_GUARD__`'_H
+_IMPORT(SECTION_HEADER_FIRST)
+
_DEPRECATE_IFDEF_CLASS_START
m4_ifelse(__MODULE__,glibmm,,`dnl else