Rename Makefile.am.example => converter-example.mk
The generated Makefile.am.example is not really in the automake style.
Renaming it to converter-example.mk to reflect that it is a plain makefile
snippet and that it is for creating the converter-example
diff --git a/libasn1compiler/asn1c_save.c b/libasn1compiler/asn1c_save.c
index 1cc11a2..1a144f9 100644
--- a/libasn1compiler/asn1c_save.c
+++ b/libasn1compiler/asn1c_save.c
@@ -160,13 +160,14 @@
}
static int
-asn1c__save_example_makefile(arg_t *arg, const asn1c_dep_chainset *deps, const char *datadir,
- const char *destdir, const char *makefile_name,
- const char *library_makefile_name, int argc,
- char **argv) {
+asn1c__save_example_mk_makefile(arg_t *arg, const asn1c_dep_chainset *deps, const char *datadir,
+ const char *destdir, const char *makefile_name,
+ const char *library_makefile_name, int argc,
+ char **argv) {
FILE *mkf;
asn1c_dep_chain *dlist = asn1c_deps_flatten(deps, FDEP_CONVERTER);
+ /* Generate converter-example.mk snippet */
mkf = asn1c_open_file(destdir, makefile_name, "", 0);
if(mkf == NULL) {
perror(makefile_name);
@@ -228,6 +229,7 @@
fclose(mkf);
safe_fprintf(stderr, "Generated %s%s\n", destdir, makefile_name);
+
return 0;
}
@@ -246,7 +248,7 @@
int argc, int optc, char **argv) {
int ret = -1;
- const char* program_makefile = "Makefile.am.example";
+ const char* program_makefile = "converter-example.mk";
const char* library_makefile = "Makefile.am.libasncodec";
/*
@@ -291,9 +293,9 @@
if(ret) break;
if(arg->flags & A1C_GEN_EXAMPLE) {
- ret = asn1c__save_example_makefile(arg, deps, datadir, destdir,
- program_makefile,
- library_makefile, argc, argv);
+ ret = asn1c__save_example_mk_makefile(arg, deps, datadir, destdir,
+ program_makefile,
+ library_makefile, argc, argv);
if(ret) break;
}
} while(0);
diff --git a/libasn1compiler/asn1compiler.h b/libasn1compiler/asn1compiler.h
index 16904b5..d05f122 100644
--- a/libasn1compiler/asn1compiler.h
+++ b/libasn1compiler/asn1compiler.h
@@ -85,7 +85,7 @@
*/
A1C_GEN_PER = 0x80000,
/*
- * Generate converter-example.c and Makefile.am.example
+ * Generate converter-example.c and converter-example.mk
*/
A1C_GEN_EXAMPLE = 0x100000,
};