edje_cc_parse: Compile EDC file whose path contains space character. 71/111371/2
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Mon, 2 Jan 2017 10:25:45 +0000 (19:25 +0900)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Mon, 23 Jan 2017 02:21:42 +0000 (18:21 -0800)
Previously, edje_cc could not compile EDC file whose path contains space
character since edje_cc interpreted the EDC file as separate 2 inputs.
(i.e. "input file.edc" was interpreted as "input" and "file.edc")

This patch enables edje_cc to interpret above case correctly.

This patch also contains the following patch in upstream.
8cf38539a167ee9919f093708fd6f8b52b8b5911
(edje_cc_parse: Fix not to convert macros to a single string)

Change-Id: I5b800ccf166ef4df5d189ad60b52a7b5a0a89c7c

src/bin/edje/edje_cc_parse.c

index 1d3d4d6..5749e4f 100644 (file)
@@ -990,19 +990,22 @@ compile(void)
         if (ecore_file_exists(buf2))
           {
              if (depfile)
-               snprintf(buf, sizeof(buf), "%s -MMD %s -MT %s %s -I%s %s -o %s"
+               snprintf(buf, sizeof(buf), "%s -MMD \"%s\" -MT \"%s\" \"%s\""
+                        " -I\"%s\" %s -o \"%s\""
                         " -DEFL_VERSION_MAJOR=%d -DEFL_VERSION_MINOR=%d",
                         buf2, depfile, file_out, file_in,
                         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"
+               snprintf(buf, sizeof(buf), "%s -annotate -a \"%s\" \"%s\""
+                        " -I\"%s\" %s -o \"%s\""
                         " -DEFL_VERSION_MAJOR=%d -DEFL_VERSION_MINOR=%d",
                         buf2, watchfile ? watchfile : "/dev/null", file_in,
                         inc, def, clean_file,
                         EINA_VERSION_MAJOR, EINA_VERSION_MINOR);
              else
-               snprintf(buf, sizeof(buf), "%s -a %s %s -I%s %s -o %s"
+               snprintf(buf, sizeof(buf), "%s -a \"%s\" \"%s\" -I\"%s\" %s"
+                        " -o \"%s\""
                         " -DEFL_VERSION_MAJOR=%d -DEFL_VERSION_MINOR=%d",
                         buf2, watchfile ? watchfile : "/dev/null", file_in,
                         inc, def, clean_file,