From 9d89abb915b700c4ee1479256630e620a662a1a7 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler 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. :) SVN revision: 58315 --- legacy/edje/src/bin/edje_cc_parse.c | 51 +++++------------------------ 1 file changed, 8 insertions(+), 43 deletions(-) diff --git a/legacy/edje/src/bin/edje_cc_parse.c b/legacy/edje/src/bin/edje_cc_parse.c index 19adf0a4c7..108cf364b9 100644 --- a/legacy/edje/src/bin/edje_cc_parse.c +++ b/legacy/edje/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);