diff --git a/ChangeLog.md b/ChangeLog.md index 0adab56..e40d0bf 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -2,6 +2,16 @@ Change Log ========== +2.2.2 +----- + +Changes: + +* Code review (macros `NR_HISTORY_ROOT_VSTATE()` and `NR_BUMP_VSTATE()` in + `not-autoversion.m4` – made sure that the default `NR_PROJECT_MINVER` is set + to `1` when `NR_PROJECT_MAJVER` is `0`) + + 2.2.1 ----- @@ -135,7 +145,7 @@ Changes: * File † `not-multiversion.m4`, containing the † `NR_SET_VERSION_ENVIRONMENT()` macro, has been removed * Macros † `NS_ECHO_IF()` and † `NS_ECHO_IF_UNQUOTED()` have been removed from - `not-autoshell.m4` -- you can use `NS_PP_IF([NS_STDOUT], ...)` and + `not-autoshell.m4` – you can use `NS_PP_IF([NS_STDOUT], ...)` and `NS_PP_IF([NS_STDOUT_UNQUOTED], ...)` to obtain the same result * Code review (macros `NC_MSG_ERRORBOX()` and `NC_MSG_FAILUREBOX()` in `not-ac-messages.m4`) @@ -209,7 +219,7 @@ Changes: feature this macro was adding to the native `AC_CHECK_HEADERS()` was the possibility to give custom names to the shell variables created for each header) -* Macro `n4_repeat()` has been simplified -- for complex cases please use +* Macro `n4_repeat()` has been simplified – for complex cases please use `m4_for()` * Code review (macro `NC_CONFIG_SHADOW_DIR()` in `not-extended-config.m4`; macros `NS_TEXT_WRAP()` in `not-autoshell.m4`; macros `NC_GET_PROGS()` and @@ -414,8 +424,8 @@ Changes: been renamed to `NC_REQ_PROGS()` and `NC_GET_PROGS()` * Code review (macros † `NM_ENVIRONMENT_KEYS` and † `NM_LOAD_ENVIRONMENT` in † `not-automake.m4`; macro † `NM_SET_VERSION_ENVIRONMENT()` in - † `not-misc.m4` -- the new version of the latter is incompatible with - previous versions) + † `not-misc.m4` – the new version of the latter is incompatible with previous + versions) * Documentation @@ -469,8 +479,8 @@ Changes: Changes: -* Macro † `nm4_unlambda` has been removed from `not-m4sugar.m4` -- lambda - macros are now safely created without polluting the global scope +* Macro † `nm4_unlambda` has been removed from `not-m4sugar.m4` – lambda macros + are now safely created without polluting the global scope * M4sugar clones † `nm4_switch()` and † `nm4_case()` have been removed from `not-m4sugar.m4` (they were clones of `m4_case()` and `m4_bmatch()` respectively) diff --git a/examples/not-autoversion/extended-example/autostuff/m4/not-autotools.m4 b/examples/not-autoversion/extended-example/autostuff/m4/not-autotools.m4 index 22a6cec..a1cfca0 100644 --- a/examples/not-autoversion/extended-example/autostuff/m4/not-autotools.m4 +++ b/examples/not-autoversion/extended-example/autostuff/m4/not-autotools.m4 @@ -194,7 +194,10 @@ dnl The initial version state expanded from the `root` argument passed to dnl `NR_RECORD_HISTORY()` m4_define([NR_HISTORY_ROOT_VSTATE], m4_dquote(m4_default_nblank_quoted(m4_argn([1], $1), [0]), - m4_default_nblank_quoted(m4_argn([2], $1), [0]), + m4_default_nblank(m4_quote(m4_argn([2], $1)), + [m4_if(m4_eval(m4_argn([1], $1)[ + 0 > 0]), [1], + [0], + [1])]), m4_default_nblank_quoted(m4_argn([3], $1), [0]), m4_default_nblank_quoted(m4_argn([4], $1), [0]), m4_default_nblank_quoted(m4_argn([5], $1), [0]), @@ -342,7 +345,7 @@ m4_define([NR_BUMP_VSTATE], [n4_has([$8], [LAUNCH], [1, 0, 0, 0, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0])], + [0, 1, 0, 0, 0, 0, 0])], [m4_if(m4_eval([$1 > 0]), [1], [n4_has([$8], [DEPARTURE], diff --git a/examples/not-autoversion/simple-example/autostuff/m4/not-autotools.m4 b/examples/not-autoversion/simple-example/autostuff/m4/not-autotools.m4 index ff57e01..b81fadd 100644 --- a/examples/not-autoversion/simple-example/autostuff/m4/not-autotools.m4 +++ b/examples/not-autoversion/simple-example/autostuff/m4/not-autotools.m4 @@ -61,7 +61,10 @@ dnl The initial version state expanded from the `root` argument passed to dnl `NR_RECORD_HISTORY()` m4_define([NR_HISTORY_ROOT_VSTATE], m4_dquote(m4_default_nblank_quoted(m4_argn([1], $1), [0]), - m4_default_nblank_quoted(m4_argn([2], $1), [0]), + m4_default_nblank(m4_quote(m4_argn([2], $1)), + [m4_if(m4_eval(m4_argn([1], $1)[ + 0 > 0]), [1], + [0], + [1])]), m4_default_nblank_quoted(m4_argn([3], $1), [0]), m4_default_nblank_quoted(m4_argn([4], $1), [0]), m4_default_nblank_quoted(m4_argn([5], $1), [0]), @@ -209,7 +212,7 @@ m4_define([NR_BUMP_VSTATE], [n4_has([$8], [LAUNCH], [1, 0, 0, 0, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0])], + [0, 1, 0, 0, 0, 0, 0])], [m4_if(m4_eval([$1 > 0]), [1], [n4_has([$8], [DEPARTURE], diff --git a/m4/not-autoversion.m4 b/m4/not-autoversion.m4 index 103a407..c025f1e 100644 --- a/m4/not-autoversion.m4 +++ b/m4/not-autoversion.m4 @@ -383,7 +383,7 @@ dnl shell expansions here, you must use only literals. dnl dnl Expansion type: literal (void) dnl Requires: `NR_BUMP_VSTATE()`, `NR_GET_EVENT_VSTATE()` -dnl Version: 1.0.0 +dnl Version: 1.0.1 dnl Author: madmurphy dnl dnl ************************************************************************** @@ -396,7 +396,10 @@ dnl The initial version state expanded from the `root` argument passed to dnl `NR_RECORD_HISTORY()` m4_define([NR_HISTORY_ROOT_VSTATE], m4_dquote(m4_default_nblank_quoted(m4_argn([1], $1), [0]), - m4_default_nblank_quoted(m4_argn([2], $1), [0]), + m4_default_nblank(m4_quote(m4_argn([2], $1)), + [m4_if(m4_eval(m4_argn([1], $1)[ + 0 > 0]), [1], + [0], + [1])]), m4_default_nblank_quoted(m4_argn([3], $1), [0]), m4_default_nblank_quoted(m4_argn([4], $1), [0]), m4_default_nblank_quoted(m4_argn([5], $1), [0]), @@ -570,7 +573,7 @@ dnl This macro may be invoked before `AC_INIT()`. dnl dnl Expansion type: literal dnl Requires: `n4_has()` from `not-m4sugar.m4` -dnl Version: 1.0.0 +dnl Version: 1.0.1 dnl Author: madmurphy dnl dnl ************************************************************************** @@ -580,7 +583,7 @@ m4_define([NR_BUMP_VSTATE], [n4_has([$8], [LAUNCH], [1, 0, 0, 0, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0])], + [0, 1, 0, 0, 0, 0, 0])], [m4_if(m4_eval([$1 > 0]), [1], [n4_has([$8], [DEPARTURE], diff --git a/macro-index.md b/macro-index.md index f0f61e4..a3293ed 100644 --- a/macro-index.md +++ b/macro-index.md @@ -85,41 +85,41 @@ This is the complete list of macros released by the **Not Autotools** project. * [`NR_RECORD_HISTORY()`](m4/not-autoversion.m4#L24) * [`NR_HISTORY_ROOT_VSTATE()`](m4/not-autoversion.m4#L393) -* [`NR_HISTORY_EVENTS`](m4/not-autoversion.m4#L407) -* [`NR_HISTORY_GET_EVENT_VSTATE()`](m4/not-autoversion.m4#L414) -* [`NR_HISTORY_CURRENT_EVENT_NAME`](m4/not-autoversion.m4#L448) -* [`NR_HISTORY_CURRENT_VSTATE`](m4/not-autoversion.m4#L455) -* [`NR_PROJECT_MAJVER`](m4/not-autoversion.m4#L462) -* [`NR_PROJECT_MINVER`](m4/not-autoversion.m4#L469) -* [`NR_PROJECT_MICVER`](m4/not-autoversion.m4#L476) -* [`NR_PROJECT_VERSION`](m4/not-autoversion.m4#L483) -* [`NR_BINARY_MAJVER`](m4/not-autoversion.m4#L490) -* [`NR_BINARY_MINVER`](m4/not-autoversion.m4#L498) -* [`NR_BINARY_MICVER`](m4/not-autoversion.m4#L505) -* [`NR_BINARY_VERSION`](m4/not-autoversion.m4#L512) -* [`NR_INTERFACE_NUM`](m4/not-autoversion.m4#L519) -* [`NR_INTERFACES_SUPPORTED`](m4/not-autoversion.m4#L526) -* [`NR_IMPLEMENTATION_NUM`](m4/not-autoversion.m4#L533) -* [`NR_LIBTOOL_VERSION_INFO`](m4/not-autoversion.m4#L540) -* [`NR_SOURCE_AGE`](m4/not-autoversion.m4#L547) -* [`NR_BUMP_VSTATE()`](m4/not-autoversion.m4#L556) -* [`NR_GET_EVENT_VSTATE()`](m4/not-autoversion.m4#L622) -* [`NR_FOR_EACH_EVENT()`](m4/not-autoversion.m4#L673) -* [`NR_HISTORY_FOR_EACH_EVENT()`](m4/not-autoversion.m4#L791) -* [`NR_VSTATE_GET_PROJECT_VERSION()`](m4/not-autoversion.m4#L899) -* [`NR_VSTATE_GET_PROJECT_MAJVER()`](m4/not-autoversion.m4#L921) -* [`NR_VSTATE_GET_PROJECT_MINVER()`](m4/not-autoversion.m4#L943) -* [`NR_VSTATE_GET_PROJECT_MICVER()`](m4/not-autoversion.m4#L965) -* [`NR_VSTATE_GET_BINARY_VERSION()`](m4/not-autoversion.m4#L987) -* [`NR_VSTATE_GET_BINARY_MAJVER()`](m4/not-autoversion.m4#L1007) -* [`NR_VSTATE_GET_BINARY_MINVER()`](m4/not-autoversion.m4#L1031) -* [`NR_VSTATE_GET_BINARY_MICVER()`](m4/not-autoversion.m4#L1053) -* [`NR_VSTATE_GET_LIBTOOL_VERSION_INFO()`](m4/not-autoversion.m4#L1075) -* [`NR_VSTATE_GET_INTERFACE_NUM()`](m4/not-autoversion.m4#L1096) -* [`NR_VSTATE_GET_INTERFACES_SUPPORTED()`](m4/not-autoversion.m4#L1119) -* [`NR_VSTATE_GET_IMPLEMENTATION_NUM()`](m4/not-autoversion.m4#L1144) -* [`NR_VSTATE_GET_SOURCE_AGE()`](m4/not-autoversion.m4#L1168) -* [`NC_AUTOVERSION_SUBSTITUTIONS`](m4/not-autoversion.m4#L1190) +* [`NR_HISTORY_EVENTS`](m4/not-autoversion.m4#L410) +* [`NR_HISTORY_GET_EVENT_VSTATE()`](m4/not-autoversion.m4#L417) +* [`NR_HISTORY_CURRENT_EVENT_NAME`](m4/not-autoversion.m4#L451) +* [`NR_HISTORY_CURRENT_VSTATE`](m4/not-autoversion.m4#L458) +* [`NR_PROJECT_MAJVER`](m4/not-autoversion.m4#L465) +* [`NR_PROJECT_MINVER`](m4/not-autoversion.m4#L472) +* [`NR_PROJECT_MICVER`](m4/not-autoversion.m4#L479) +* [`NR_PROJECT_VERSION`](m4/not-autoversion.m4#L486) +* [`NR_BINARY_MAJVER`](m4/not-autoversion.m4#L493) +* [`NR_BINARY_MINVER`](m4/not-autoversion.m4#L501) +* [`NR_BINARY_MICVER`](m4/not-autoversion.m4#L508) +* [`NR_BINARY_VERSION`](m4/not-autoversion.m4#L515) +* [`NR_INTERFACE_NUM`](m4/not-autoversion.m4#L522) +* [`NR_INTERFACES_SUPPORTED`](m4/not-autoversion.m4#L529) +* [`NR_IMPLEMENTATION_NUM`](m4/not-autoversion.m4#L536) +* [`NR_LIBTOOL_VERSION_INFO`](m4/not-autoversion.m4#L543) +* [`NR_SOURCE_AGE`](m4/not-autoversion.m4#L550) +* [`NR_BUMP_VSTATE()`](m4/not-autoversion.m4#L559) +* [`NR_GET_EVENT_VSTATE()`](m4/not-autoversion.m4#L625) +* [`NR_FOR_EACH_EVENT()`](m4/not-autoversion.m4#L676) +* [`NR_HISTORY_FOR_EACH_EVENT()`](m4/not-autoversion.m4#L794) +* [`NR_VSTATE_GET_PROJECT_VERSION()`](m4/not-autoversion.m4#L902) +* [`NR_VSTATE_GET_PROJECT_MAJVER()`](m4/not-autoversion.m4#L924) +* [`NR_VSTATE_GET_PROJECT_MINVER()`](m4/not-autoversion.m4#L946) +* [`NR_VSTATE_GET_PROJECT_MICVER()`](m4/not-autoversion.m4#L968) +* [`NR_VSTATE_GET_BINARY_VERSION()`](m4/not-autoversion.m4#L990) +* [`NR_VSTATE_GET_BINARY_MAJVER()`](m4/not-autoversion.m4#L1010) +* [`NR_VSTATE_GET_BINARY_MINVER()`](m4/not-autoversion.m4#L1034) +* [`NR_VSTATE_GET_BINARY_MICVER()`](m4/not-autoversion.m4#L1056) +* [`NR_VSTATE_GET_LIBTOOL_VERSION_INFO()`](m4/not-autoversion.m4#L1078) +* [`NR_VSTATE_GET_INTERFACE_NUM()`](m4/not-autoversion.m4#L1099) +* [`NR_VSTATE_GET_INTERFACES_SUPPORTED()`](m4/not-autoversion.m4#L1122) +* [`NR_VSTATE_GET_IMPLEMENTATION_NUM()`](m4/not-autoversion.m4#L1147) +* [`NR_VSTATE_GET_SOURCE_AGE()`](m4/not-autoversion.m4#L1171) +* [`NC_AUTOVERSION_SUBSTITUTIONS`](m4/not-autoversion.m4#L1193) ## [`m4/not-autoreconf.m4`](m4/not-autoreconf.m4)