summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-10-13 14:34:47 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-11-09 15:02:32 +0000
commita29d6aed6630c7d598695539ea85ca4535891e57 (patch)
tree3d2be016ddacb866b66121c750c3d1c351039912
parente992a3a1e0b597fecbe4b935659138d6a9bafcf2 (diff)
eolian generator: remove useless --eo argument
-rw-r--r--src/Makefile_Eolian_Helper.am6
-rw-r--r--src/bin/eolian/main.c10
-rw-r--r--src/tests/eolian/eolian_generation.c18
3 files changed, 12 insertions, 22 deletions
diff --git a/src/Makefile_Eolian_Helper.am b/src/Makefile_Eolian_Helper.am
index 34ea60fc3a..5cd5e380c9 100644
--- a/src/Makefile_Eolian_Helper.am
+++ b/src/Makefile_Eolian_Helper.am
@@ -15,17 +15,17 @@ SUFFIXES = .eo .eo.c .eo.h .eo.legacy.h .eot .eot.h
15%.eo.c: %.eo ${_EOLIAN_GEN_DEP} 15%.eo.c: %.eo ${_EOLIAN_GEN_DEP}
16 $(AM_V_EOL) \ 16 $(AM_V_EOL) \
17 $(MKDIR_P) $(dir $@); \ 17 $(MKDIR_P) $(dir $@); \
18 $(EOLIAN_GEN) --eo --legacy $(EOLIAN_FLAGS) --gc -o $@ $< 18 $(EOLIAN_GEN) --legacy $(EOLIAN_FLAGS) --gc -o $@ $<
19 19
20%.eo.h: %.eo ${_EOLIAN_GEN_DEP} 20%.eo.h: %.eo ${_EOLIAN_GEN_DEP}
21 $(AM_V_EOL) \ 21 $(AM_V_EOL) \
22 $(MKDIR_P) $(dir $@); \ 22 $(MKDIR_P) $(dir $@); \
23 $(EOLIAN_GEN) --eo $(EOLIAN_FLAGS) --gh -o $@ $< 23 $(EOLIAN_GEN) $(EOLIAN_FLAGS) --gh -o $@ $<
24 24
25%.eot.h: %.eot ${_EOLIAN_GEN_DEP} 25%.eot.h: %.eot ${_EOLIAN_GEN_DEP}
26 $(AM_V_EOL) \ 26 $(AM_V_EOL) \
27 $(MKDIR_P) $(dir $@); \ 27 $(MKDIR_P) $(dir $@); \
28 $(EOLIAN_GEN) --eo $(EOLIAN_FLAGS) --gh -o $@ $< 28 $(EOLIAN_GEN) $(EOLIAN_FLAGS) --gh -o $@ $<
29 29
30%.eo.legacy.h: %.eo ${_EOLIAN_GEN_DEP} 30%.eo.legacy.h: %.eo ${_EOLIAN_GEN_DEP}
31 $(AM_V_EOL) \ 31 $(AM_V_EOL) \
diff --git a/src/bin/eolian/main.c b/src/bin/eolian/main.c
index c213a5c5d8..8b5d02d73e 100644
--- a/src/bin/eolian/main.c
+++ b/src/bin/eolian/main.c
@@ -258,7 +258,6 @@ enum
258 C_IMPL_GEN 258 C_IMPL_GEN
259}; 259};
260static int gen_opt = NO_WAY_GEN; 260static int gen_opt = NO_WAY_GEN;
261static int eo_needed = 0;
262static int legacy_support = 0; 261static int legacy_support = 0;
263 262
264#define EO_SUFFIX ".eo" 263#define EO_SUFFIX ".eo"
@@ -291,7 +290,6 @@ int main(int argc, char **argv)
291 static struct option long_options[] = 290 static struct option long_options[] =
292 { 291 {
293 /* These options set a flag. */ 292 /* These options set a flag. */
294 {"eo", no_argument, &eo_needed, 1},
295 {"help", no_argument, 0, 'h'}, 293 {"help", no_argument, 0, 'h'},
296 {"gh", no_argument, &gen_opt, H_GEN}, 294 {"gh", no_argument, &gen_opt, H_GEN},
297 {"gc", no_argument, &gen_opt, C_GEN}, 295 {"gc", no_argument, &gen_opt, C_GEN},
@@ -367,14 +365,6 @@ int main(int argc, char **argv)
367 eo_filename_copy = strdup(eo_filename); 365 eo_filename_copy = strdup(eo_filename);
368 eo_file_basename = basename(eo_filename_copy); 366 eo_file_basename = basename(eo_filename_copy);
369 367
370 /* Only needed for .eo files */
371 if (is_eo && !eo_needed && !(gen_opt == H_GEN && legacy_support))
372 {
373 /* FIXME: perhaps ditch this completely */
374 fprintf(stderr, "eolian: --eo not specified\n");
375 goto end;
376 }
377
378 if (gen_opt) 368 if (gen_opt)
379 { 369 {
380 if (!output_filename) 370 if (!output_filename)
diff --git a/src/tests/eolian/eolian_generation.c b/src/tests/eolian/eolian_generation.c
index 097614657c..a6bedb3b2a 100644
--- a/src/tests/eolian/eolian_generation.c
+++ b/src/tests/eolian/eolian_generation.c
@@ -100,12 +100,12 @@ START_TEST(eolian_dev_impl_code)
100#endif 100#endif
101 ); 101 );
102 remove(output_filepath); 102 remove(output_filepath);
103 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl.eo", "--eo --gi", output_filepath)); 103 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl.eo", "--gi", output_filepath));
104 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/object_impl_ref.c", output_filepath)); 104 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/object_impl_ref.c", output_filepath));
105 /* Check that nothing is added */ 105 /* Check that nothing is added */
106 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl.eo", "--eo --gi", output_filepath)); 106 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl.eo", "--gi", output_filepath));
107 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/object_impl_ref.c", output_filepath)); 107 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/object_impl_ref.c", output_filepath));
108 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl_add.eo", "--eo --gi", output_filepath)); 108 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl_add.eo", "--gi", output_filepath));
109 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/object_impl_add_ref.c", output_filepath)); 109 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/object_impl_add_ref.c", output_filepath));
110} 110}
111END_TEST 111END_TEST
@@ -121,9 +121,9 @@ START_TEST(eolian_types_generation)
121#endif 121#endif
122 ); 122 );
123 remove(output_filepath); 123 remove(output_filepath);
124 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/typedef.eo", "--eo --gh", output_filepath)); 124 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/typedef.eo", "--gh", output_filepath));
125 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/typedef_ref.c", output_filepath)); 125 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/typedef_ref.c", output_filepath));
126 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/struct.eo", "--eo --gh", output_filepath)); 126 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/struct.eo", "--gh", output_filepath));
127 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/struct_ref.c", output_filepath)); 127 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/struct_ref.c", output_filepath));
128} 128}
129END_TEST 129END_TEST
@@ -139,7 +139,7 @@ START_TEST(eolian_default_values_generation)
139#endif 139#endif
140 ); 140 );
141 remove(output_filepath); 141 remove(output_filepath);
142 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "--eo --gc", output_filepath)); 142 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "--gc", output_filepath));
143 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref.c", output_filepath)); 143 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref.c", output_filepath));
144} 144}
145END_TEST 145END_TEST
@@ -155,7 +155,7 @@ START_TEST(eolian_override_generation)
155#endif 155#endif
156 ); 156 );
157 remove(output_filepath); 157 remove(output_filepath);
158 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/override.eo", "--eo --gc", output_filepath)); 158 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/override.eo", "--gc", output_filepath));
159 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/override_ref.c", output_filepath)); 159 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/override_ref.c", output_filepath));
160} 160}
161END_TEST 161END_TEST
@@ -171,7 +171,7 @@ START_TEST(eolian_functions_descriptions)
171#endif 171#endif
172 ); 172 );
173 remove(output_filepath); 173 remove(output_filepath);
174 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "--eo --gh", output_filepath)); 174 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "--gh", output_filepath));
175 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref_eo.h", output_filepath)); 175 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref_eo.h", output_filepath));
176 remove(output_filepath); 176 remove(output_filepath);
177 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "--legacy --gh", output_filepath)); 177 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "--legacy --gh", output_filepath));
@@ -207,7 +207,7 @@ START_TEST(eolian_docs)
207#endif 207#endif
208 ); 208 );
209 remove(output_filepath); 209 remove(output_filepath);
210 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/docs.eo", "--eo --gh", output_filepath)); 210 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/docs.eo", "--gh", output_filepath));
211 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/docs_ref.h", output_filepath)); 211 fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/docs_ref.h", output_filepath));
212 remove(output_filepath); 212 remove(output_filepath);
213 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/docs.eo", "--legacy --gh", output_filepath)); 213 fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/docs.eo", "--legacy --gh", output_filepath));