aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-11-16 17:05:23 +0100
committerMicael Karlberg <[email protected]>2011-11-16 17:05:23 +0100
commitde3506311f61044799eceeda5c378ab7983ecc16 (patch)
treec35409242ad5a11ea7a77ab63f62e3cb33129b38 /lib
parent4f872459b0a5b5f15273456ec0266a07f52fc5ac (diff)
parentac251265b6c43c5128017ba3b4cad49ad7c432c1 (diff)
downloadotp-de3506311f61044799eceeda5c378ab7983ecc16.tar.gz
otp-de3506311f61044799eceeda5c378ab7983ecc16.tar.bz2
otp-de3506311f61044799eceeda5c378ab7983ecc16.zip
[compiler] Improved version info printout.
OTP-9618 Merge branch 'bmk/snmp/compiler/misc/OTP-9618' into bmk/snmp/r15_integration Conflicts: lib/snmp/doc/src/notes.xml lib/snmp/src/app/snmp.appup.src lib/snmp/vsn.mk
Diffstat (limited to 'lib')
-rw-r--r--lib/snmp/doc/src/notes.xml59
-rw-r--r--lib/snmp/src/app/snmp.appup.src8
-rw-r--r--lib/snmp/src/compile/depend.mk2
-rw-r--r--lib/snmp/src/compile/snmpc.src19
-rw-r--r--lib/snmp/vsn.mk2
5 files changed, 87 insertions, 3 deletions
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml
index decde4746a..e665ba484b 100644
--- a/lib/snmp/doc/src/notes.xml
+++ b/lib/snmp/doc/src/notes.xml
@@ -32,6 +32,65 @@
<file>notes.xml</file>
</header>
+
+ <section>
+ <title>SNMP Development Toolkit 4.21.3</title>
+ <p>Version 4.21.3 supports code replacement in runtime from/to
+ version 4.21.2, 4.21.1, 4.21, 4.20.1, 4.20 and 4.19. </p>
+
+ <section>
+ <title>Improvements and new features</title>
+<!--
+ <p>-</p>
+-->
+
+ <list type="bulleted">
+ <item>
+ <p>[compiler] Improved version info printout. </p>
+ <p>Own Id: OTP-9618</p>
+ </item>
+
+ </list>
+ </section>
+
+ <section>
+ <title>Fixed Bugs and Malfunctions</title>
+ <p>-</p>
+
+<!--
+ <list type="bulleted">
+ <item>
+ <p>[compiler] foo. </p>
+ <p>Own Id: OTP-nnnn</p>
+ </item>
+
+ </list>
+-->
+
+ </section>
+
+
+ <section>
+ <title>Incompatibilities</title>
+<!--
+ <p>-</p>
+-->
+
+ <list type="bulleted">
+ <item>
+ <p>[compiler] The short warning option has been changed from
+ <c>--w</c> to <c>--W</c> to comply with the documentation. </p>
+ <p>Tuncer Ayaz</p>
+ <p>Own Id: OTP-9718</p>
+ </item>
+
+
+ </list>
+ </section>
+
+ </section> <!-- 4.21.3 -->
+
+
<section>
<title>SNMP Development Toolkit 4.21.2</title>
<p>Version 4.21.2 supports code replacement in runtime from/to
diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src
index b4b5367169..dcb3e860d1 100644
--- a/lib/snmp/src/app/snmp.appup.src
+++ b/lib/snmp/src/app/snmp.appup.src
@@ -22,6 +22,10 @@
%% ----- U p g r a d e -------------------------------------------------------
[
+ {"4.21.2",
+ [
+ ]
+ },
{"4.21.1",
[
{update, snmp_note_store, soft, soft_purge, soft_purge, []}
@@ -124,6 +128,10 @@
%% ------D o w n g r a d e ---------------------------------------------------
[
+ {"4.21.2",
+ [
+ ]
+ },
{"4.21.1",
[
{update, snmp_note_store, soft, soft_purge, soft_purge, []}
diff --git a/lib/snmp/src/compile/depend.mk b/lib/snmp/src/compile/depend.mk
index f7084f8bcd..3ee8dc4bec 100644
--- a/lib/snmp/src/compile/depend.mk
+++ b/lib/snmp/src/compile/depend.mk
@@ -44,6 +44,6 @@ $(EBIN)/snmpc_mib_gram.$(EMULATOR): \
../../include/snmp_types.hrl \
snmpc_mib_gram.erl
-$(BIN)/snmpc: snmpc.src
+$(BIN)/snmpc: snmpc.src ../../vsn.mk
$(PERL) -p -e 's?%VSN%?$(VSN)? ' < $< > $@
chmod 755 $@
diff --git a/lib/snmp/src/compile/snmpc.src b/lib/snmp/src/compile/snmpc.src
index f993335b89..8760ce14b5 100644
--- a/lib/snmp/src/compile/snmpc.src
+++ b/lib/snmp/src/compile/snmpc.src
@@ -221,7 +221,10 @@ process_args([], #state{verbosity = Verbosity0, file = MIB} = State) ->
process_args(["--help"|_Args], _State) ->
ok;
process_args(["--version"|_Args], #state{version = Version, mfv = MFV} = _State) ->
- {ok, lists:flatten(io_lib:format("snmpc ~s (~s)", [Version, MFV]))};
+ OtpVersion = otp_release(),
+ {ok, lists:flatten(
+ io_lib:format("snmpc ~s [Mib format version ~s] (OTP ~s)",
+ [Version, MFV, OtpVersion]))};
process_args(["--verbosity", Verbosity0|Args], #state{verbosity = V} = State)
when (V =:= undefined) ->
Verbosity = list_to_atom(Verbosity0),
@@ -398,3 +401,17 @@ usage() ->
e(Reason) ->
throw({error, Reason}).
+
+otp_release() ->
+ system_info(otp_release, string).
+
+system_info(Tag, Type) ->
+ case (catch erlang:system_info(Tag)) of
+ {'EXIT', _} ->
+ "-";
+ Info when is_list(Info) andalso (Type =:= string) ->
+ Info;
+ Info ->
+ lists:flatten(io_lib:format("~w", [Info]))
+ end.
+
diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk
index 0819ab9b36..25e3a9470b 100644
--- a/lib/snmp/vsn.mk
+++ b/lib/snmp/vsn.mk
@@ -17,6 +17,6 @@
#
# %CopyrightEnd%
-SNMP_VSN = 4.21.2
+SNMP_VSN = 4.21.3
PRE_VSN =
APP_VSN = "snmp-$(SNMP_VSN)$(PRE_VSN)"