From 2655eb3f05f30690f1fec2ea0dce097affe4fc3a Mon Sep 17 00:00:00 2001 From: Lev Walkin <vlm@lionet.info> Date: Mon, 25 Mar 2013 19:09:04 -0700 Subject: [PATCH] deprecate -fskeletons-copy; this option is now a default; use -flink-skeletons for old behavior --- ChangeLog | 2 +- asn1c/asn1c.1 | 5 +---- asn1c/asn1c.c | 8 +++++--- doc/docsrc/asn1c-usage.tex | 1 - libasn1compiler/asn1c_save.c | 2 +- libasn1compiler/asn1compiler.h | 6 +++--- 6 files changed, 11 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index a6ead84a..4cbaa116 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ ???: - * + * Made -fskeletons-copy a default one; removed cmdline option. 0.9.24: 2013-Mar-16 diff --git a/asn1c/asn1c.1 b/asn1c/asn1c.1 index 871e2b19..2fbea68f 100644 --- a/asn1c/asn1c.1 +++ b/asn1c/asn1c.1 @@ -26,7 +26,7 @@ and other encoding rules. .br \fB\-fbless-SIZE \-fcompound-names \-findirect-choice .BI "\-fknown-extern-type="<name> -\fB\-fnative-types \-fno-constraints \-fno-include-deps \-funnamed-unions \-fskeletons-copy +\fB\-fnative-types \-fno-constraints \-fno-include-deps \-funnamed-unions .TP \fICodecs Generation Options\fR .br @@ -111,9 +111,6 @@ Helps prevent namespace collisions. .TP .B \-funnamed-unions Enable unnamed unions in the definitions of target language's structures. -.TP -.B \-fskeletons-copy -Copy support files (skeletons) rather than symlink them. .SH CODECS GENERATION OPTIONS .TP .B \-gen-PER diff --git a/asn1c/asn1c.c b/asn1c/asn1c.c index 330ffa22..b849a528 100644 --- a/asn1c/asn1c.c +++ b/asn1c/asn1c.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003, 2004, 2005, 2006 + * Copyright (c) 2003, 2004, 2005, 2006, 2013 * Lev Walkin <vlm@lionet.info>. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -101,8 +101,10 @@ main(int ac, char **av) { asn1_compiler_flags |= A1C_INCLUDES_QUOTED; } else if(strcmp(optarg, "unnamed-unions") == 0) { asn1_compiler_flags |= A1C_UNNAMED_UNIONS; - } else if(strcmp(optarg, "skeletons-copy") == 0) { // DEPRECATED - asn1_compiler_flags |= A1C_SKELETONS_COPY; + } else if(strcmp(optarg, "skeletons-copy") == 0) { + fprintf(stderr, "-f%s: Deprecated option\n", optarg); + } else if(strcmp(optarg, "link-skeletons") == 0) { + asn1_compiler_flags |= A1C_LINK_SKELETONS; } else { fprintf(stderr, "-f%s: Invalid argument\n", optarg); exit(EX_USAGE); diff --git a/doc/docsrc/asn1c-usage.tex b/doc/docsrc/asn1c-usage.tex index b18033f7..846f5b2b 100644 --- a/doc/docsrc/asn1c-usage.tex +++ b/doc/docsrc/asn1c-usage.tex @@ -260,7 +260,6 @@ may produce a shorter executable.}\tabularnewline dependencies.}\tabularnewline {\small -funnamed-unions} & {\small Enable unnamed unions in the definitions of target language's structures.}\tabularnewline -{\small -fskeletons-copy} & {\small Copy support files rather than symlink them.}\tabularnewline \midrule\tabularnewline \textbf{\small Codecs Generation Options} & \textbf{\small Description}\tabularnewline \midrule diff --git a/libasn1compiler/asn1c_save.c b/libasn1compiler/asn1c_save.c index 2a01b411..d71db199 100644 --- a/libasn1compiler/asn1c_save.c +++ b/libasn1compiler/asn1c_save.c @@ -434,7 +434,7 @@ asn1c_copy_over(arg_t *arg, char *path) { #ifdef _WIN32 int use_real_copy = 1; #else - int use_real_copy = (arg->flags & A1C_SKELETONS_COPY); + int use_real_copy = !(arg->flags & A1C_LINK_SKELETONS); #endif fname = a1c_basename(path); diff --git a/libasn1compiler/asn1compiler.h b/libasn1compiler/asn1compiler.h index c8c9b9b2..93755da9 100644 --- a/libasn1compiler/asn1compiler.h +++ b/libasn1compiler/asn1compiler.h @@ -52,10 +52,10 @@ enum asn1c_flags { */ A1C_INDIRECT_CHOICE = 0x0400, /* - * -fskeletons-copy - * Copy support files rather than symlink them. + * -flink-skeletons + * Symlink support files rather than copy them. */ - A1C_SKELETONS_COPY = 0x0800, + A1C_LINK_SKELETONS = 0x0800, /* * -gen-PER * Generate PER support code -- 2.26.2