From 4dfaf5729ee5da36b240665674201509ac32b1f3 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Fri, 2 Nov 2018 12:38:02 +0100 Subject: [PATCH] codegen: ensure we include the filename and not the path this mirrors the behaviour of eolian & eolian_cxx. Usally a generator just generates the files side by side, the directory then needs to be included anyways. thus adding the include with another subdirectory is unusal. Differential Revision: https://phab.enlightenment.org/D7235 --- src/bin/edje/edje_codegen.c | 3 ++- src/bin/elementary/elementary_codegen.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bin/edje/edje_codegen.c b/src/bin/edje/edje_codegen.c index cbca138429..f55c8f9a78 100644 --- a/src/bin/edje/edje_codegen.c +++ b/src/bin/edje/edje_codegen.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "Edje.h" #define EDJE_EDIT_IS_UNSTABLE_AND_I_KNOW_ABOUT_IT 1 @@ -432,7 +433,7 @@ _write_headers(const char *filename) free(str); - snprintf(buf, sizeof(buf), C_HEADER, filename); + snprintf(buf, sizeof(buf), C_HEADER, ecore_file_file_get(filename)); if (fwrite(buf, strlen(buf), 1, source_fd) != 1) return EINA_FALSE; diff --git a/src/bin/elementary/elementary_codegen.c b/src/bin/elementary/elementary_codegen.c index e9cc685b66..2f8324f448 100644 --- a/src/bin/elementary/elementary_codegen.c +++ b/src/bin/elementary/elementary_codegen.c @@ -3,6 +3,7 @@ #endif #include +#include #include #include #include @@ -344,7 +345,7 @@ _headers_write(const char *filename) free(str); - snprintf(buf, sizeof(buf), C_HEADER, filename); + snprintf(buf, sizeof(buf), C_HEADER, ecore_file_file_get(filename)); if (fwrite(buf, strlen(buf), 1, source_fd) != 1) return EINA_FALSE;