diff --git a/smartmontools/CHANGELOG b/smartmontools/CHANGELOG index 426341b016825344c25809b44525c5261090a545..4a351c2494051387ece82badb360cb96f17e1b96 100644 --- a/smartmontools/CHANGELOG +++ b/smartmontools/CHANGELOG @@ -42,6 +42,10 @@ NOTES FOR FUTURE RELEASES: see TODO file. <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> + [CF] Makefile.am: Use 'svnversion' instead of 'svn info' to get + the revision number. This also checks for mixed and modified + working copies. + [CF] Remove CVS Id strings from '-V, --version' output. [CF] Update CONTRIBUTORS section on man pages. diff --git a/smartmontools/Makefile.am b/smartmontools/Makefile.am index 7d5221cd6d89c928a302c85785379e88d774767c..0367a5a08d6c601f06ee72313b4661ff6b5fadda 100644 --- a/smartmontools/Makefile.am +++ b/smartmontools/Makefile.am @@ -281,16 +281,17 @@ if IS_SVN_BUILD # Get version info from SVN svnversion.h: CHANGELOG Makefile $(srcdir)/.svn/entries echo '/* svnversion.h. Generated by Makefile from svn info. */' > $@ - chg="`(cd $(srcdir) && svn status -q 2>/dev/null | sed 's,^.*$$,+,;q')`" && \ - (cd $(srcdir) && TZ= svn info 2>/dev/null ) \ - | sed -n 'h;s,^.* Rev: *\([^ ]*\)$$,REV "\1'"$$chg"'",p;s,^.* Date: *\([^ ]*\) .*$$,DATE "\1",p;g;s,^.* Date: *[^ ]* *\([^ ]*\) .*$$,TIME "\1",p' \ + (cd $(srcdir) \ + && svnversion 2>/dev/null | sed -n 's,^\([0-9].*\),REV "\1",p' \ + && TZ= svn info 2>/dev/null \ + | sed -n 'h;s,^.* Date: *\([^ ]*\) .*$$,DATE "\1",p;g;s,^.* Date: *[^ ]* *\([^ ]*\) .*$$,TIME "\1",p') \ | sed 's,^,#define SMARTMONTOOLS_SVN_,' >> $@ else # SVN not available, guess version info from Id strings svnversion.h: CHANGELOG Makefile echo '/* svnversion.h. Generated by Makefile from Id strings. */' > $@ - (cd $(srcdir) && cat Makefile.am configure.in smart*.in *.cpp *.h *.s) \ + (cd $(srcdir) && cat CHANGELOG Makefile.am configure.in smart*.in *.cpp *.h *.s) \ | sed -n 's,^.*\$$[I][d]: [^ ]* \([0-9][0-9]* [0-9][-0-9]* [0-9][:0-9]*\)[^:0-9][^$$]*\$$.*$$,\1,p' \ | sort -n -r \ | sed -n 'h;s,^\([^ ]*\) .*$$,REV "\1~",p;g;s,^[^ ]* \([^ ]*\) .*$$,DATE "\1",p;g;s,^[^ ]* [^ ]* \([^ ]*\)$$,TIME "\1",p;q' \ diff --git a/smartmontools/configure.in b/smartmontools/configure.in index 51cc1a61c0b9126a47ff7710f15d4c270ae3a7d8..1c4377325c28dfb1510c381e81e8ed880cd0b2fe 100644 --- a/smartmontools/configure.in +++ b/smartmontools/configure.in @@ -48,7 +48,7 @@ AC_MSG_CHECKING([whether this is a build from SVN]) is_svn_build=no if test -f "$srcdir/.svn/entries"; then is_svn_build=unknown - if (cd "$srcdir" && svn --version && svn info && svn status -q) >/dev/null 2>&1; then + if (cd "$srcdir" && svn --version && svnversion && svn info) >/dev/null 2>&1; then is_svn_build=yes fi fi