add ecore versioning
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 29 May 2010 06:28:25 +0000 (06:28 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 29 May 2010 06:28:25 +0000 (06:28 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@49271 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

20 files changed:
configure.ac
src/lib/ecore/Ecore.h
src/lib/ecore/Makefile.am
src/lib/ecore/ecore.c
src/lib/ecore_cocoa/Makefile.am
src/lib/ecore_con/Makefile.am
src/lib/ecore_config/Makefile.am
src/lib/ecore_directfb/Makefile.am
src/lib/ecore_evas/Makefile.am
src/lib/ecore_fb/Makefile.am
src/lib/ecore_file/Makefile.am
src/lib/ecore_imf/Makefile.am
src/lib/ecore_imf_evas/Makefile.am
src/lib/ecore_input/Makefile.am
src/lib/ecore_input_evas/Makefile.am
src/lib/ecore_ipc/Makefile.am
src/lib/ecore_sdl/Makefile.am
src/lib/ecore_win32/Makefile.am
src/lib/ecore_wince/Makefile.am
src/lib/ecore_x/Makefile.am

index 23813d4..1d87926 100644 (file)
@@ -1,7 +1,24 @@
-# get rid of that stupid cache mechanism
-rm -f config.cache
-
-AC_INIT([ecore], [0.9.9.063], [enlightenment-devel@lists.sourceforge.net])
+##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
+##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
+m4_define([v_maj], [0])
+m4_define([v_min], [9])
+m4_define([v_mic], [9])
+m4_define([v_rev], m4_esyscmd([svnversion . | awk -F : '{printf("%s", $1);}' | tr 'A-z' ' ' | sed 's/ //g']))
+m4_ifelse(m4_len[v_rev], [0], [m4_undefine([v_rev])])
+##--   When released, remove the dnl on the below line
+dnl m4_undefine([v_rev])
+##--   When doing snapshots - change soname. remove dnl on below line
+m4_define([v_rel], [-release ver-pre-svn-05])
+##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
+m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])],
+[m4_define([v_ver], [v_maj.v_min.v_mic])])
+m4_define([lt_rev], m4_eval(v_maj + v_min))
+m4_define([lt_cur], v_mic)
+m4_define([lt_age], v_min)
+##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
+##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
+
+AC_INIT([ecore], [v_ver], [enlightenment-devel@lists.sourceforge.net])
 release="ver-pre-svn-05"
 AC_PREREQ([2.52])
 AC_CONFIG_SRCDIR([configure.ac])
@@ -20,59 +37,26 @@ AC_LIBTOOL_WIN32_DLL
 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
 AC_PROG_LIBTOOL
 
-VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
-VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
-VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
-SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
-version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
+##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
+##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
+m4_ifdef([v_rev], , [m4_define([v_rev], [0])])
+m4_ifdef([v_rel], , [m4_define([v_rel], [])])
+AC_DEFINE_UNQUOTED(VMAJ, [v_maj], [Major version])
+AC_DEFINE_UNQUOTED(VMIN, [v_min], [Minor version])
+AC_DEFINE_UNQUOTED(VMIC, [v_mic], [Micro version])
+AC_DEFINE_UNQUOTED(VREV, [v_rev], [Revison])
+version_info="lt_rev:lt_cur:lt_age"
+release_info="v_rel"
 AC_SUBST(version_info)
+AC_SUBST(release_info)
+##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
+##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
 
 AM_GNU_GETTEXT_VERSION([0.12.1])
 AM_GNU_GETTEXT([external])
 
 EFL_CHECK_PATH_MAX
 
-case "$host_os" in
-   mingw32ce* | cegcc*)
-      ;;
-   *)
-      ecore_config_release_info="-release $release"
-      ecore_con_release_info="-release $release"
-      ecore_directfb_release_info="-release $release"
-      ecore_evas_release_info="-release $release"
-      ecore_fb_release_info="-release $release"
-      ecore_file_release_info="-release $release"
-      ecore_imf_evas_release_info="-release $release"
-      ecore_imf_release_info="-release $release"
-      ecore_input_release_info="-release $release"
-      ecore_input_evas_release_info="-release $release"
-      ecore_ipc_release_info="-release $release"
-      ecore_cocoa_release_info="-release $release"
-      ecore_release_info="-release $release"
-      ecore_sdl_release_info="-release $release"
-      ecore_win32_release_info="-release $release"
-      ecore_x_release_info="-release $release"
-      ;;
-esac
-AC_SUBST(ecore_config_release_info)
-AC_SUBST(ecore_con_release_info)
-AC_SUBST(ecore_directfb_release_info)
-AC_SUBST(ecore_evas_release_info)
-AC_SUBST(ecore_fb_release_info)
-AC_SUBST(ecore_file_release_info)
-AC_SUBST(ecore_imf_evas_release_info)
-AC_SUBST(ecore_imf_release_info)
-AC_SUBST(ecore_input_release_info)
-AC_SUBST(ecore_input_evas_release_info)
-AC_SUBST(ecore_ipc_release_info)
-AC_SUBST(ecore_cocoa_release_info)
-AC_SUBST(ecore_release_info)
-AC_SUBST(ecore_sdl_release_info)
-AC_SUBST(ecore_win32_release_info)
-AC_SUBST(ecore_wince_release_info)
-AC_SUBST(ecore_x_release_info)
-
-
 with_max_log_level="<unset>"
 AC_ARG_WITH(internal-maximum-log-level,
    [AC_HELP_STRING([--with-internal-maximum-log-level=NUMBER],
index 0aac1d8..21d0d8f 100644 (file)
 # endif
 #endif /* ! _WIN32 */
 
+#define ECORE_VERSION_MAJOR 0
+#define ECORE_VERSION_MINOR 9
+
+typedef struct _Ecore_Version
+{
+   int major;
+   int minor;
+   int micro;
+   int revision;
+} Ecore_Version;
+
+EAPI extern Ecore_Version *ecore_version;
+
 /**
  * @file Ecore.h
  * @brief The file that provides the program utility, main loop and timer
index c1fb716..f852281 100644 (file)
@@ -45,6 +45,6 @@ endif
 endif
 
 libecore_la_LIBADD = @dlopen_libs@ @EINA_LIBS@ @EVIL_LIBS@ @GLIB_LIBS@ @WIN32_LIBS@ @LTLIBINTL@ @EFL_PTHREAD_LIBS@ -lm
-libecore_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_release_info@
+libecore_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
 
 EXTRA_DIST = ecore_private.h
index 8ccb8d2..290ddc4 100644 (file)
@@ -39,6 +39,9 @@
 #if HAVE_MALLINFO
 #include <malloc.h>
 
+static Ecore_Version _version = { VMAJ, VMIN, VMIC, VREV };
+EAPI Ecore_Version *ecore_version = &_version;
+
 #define KEEP_MAX(Global, Local)                        \
    if (Global < (Local))                       \
      Global = Local;
index 190d0fa..ed05cdf 100644 (file)
@@ -25,7 +25,7 @@ $(top_builddir)/src/lib/ecore_input/libecore_input.la \
 @EVAS_LIBS@ \
 @EINA_LIBS@
 
-libecore_cocoa_la_LDFLAGS = @cocoa_ldflags@ -version-info @version_info@ @ecore_cocoa_release_info@
+libecore_cocoa_la_LDFLAGS = @cocoa_ldflags@ -version-info @version_info@ @release_info@
 
 endif
 
index a4ba20b..5fe2ed2 100644 (file)
@@ -35,7 +35,7 @@ libecore_con_la_LIBADD = \
 $(top_builddir)/src/lib/ecore/libecore.la \
 @SSL_LIBS@ @CURL_LIBS@ @EINA_LIBS@ @TLS_LIBS@ @CARES_LIBS@ @WIN32_LIBS@
 
-libecore_con_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_con_release_info@
+libecore_con_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
 
 endif
 
index 9ac305f..30bbd20 100644 (file)
@@ -29,7 +29,7 @@ lib_LTLIBRARIES = libecore_config.la
 
 include_HEADERS = Ecore_Config.h
 
-libecore_config_la_LDFLAGS = -no-undefined -version-info @version_info@ @ecore_config_release_info@
+libecore_config_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@
 
 #config_DATA = $(DB)
 #configdir = $(pkgdatadir)
index d270ae2..458170a 100644 (file)
@@ -21,7 +21,7 @@ $(top_builddir)/src/lib/ecore/libecore.la \
 @DIRECTFB_LIBS@ \
 @EINA_LIBS@
 
-libecore_directfb_la_LDFLAGS = -version-info @version_info@ @ecore_directfb_release_info@
+libecore_directfb_la_LDFLAGS = -version-info @version_info@ @release_info@
 
 libecore_directfb_la_DEPENDENCIES = \
 $(top_builddir)/src/lib/ecore/libecore.la
index adabce7..65f8956 100644 (file)
@@ -116,7 +116,7 @@ $(top_builddir)/src/lib/ecore/libecore.la \
 @EINA_LIBS@ \
 @EVIL_LIBS@
 
-libecore_evas_la_LDFLAGS = @cocoa_ldflags@ -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_evas_release_info@
+libecore_evas_la_LDFLAGS = @cocoa_ldflags@ -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
 
 endif
 
index 2d82071..035d6bc 100644 (file)
@@ -26,7 +26,7 @@ libecore_fb_la_LIBADD = \
 $(top_builddir)/src/lib/ecore/libecore.la \
 @EINA_LIBS@
 
-libecore_fb_la_LDFLAGS = -version-info @version_info@ @ecore_fb_release_info@
+libecore_fb_la_LDFLAGS = -version-info @version_info@ @release_info@
 
 endif
 
index fff3591..d2b6c66 100644 (file)
@@ -36,7 +36,7 @@ $(lib_ecore_con_la) \
 @EVIL_LIBS@ \
 @EINA_LIBS@
 
-libecore_file_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_file_release_info@
+libecore_file_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
 
 endif
 
index 385ae8c..929cc41 100644 (file)
@@ -24,7 +24,7 @@ $(top_builddir)/src/lib/ecore/libecore.la \
 @EINA_LIBS@ \
 @EVIL_LIBS@
 
-libecore_imf_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_imf_release_info@
+libecore_imf_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
 endif
 
 EXTRA_DIST = ecore_imf_private.h
index 2455944..ba5b192 100644 (file)
@@ -20,5 +20,5 @@ $(top_builddir)/src/lib/ecore_imf/libecore_imf.la \
 @EVAS_LIBS@ \
 @EINA_LIBS@
 
-libecore_imf_evas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_imf_evas_release_info@
+libecore_imf_evas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
 endif
index 4a666c2..297d88f 100644 (file)
@@ -20,7 +20,7 @@ $(top_builddir)/src/lib/ecore/libecore.la \
 @EINA_LIBS@ \
 @EVIL_LIBS@
 
-libecore_input_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_input_release_info@
+libecore_input_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
 
 endif
 
index b0fe622..1e3e77f 100644 (file)
@@ -25,7 +25,7 @@ $(top_builddir)/src/lib/ecore_input/libecore_input.la \
 @EINA_LIBS@ \
 @EVIL_LIBS@
 
-libecore_input_evas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_input_evas_release_info@
+libecore_input_evas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
 
 endif
 
index 6b3f186..99dd9c1 100644 (file)
@@ -24,7 +24,7 @@ $(top_builddir)/src/lib/ecore_con/libecore_con.la \
 @SSL_LIBS@ \
 @EINA_LIBS@
 
-libecore_ipc_la_LDFLAGS = -no-undefined -version-info @version_info@ @ecore_ipc_release_info@
+libecore_ipc_la_LDFLAGS = -no-undefined -version-info @version_info@ @release_info@
 
 endif
 
index 2e434ef..a2bd2c8 100644 (file)
@@ -26,7 +26,7 @@ $(top_builddir)/src/lib/ecore/libecore.la \
 $(top_builddir)/src/lib/ecore_input/libecore_input.la \
 @SDL_LIBS@ @EVIL_LIBS@ @EINA_LIBS@
 
-libecore_sdl_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_sdl_release_info@
+libecore_sdl_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
 
 endif
 
index 015f302..5cf8bfa 100644 (file)
@@ -37,7 +37,7 @@ $(top_builddir)/src/lib/ecore_input/libecore_input.la \
 @EVAS_LIBS@ \
 @EINA_LIBS@
 
-libecore_win32_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_win32_release_info@
+libecore_win32_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
 
 endif
 
index 2ea84f6..d99b729 100644 (file)
@@ -33,7 +33,7 @@ $(top_builddir)/src/lib/ecore/libecore.la \
 @EINA_LIBS@ \
 @EVIL_LIBS@
 
-libecore_wince_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_wince_release_info@
+libecore_wince_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
 
 endif
 
index 1286b37..2cfa4aa 100644 (file)
@@ -20,7 +20,7 @@ lib_LTLIBRARIES = libecore_x.la
 libecore_x_la_SOURCES =
 
 libecore_x_la_LIBADD = $(DEP) @EINA_LIBS@
-libecore_x_la_LDFLAGS = -version-info @version_info@ @ecore_x_release_info@
+libecore_x_la_LDFLAGS = -version-info @version_info@ @release_info@
 libecore_x_la_DEPENDENCIES = $(DEP)
 
 include_HEADERS = \