Re: Newlib's .texi docs - outdated version number/date
Brian Inglis <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Organization | Inglis |
| Message-ID | <[email protected]> |
On 2023-03-30 06:11, Corinna Vinschen wrote:
> On Mar 30 11:16, Tobias Burnus wrote:
>> On 30.03.23 11:07, Corinna Vinschen wrote:
>>> On Mar 30 09:28, Tobias Burnus wrote:
>>>> Someone over here stumbled over the version/date mismatch between what is shown
>>>> in the libc/libm manuals - and what is the current newlib release.
>>>> ...
>>>> ... Thus, blindly bumping the version/date seems to be at least more
>>>> consistent than not updating it at all.
>>>>
>>>> Thoughts?
>>> Sounds good. Please send a patch in git format-patch style.
>>
>> Done now.
>
> Pushed, thanks!
>
> It would be nice if we could automate this...
How about - there are 2 real \n in the sed commands:
$ grep '@subtitle' lib[cm]/lib[cm].texi
libc/libc.texi:@subtitle Full Configuration
libc/libc.texi:@subtitle @code{libc} 2.5.0
libc/libc.texi:@subtitle December 2016
libm/libm.texi:@subtitle @code{libm} 2.5.0
libm/libm.texi:@subtitle December 2016
$ sed_fmt='/^\(@subtitle\s\).*20[0-9][0-9].*$/s!!\1%(creatordate:format:%F)!
/^\(@subtitle\s@code{lib[cm]}\s\)[1-9]\+[-_.][0-9]\+[-_.][0-9]\+$/s!!\1%(refname:short)!
/^\(@subtitle\s@code{lib[cm]}\s\)newlib-\([1-9]\+[-_.][0-9]\+[-_.][0-9]\+\)$/s!!\1\2!'
$ git tag -l --format="$sed_fmt" 'newlib-[1-9][-_.].[0-9][-_.][0-9]' \
| tail -n3 | sed -f - -i lib[cm]/lib[cm].texi
$ grep '@subtitle' lib[cm]/lib[cm].texi libc/libc.texi:@subtitle
Full Configuration
libc/libc.texi:@subtitle @code{libc} 4.3.0
libc/libc.texi:@subtitle 2023-01-20
libm/libm.texi:@subtitle @code{libm} 4.3.0
libm/libm.texi:@subtitle 2023-01-20
$ sed_fmt='/^\(@subtitle\s\).*20[0-9][0-9].*$/s!!\1%(creatordate:format:%B %Y)!
/^\(@subtitle\s@code{lib[cm]}\s\)[1-9]\+[-_.][0-9]\+[-_.][0-9]\+$/s!!\1%(refname:short)!
/^\(@subtitle\s@code{lib[cm]}\s\)newlib-\([1-9]\+[-_.][0-9]\+[-_.][0-9]\+\)$/s!!\1\2!'
$ git tag -l --format="$sed_fmt" 'newlib-[1-9][-_.][0-9][-_.][0-9]' \
| tail -n3 | sed -f - -i lib[cm]/lib[cm].texi
$ grep '@subtitle' lib[cm]/lib[cm].texi libc/libc.texi:@subtitle
Full Configuration
libc/libc.texi:@subtitle @code{libc} 4.3.0
libc/libc.texi:@subtitle January 2023
libm/libm.texi:@subtitle @code{libm} 4.3.0
libm/libm.texi:@subtitle January 2023
Where to put it: git hook reference-transaction("committed") with stdin matching
'ZEROID REFOID refs/tags/newlib-[1-9]\+[-_.][0-9]\+[-_.][0-9]\+', part of some
release process, or in a script?
Elsewhere like assuming git in doc/Makefile.inc, or hook for commit of
newlib/acinclude.m4 with any line matching '^AC_DEFUN([DEF_NEWLIB_.*_VERSION]'
where value ',[.*]))$' changes would seem to be more problematic.
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry