From 49e54e6b7186722c95da1e959392ba50eff83f78 Mon Sep 17 00:00:00 2001 From: raster Date: Mon, 4 Apr 2011 08:30:02 +0000 Subject: [PATCH] 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: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@58315 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/bin/edje_cc_parse.c | 51 ++++++++----------------------------------------- 1 file changed, 8 insertions(+), 43 deletions(-) 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); -- 2.7.4