summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2015-05-20 10:34:58 +0300
committerDaniel Zaoui <daniel.zaoui@samsung.com>2015-05-20 10:37:07 +0300
commite41d1f2cb4bac7a7e33b3f2d5b5abac0222498b8 (patch)
tree857b2aa0f9cd7cfa8f1a5db89c19028697b1550f /src/bin
parent1b47e2e0133623d0a22342e9fbdad57b3c4fb484 (diff)
Eolian/Generator: support eot files
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/eolian/main.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index e45d2a7ee1..b198a234ed 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -304,6 +304,9 @@ static int gen_opt = NO_WAY_GEN;
304static int eo_needed = 0; 304static int eo_needed = 0;
305static int legacy_support = 0; 305static int legacy_support = 0;
306 306
307#define EO_SUFFIX ".eo"
308#define EOT_SUFFIX ".eot"
309
307int main(int argc, char **argv) 310int main(int argc, char **argv)
308{ 311{
309 int ret = 1; 312 int ret = 1;
@@ -311,6 +314,7 @@ int main(int argc, char **argv)
311 const char *eo_filename = NULL; 314 const char *eo_filename = NULL;
312 char *output_filename = NULL; /* if NULL, have to generate, otherwise use the name stored there */ 315 char *output_filename = NULL; /* if NULL, have to generate, otherwise use the name stored there */
313 char *eo_filename_copy = NULL, *eo_file_basename; 316 char *eo_filename_copy = NULL, *eo_file_basename;
317 Eina_Bool is_eo = EINA_FALSE;
314 318
315 eina_init(); 319 eina_init();
316 eolian_init(); 320 eolian_init();
@@ -391,7 +395,16 @@ int main(int argc, char **argv)
391 goto end; 395 goto end;
392 } 396 }
393 397
394 if (!eolian_eo_file_parse(eo_filename)) 398 is_eo = eina_str_has_suffix(eo_filename, EO_SUFFIX);
399
400 if (!is_eo && !eina_str_has_suffix(eo_filename, EOT_SUFFIX))
401 {
402 ERR("The input file %s doesn't have a correct extension (.eo/.eot).\n", eo_filename);
403 goto end;
404 }
405
406 if ((is_eo && !eolian_eo_file_parse(eo_filename)) ||
407 (!is_eo && !eolian_eot_file_parse(eo_filename)))
395 { 408 {
396 ERR("Error during parsing file %s\n", eo_filename); 409 ERR("Error during parsing file %s\n", eo_filename);
397 goto end; 410 goto end;
@@ -411,7 +424,8 @@ int main(int argc, char **argv)
411 if (class) eolian_show_class(class); 424 if (class) eolian_show_class(class);
412 } 425 }
413 426
414 if (!eo_needed && !(gen_opt == H_GEN && legacy_support)) 427 /* Only needed for .eo files */
428 if (is_eo && !eo_needed && !(gen_opt == H_GEN && legacy_support))
415 { 429 {
416 ERR("Eo flag is not specified (use --eo). Aborting eo generation.\n"); 430 ERR("Eo flag is not specified (use --eo). Aborting eo generation.\n");
417 goto end; 431 goto end;