eolian generator: remove useless --eo argument

This commit is contained in:
Daniel Kolesa 2015-10-13 14:34:47 +01:00
parent e992a3a1e0
commit a29d6aed66
3 changed files with 12 additions and 22 deletions

View File

@ -15,17 +15,17 @@ SUFFIXES = .eo .eo.c .eo.h .eo.legacy.h .eot .eot.h
%.eo.c: %.eo ${_EOLIAN_GEN_DEP}
$(AM_V_EOL) \
$(MKDIR_P) $(dir $@); \
$(EOLIAN_GEN) --eo --legacy $(EOLIAN_FLAGS) --gc -o $@ $<
$(EOLIAN_GEN) --legacy $(EOLIAN_FLAGS) --gc -o $@ $<
%.eo.h: %.eo ${_EOLIAN_GEN_DEP}
$(AM_V_EOL) \
$(MKDIR_P) $(dir $@); \
$(EOLIAN_GEN) --eo $(EOLIAN_FLAGS) --gh -o $@ $<
$(EOLIAN_GEN) $(EOLIAN_FLAGS) --gh -o $@ $<
%.eot.h: %.eot ${_EOLIAN_GEN_DEP}
$(AM_V_EOL) \
$(MKDIR_P) $(dir $@); \
$(EOLIAN_GEN) --eo $(EOLIAN_FLAGS) --gh -o $@ $<
$(EOLIAN_GEN) $(EOLIAN_FLAGS) --gh -o $@ $<
%.eo.legacy.h: %.eo ${_EOLIAN_GEN_DEP}
$(AM_V_EOL) \

View File

@ -258,7 +258,6 @@ enum
C_IMPL_GEN
};
static int gen_opt = NO_WAY_GEN;
static int eo_needed = 0;
static int legacy_support = 0;
#define EO_SUFFIX ".eo"
@ -291,7 +290,6 @@ int main(int argc, char **argv)
static struct option long_options[] =
{
/* These options set a flag. */
{"eo", no_argument, &eo_needed, 1},
{"help", no_argument, 0, 'h'},
{"gh", no_argument, &gen_opt, H_GEN},
{"gc", no_argument, &gen_opt, C_GEN},
@ -367,14 +365,6 @@ int main(int argc, char **argv)
eo_filename_copy = strdup(eo_filename);
eo_file_basename = basename(eo_filename_copy);
/* Only needed for .eo files */
if (is_eo && !eo_needed && !(gen_opt == H_GEN && legacy_support))
{
/* FIXME: perhaps ditch this completely */
fprintf(stderr, "eolian: --eo not specified\n");
goto end;
}
if (gen_opt)
{
if (!output_filename)

View File

@ -100,12 +100,12 @@ START_TEST(eolian_dev_impl_code)
#endif
);
remove(output_filepath);
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl.eo", "--eo --gi", output_filepath));
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl.eo", "--gi", output_filepath));
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/object_impl_ref.c", output_filepath));
/* Check that nothing is added */
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl.eo", "--eo --gi", output_filepath));
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl.eo", "--gi", output_filepath));
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/object_impl_ref.c", output_filepath));
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl_add.eo", "--eo --gi", output_filepath));
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/object_impl_add.eo", "--gi", output_filepath));
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/object_impl_add_ref.c", output_filepath));
}
END_TEST
@ -121,9 +121,9 @@ START_TEST(eolian_types_generation)
#endif
);
remove(output_filepath);
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/typedef.eo", "--eo --gh", output_filepath));
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/typedef.eo", "--gh", output_filepath));
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/typedef_ref.c", output_filepath));
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/struct.eo", "--eo --gh", output_filepath));
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/struct.eo", "--gh", output_filepath));
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/struct_ref.c", output_filepath));
}
END_TEST
@ -139,7 +139,7 @@ START_TEST(eolian_default_values_generation)
#endif
);
remove(output_filepath);
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "--eo --gc", output_filepath));
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "--gc", output_filepath));
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref.c", output_filepath));
}
END_TEST
@ -155,7 +155,7 @@ START_TEST(eolian_override_generation)
#endif
);
remove(output_filepath);
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/override.eo", "--eo --gc", output_filepath));
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/override.eo", "--gc", output_filepath));
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/override_ref.c", output_filepath));
}
END_TEST
@ -171,7 +171,7 @@ START_TEST(eolian_functions_descriptions)
#endif
);
remove(output_filepath);
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "--eo --gh", output_filepath));
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/class_simple.eo", "--gh", output_filepath));
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/class_simple_ref_eo.h", output_filepath));
remove(output_filepath);
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)
#endif
);
remove(output_filepath);
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/docs.eo", "--eo --gh", output_filepath));
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/docs.eo", "--gh", output_filepath));
fail_if(!_files_compare(PACKAGE_DATA_DIR"/data/docs_ref.h", output_filepath));
remove(output_filepath);
fail_if(0 != _eolian_gen_execute(PACKAGE_DATA_DIR"/data/docs.eo", "--legacy --gh", output_filepath));