summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2016-09-30 13:36:54 +0200
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2016-10-07 11:54:23 +0200
commit501a57523723f79434b83c38584e2088a4913a68 (patch)
treea682d3920a526f332e151c56789ab4760a58a317
parent323949a699608ad9c215179d767a4ee503b93910 (diff)
eolian gen2: generate only .h by default for eot files
-rw-r--r--src/bin/eolian2/main.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/bin/eolian2/main.c b/src/bin/eolian2/main.c
index 8d4e3b4d15..19ac31529a 100644
--- a/src/bin/eolian2/main.c
+++ b/src/bin/eolian2/main.c
@@ -20,7 +20,7 @@ enum
20 20
21static const char *_dexts[5] = 21static const char *_dexts[5] =
22{ 22{
23 ".eo.h", ".eo.legacy.h", ".eo.stub.h", ".eo.c", ".eo.c" 23 ".h", ".legacy.h", ".stub.h", ".c", ".c"
24}; 24};
25 25
26static int 26static int
@@ -45,14 +45,15 @@ _print_usage(const char *progn, FILE *outf)
45 " -v print version and exit\n" 45 " -v print version and exit\n"
46 "\n" 46 "\n"
47 "Available types:\n" 47 "Available types:\n"
48 " h: C header file (.eo.h)\n" 48 " h: C header file (.h)\n"
49 " l: Legacy C header file (.eo.legacy.h)\n" 49 " l: Legacy C header file (.legacy.h)\n"
50 " s: Stub C header file (.eo.stub.h)\n" 50 " s: Stub C header file (.stub.h)\n"
51 " c: C source file (.eo.c)\n" 51 " c: C source file (.c)\n"
52 " i: Implementation file (added into .eo.c)\n" 52 " i: Implementation file (added into .c)\n"
53 "\n" 53 "\n"
54 "By default, the 'hc' set is used.\n" 54 "By default, the 'hc' set is used ('h' for .eot files).\n"
55 "Output filenames are determined from input .eo filename.\n"); 55 "Output filenames are determined from input .eo filename.\n"
56 "Default filenames include input extension. (e.g. \".eo.c\")\n");
56} 57}
57 58
58static void 59static void
@@ -466,15 +467,12 @@ main(int argc, char **argv)
466 goto end; 467 goto end;
467 } 468 }
468 469
469 char *inoext = strdup(input); 470 _fill_all_outs(outs, input);
470 inoext[ext - input] = '\0';
471 _fill_all_outs(outs, inoext);
472 free(inoext);
473 471
474 const char *eobn = _get_filename(input); 472 const char *eobn = _get_filename(input);
475 473
476 if (!gen_what) 474 if (!gen_what)
477 gen_what = GEN_H | GEN_C; 475 gen_what = !strcmp(ext, ".eot") ? GEN_H : (GEN_H | GEN_C);
478 476
479 Eina_Bool succ = EINA_TRUE; 477 Eina_Bool succ = EINA_TRUE;
480 if (gen_what & GEN_H) 478 if (gen_what & GEN_H)