summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2018-11-02 12:38:02 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-11-02 12:43:26 +0100
commit4dfaf5729ee5da36b240665674201509ac32b1f3 (patch)
treebb8b345370eb9db4d27bf78e844bc7a6a4204851
parent79a5ff6e1e393b46b91afcf5b63f955c7dae5aae (diff)
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
-rw-r--r--src/bin/edje/edje_codegen.c3
-rw-r--r--src/bin/elementary/elementary_codegen.c3
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 @@
13#include <Ecore.h> 13#include <Ecore.h>
14#include <Ecore_Getopt.h> 14#include <Ecore_Getopt.h>
15#include <Ecore_Evas.h> 15#include <Ecore_Evas.h>
16#include <Ecore_File.h>
16 17
17#include "Edje.h" 18#include "Edje.h"
18#define EDJE_EDIT_IS_UNSTABLE_AND_I_KNOW_ABOUT_IT 1 19#define EDJE_EDIT_IS_UNSTABLE_AND_I_KNOW_ABOUT_IT 1
@@ -432,7 +433,7 @@ _write_headers(const char *filename)
432 433
433 free(str); 434 free(str);
434 435
435 snprintf(buf, sizeof(buf), C_HEADER, filename); 436 snprintf(buf, sizeof(buf), C_HEADER, ecore_file_file_get(filename));
436 if (fwrite(buf, strlen(buf), 1, source_fd) != 1) 437 if (fwrite(buf, strlen(buf), 1, source_fd) != 1)
437 return EINA_FALSE; 438 return EINA_FALSE;
438 439
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 @@
3#endif 3#endif
4 4
5#include <Ecore.h> 5#include <Ecore.h>
6#include <Ecore_File.h>
6#include <Ecore_Evas.h> 7#include <Ecore_Evas.h>
7#include <Ecore_Getopt.h> 8#include <Ecore_Getopt.h>
8#include <Edje.h> 9#include <Edje.h>
@@ -344,7 +345,7 @@ _headers_write(const char *filename)
344 345
345 free(str); 346 free(str);
346 347
347 snprintf(buf, sizeof(buf), C_HEADER, filename); 348 snprintf(buf, sizeof(buf), C_HEADER, ecore_file_file_get(filename));
348 if (fwrite(buf, strlen(buf), 1, source_fd) != 1) 349 if (fwrite(buf, strlen(buf), 1, source_fd) != 1)
349 return EINA_FALSE; 350 return EINA_FALSE;
350 351