efl+edje: add EFL_VERSION_1_18 define for detecting 1.18 feature support
authorMike Blumenkrantz <zmike@osg.samsung.com>
Mon, 29 Feb 2016 12:30:31 +0000 (07:30 -0500)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Mon, 29 Feb 2016 12:32:42 +0000 (07:32 -0500)
this define means that any 1.18 feature can now be detected by testing for
the presence of this define, even before the release has gone out

for future (non-bugfix) releases, further defines should be created in addition
to this one in order to provide detection for features in each version

src/bin/edje/edje_cc_parse.c
src/lib/efl/Efl.h

index c7ea53a..31eab32 100644 (file)
@@ -2,6 +2,7 @@
 # include <config.h>
 #endif
 
+
 #include <string.h>
 #include <ctype.h>
 #include <limits.h>
 # define EPP_EXT
 #endif
 
+#define EDJE_1_18_SUPPORTED " -DEFL_VERSION_1_18=1 "
+
+#define EDJE_CC_EFL_VERSION_SUPPORTED \
+  EDJE_1_18_SUPPORTED
+
 static void  new_object(void);
 static void  new_statement(void);
 static char *perform_math (char *input);
@@ -981,19 +987,22 @@ compile(void)
              inc = ecore_file_dir_get(file_in);
              if (depfile)
                snprintf(buf, sizeof(buf), "%s -MMD %s -MT %s %s -I%s %s -o %s"
-                        " -DEFL_VERSION_MAJOR=%d -DEFL_VERSION_MINOR=%d",
+                        " -DEFL_VERSION_MAJOR=%d -DEFL_VERSION_MINOR=%d"
+                        EDJE_CC_EFL_VERSION_SUPPORTED,
                         buf2, depfile, file_out, file_in,
                         inc ? inc : "./", def, clean_file,
                         EINA_VERSION_MAJOR, EINA_VERSION_MINOR);
              else if (annotate)
                snprintf(buf, sizeof(buf), "%s -annotate -a %s %s -I%s %s -o %s"
-                        " -DEFL_VERSION_MAJOR=%d -DEFL_VERSION_MINOR=%d",
+                        " -DEFL_VERSION_MAJOR=%d -DEFL_VERSION_MINOR=%d"
+                        EDJE_CC_EFL_VERSION_SUPPORTED,
                         buf2, watchfile ? watchfile : "/dev/null", file_in,
                         inc ? inc : "./", def, clean_file,
                         EINA_VERSION_MAJOR, EINA_VERSION_MINOR);
              else
                snprintf(buf, sizeof(buf), "%s -a %s %s -I%s %s -o %s"
-                        " -DEFL_VERSION_MAJOR=%d -DEFL_VERSION_MINOR=%d",
+                        " -DEFL_VERSION_MAJOR=%d -DEFL_VERSION_MINOR=%d"
+                        EDJE_CC_EFL_VERSION_SUPPORTED,
                         buf2, watchfile ? watchfile : "/dev/null", file_in,
                         inc ? inc : "./", def, clean_file,
                         EINA_VERSION_MAJOR, EINA_VERSION_MINOR);
index 7f853f9..82352fd 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
 # endif
 #endif /* ! _WIN32 */
 
-
+#define EFL_VERSION_1_18 1
 
 /**
  * @ingroup Efl