Add #ifndef to prevent double inclusion of generated header
[platform/core/uifw/at-spi2-atk.git] / tools / c-constants-generator.xsl
index 992de8f..bbcd8cf 100644 (file)
@@ -89,7 +89,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
     <xsl:variable name="suffix">
       <xsl:choose>
         <xsl:when test="ancestor::interface">
-          <xsl:value-of select="concat(str:replace(ancestor::interface/@name, 'org.freedesktop.accessibility.', ''), '_', @suffix)"/>
+          <xsl:value-of select="concat(str:replace(ancestor::interface/@name, 'org.freedesktop.atspi.', ''), '_', @suffix)"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:value-of select="@suffix"/>
@@ -116,7 +116,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
     <xsl:variable name="name">
       <xsl:choose>
         <xsl:when test="ancestor::interface">
-          <xsl:value-of select="concat(str:replace(ancestor::interface/@name, 'org.freedesktop.accessibility.', ''), '_', @name)"/>
+          <xsl:value-of select="concat(str:replace(ancestor::interface/@name, 'org.freedesktop.atspi.', ''), '_', @name)"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:value-of select="@name"/>
@@ -222,7 +222,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
     <xsl:variable name="suffix">
       <xsl:choose>
         <xsl:when test="ancestor::interface">
-          <xsl:value-of select="concat(str:replace(ancestor::interface/@name, 'org.freedesktop.accessibility.', ''), '_', @suffix)"/>
+          <xsl:value-of select="concat(str:replace(ancestor::interface/@name, 'org.freedesktop.atspi.', ''), '_', @suffix)"/>
         </xsl:when>
         <xsl:otherwise>
           <xsl:value-of select="@suffix"/>
@@ -289,6 +289,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
     <xsl:text>&#10;</xsl:text>
     <xsl:text> */&#10;</xsl:text>
     <xsl:text>&#10;</xsl:text>
+    <xsl:text>#ifndef _ACCESSIBILITY_H_&#10;</xsl:text>
+    <xsl:text>#define _ACCESSIBILITY_H_&#10;</xsl:text>
     <xsl:text>#ifdef __cplusplus&#10;</xsl:text>
     <xsl:text>extern "C" {&#10;</xsl:text>
     <xsl:text>#endif&#10;</xsl:text>
@@ -298,6 +300,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
     <xsl:text>#ifdef __cplusplus&#10;</xsl:text>
     <xsl:text>}&#10;</xsl:text>
     <xsl:text>#endif&#10;</xsl:text>
+    <xsl:text>#endif&#10;</xsl:text>
   </xsl:template>
 
 </xsl:stylesheet>