From: raster Date: Mon, 4 Apr 2011 08:30:02 +0000 (+0000) Subject: edje_cc now only will use epp. makes for consistent output on all X-Git-Tag: submit/trunk/20120815.180907~673 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78ebeb4f6841604f7ff9dc6f66e4396453e3b4b4;p=profile%2Fivi%2Fedje.git edje_cc now only will use epp. makes for consistent output on all platforms since we ship our own cpp.. err.. epp. :) git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@58315 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/bin/edje_cc_parse.c b/src/bin/edje_cc_parse.c index 19adf0a..108cf36 100644 --- a/src/bin/edje_cc_parse.c +++ b/src/bin/edje_cc_parse.c @@ -707,53 +707,18 @@ compile(void) buf2, file_in, inc, def, tmpn); ret = system(buf); } - /* - * On OpenSolaris, the default cpp is located in different places. - * Alan Coppersmith told me to do what xorg does: using /usr/ccs/lib/cpp - * - * Also, that preprocessor is not managing C++ comments, so pass the - * sun cc preprocessor just after. - */ - else if (ecore_file_exists("/usr/ccs/lib/cpp")) + else { - snprintf(buf, sizeof(buf), "/usr/ccs/lib/cpp -I%s %s %s %s", - inc, def, file_in, tmpn); - ret = system(buf); - if (ret == 0) - { - static char tmpn2[4096]; - - snprintf (tmpn2, PATH_MAX, "%s/edje_cc.edc-tmp-XXXXXX", tmp_dir); - fd = mkstemp(tmpn2); - if (fd >= 0) - { - close(fd); - snprintf (buf, 4096, "cc -E -I%s %s -o %s %s", - inc, def, tmpn2, tmpn); - ret = system(buf); - snprintf(tmpn, 4096, "%s", tmpn2); - } - } + ERR("Error. Cannot run epp: %s", buf2); + exit(-1); } - - /* Trying gcc and other syntax */ - if (ret != 0) - { - snprintf(buf, sizeof(buf), "%s -I%s %s -E -o %s -std=c99 - < %s", - getenv("CC") ? getenv("CC") : "cc", - inc, def, tmpn, file_in); - ret = system(buf); - } - /* Trying suncc syntax */ - if (ret != 0) - { - snprintf(buf, sizeof(buf), "%s -I%s %s -E -o %s -xc99 - < %s", - getenv("CC") ? getenv("CC") : "cc", - inc, def, tmpn, file_in); - ret = system(buf); - } if (ret == EXIT_SUCCESS) file_in = tmpn; + else + { + ERR("Error. Exit code of epp not clean: %i", ret); + exit(-1); + } free(def); } fd = open(file_in, O_RDONLY | O_BINARY, S_IRUSR | S_IWUSR);