anjuta r4116 - in trunk: . libanjuta



Author: naba
Date: Mon Aug  4 21:20:47 2008
New Revision: 4116
URL: http://svn.gnome.org/viewvc/anjuta?rev=4116&view=rev

Log:
	* configure.in:
	* libanjuta/anjuta-version.h.in:
	Add header file to expose versioning information.


Added:
   trunk/libanjuta/anjuta-version.h.in
Modified:
   trunk/ChangeLog
   trunk/configure.in
   trunk/libanjuta/libanjuta.h

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Mon Aug  4 21:20:47 2008
@@ -1043,6 +1043,7 @@
 global-tags/Makefile
 libanjuta/Makefile
 libanjuta/libanjuta-1.0.pc
+libanjuta/anjuta-version.h
 libanjuta/interfaces/Makefile
 src/Makefile
 pixmaps/Makefile

Added: trunk/libanjuta/anjuta-version.h.in
==============================================================================
--- (empty file)
+++ trunk/libanjuta/anjuta-version.h.in	Mon Aug  4 21:20:47 2008
@@ -0,0 +1,92 @@
+/* anjuta-version.h - Anjuta versioning information
+ * 
+ * Based on json-version from json-glib
+ * Authored by Emmanuele Bassi <ebassi o-hand com>
+ * Adapted for Anjuta by Rob Bradford <rob o-hand com>
+ * Copyright (C) 2007  OpenedHand Ltd.
+ *
+ * You may redistribute it and/or modify it under the terms of the
+ * GNU General Public License, as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ * 
+ * anjuta is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ * 
+ */
+
+#ifndef _ANJUTA_VERSION_H_
+#define _ANJUTA_VERSION_H_
+
+/**
+ * SECTION:anjuta-version
+ * @short_description: Anjuta version checking
+ *
+ * Anjuta provides macros to check the version of the library
+ * at compile-time
+ */
+
+/**
+ * ANJUTA_MAJOR_VERSION:
+ *
+ * Anjuta major version component (e.g. 1 if %ANJUTA_VERSION is 1.2.3)
+ */
+#define ANJUTA_MAJOR_VERSION			(@ANJUTA_MAJOR_VERSION@)
+
+/**
+ * ANJUTA_MINOR_VERSION:
+ *
+ * Anjuta minor version component (e.g. 2 if %ANJUTA_VERSION is 1.2.3)
+ */
+#define ANJUTA_MINOR_VERSION			(@ANJUTA_MINOR_VERSION@)
+
+/**
+ * ANJUTA_MICRO_VERSION:
+ *
+ * Anjuta micro version component (e.g. 3 if %ANJUTA_VERSION is 1.2.3)
+ */
+#define ANJUTA_MICRO_VERSION			(@ANJUTA_MICRO_VERSION@)
+
+/**
+ * ANJUTA_VERSION
+ *
+ * Anjuta version.
+ */
+#define ANJUTA_VERSION					(@ANJUTA_VERSION@)
+
+/**
+ * ANJUTA_VERSION_S:
+ *
+ * Anjuta version, encoded as a string, useful for printing and
+ * concatenation.
+ */
+#define ANJUTA_VERSION_S				"@ANJUTA_VERSION@"
+
+/**
+ * ANJUTA_VERSION_HEX:
+ *
+ * Anjuta version, encoded as an hexadecimal number, useful for
+ * integer comparisons.
+ */
+#define ANJUTA_VERSION_HEX				(ANJUTA_MAJOR_VERSION << 24 | \
+										 ANJUTA_MINOR_VERSION << 16 | \
+										 ANJUTA_MICRO_VERSION << 8)
+
+/**
+ * ANJUTA_CHECK_VERSION:
+ * @major: required major version
+ * @minor: required minor version
+ * @micro: required micro version
+ *
+ * Compile-time version checking. Evaluates to %TRUE if the version
+ * of Anjuta is greater than the required one.
+ */
+#define ANJUTA_CHECK_VERSION(major,minor,micro)		\
+		(ANJUTA_MAJOR_VERSION > (major) || 										\
+		(ANJUTA_MAJOR_VERSION == (major) && ANJUTA_MINOR_VERSION > (minor)) ||	\
+		(ANJUTA_MAJOR_VERSION == (major) && ANJUTA_MINOR_VERSION == (minor) &&	\
+		 ANJUTA_MICRO_VERSION >= (micro)))
+
+#endif /* _ANJUTA_VERSION_H_ */

Modified: trunk/libanjuta/libanjuta.h
==============================================================================
--- trunk/libanjuta/libanjuta.h	(original)
+++ trunk/libanjuta/libanjuta.h	Mon Aug  4 21:20:47 2008
@@ -43,6 +43,7 @@
 #include <libanjuta/anjuta-status.h>
 #include <libanjuta/anjuta-ui.h>
 #include <libanjuta/anjuta-utils.h>
+#include <libanjuta/anjuta-version.h>
 #include <libanjuta/resources.h>
 #include <libanjuta/anjuta-vcs-status-tree-view.h>
 #include <libanjuta/anjuta-command.h>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]