Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version and origin URL to binary and generated sources #131

Open
wants to merge 1 commit into
base: vlm_master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion asn1c/asn1c.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ main(int ac, char **av) {
skeletons_dir = optarg;
break;
case 'v':
fprintf(stderr, "ASN.1 Compiler, v" VERSION "\n" COPYRIGHT);
fprintf(stderr, "ASN.1 Compiler, v" VERSION " from " PACKAGE_BUGREPORT "\n" COPYRIGHT);
exit(0);
break;
case 'W':
Expand Down
10 changes: 7 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
AC_INIT([asn1c],[0.9.29],[[email protected]])
AC_INIT([asn1c], \
m4_esyscmd([echo -n `git describe --long --always --dirty`-`git log -1 --format=%ad --date=short`]), \
m4_esyscmd([git remote get-url origin|sed s/.git$//]))

AC_CONFIG_AUX_DIR(config)
AC_CONFIG_HEADER([config.h])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign tar-pax])
AC_CONFIG_MACRO_DIR([m4])

Expand Down Expand Up @@ -261,7 +263,9 @@ AC_SUBST(SKELETONS_CFLAGS)
AC_SUBST(ASAN_ENV_FLAGS)

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_INCLUDES_DEFAULT
AC_PROG_EGREP

AC_CHECK_HEADERS(sys/param.h)
AC_CHECK_HEADERS(netinet/in.h)

Expand Down
6 changes: 3 additions & 3 deletions libasn1compiler/asn1c_save.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ static int
generate_preamble(arg_t *arg, FILE *fp, int optc, char **argv) {
safe_fprintf(fp,
"/*\n"
" * Generated by asn1c-" VERSION " (http://lionet.info/asn1c)\n"
" * Generated by asn1c-" VERSION " from " PACKAGE_BUGREPORT "\n"
" * From ASN.1 module \"%s\"\n"
" * \tfound in \"%s\"\n",
arg->expr->module->ModuleName,
Expand Down Expand Up @@ -848,7 +848,7 @@ generate_pdu_collection(arg_t *arg) {
abuf *buf = abuf_new();

abuf_printf(buf, "/*\n * Generated by asn1c-" VERSION
" (http://lionet.info/asn1c)\n */\n\n");
" from " PACKAGE_BUGREPORT "\n */\n\n");
abuf_printf(buf,
"struct asn_TYPE_descriptor_s;\t"
"/* Forward declaration */\n\n");
Expand Down Expand Up @@ -1022,7 +1022,7 @@ generate_constant_collection(arg_t *arg) {
int empty_file = 1;

abuf_printf(buf, "/*\n * Generated by asn1c-" VERSION
" (http://lionet.info/asn1c)\n */\n\n");
" from " PACKAGE_BUGREPORT "\n */\n\n");
abuf_printf(buf, "#ifndef _%sASN_CONSTANT_H\n#define _%sASN_CONSTANT_H\n\n", asn1c_prefix(), asn1c_prefix());

abuf_printf(buf, "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n");
Expand Down