diff --git a/sm5/CHANGELOG b/sm5/CHANGELOG
index 72e7c8b2907cc60f9ed44454d92697bb3fb48426..d3ad4541cb22fc92dd286c20a8ba9f57ee4cadf9 100644
--- a/sm5/CHANGELOG
+++ b/sm5/CHANGELOG
@@ -1,6 +1,6 @@
 CHANGELOG for smartmontools
 
-$Id: CHANGELOG,v 1.37 2002/11/07 11:00:55 ballen4705 Exp $
+$Id: CHANGELOG,v 1.38 2002/11/07 11:28:17 ballen4705 Exp $
 
 Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
 
@@ -27,6 +27,9 @@ CURRENT RELEASE (see VERSION file in this directory):
 
 smartmontools-5.0.31
 
+  Changed Makefile so that the -V option does not reflect file state
+  before commit!
+
   smartctl: added new options -W, -U, and -P to control if and how the
   smartctl exits if an error is detected in either a SMART data
   structure checksum, or a SMART command returns an error.
diff --git a/sm5/Makefile b/sm5/Makefile
index 8cffc41849ed7f8268fbac2f0049e7c915159fd1..3b2cf3b94280d439029a209dc9856f6ae38a9bbe 100644
--- a/sm5/Makefile
+++ b/sm5/Makefile
@@ -2,7 +2,7 @@
 #
 # Home page: http://smartmontools.sourceforge.net
 #
-# $Id: Makefile,v 1.33 2002/11/04 08:47:38 ballen4705 Exp $
+# $Id: Makefile,v 1.34 2002/11/07 11:28:17 ballen4705 Exp $
 #
 # Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
 # 
@@ -115,6 +115,12 @@ uninstall:
 # All this mess is to automatically increment the release numbers.
 # The number of the next release is kept in the file "VERSION"
 release:
+	cat smartmontools.spec | sed '/Release:/d' > temp.spec
+	echo "Release: " $(counter) > temp.version
+	cat temp.version temp.spec > smartmontools.spec
+	rm -f temp.spec temp.version
+	. cvs-script && cvs commit -m "release $(counter)"
+	. cvs-script && cvs tag -d "RELEASE_5_0_$(counter)" && cvs tag "RELEASE_5_0_$(counter)"
 	rm -rf $(pkgname)
 	mkdir $(pkgname)
 	cp -a $(releasefiles) $(pkgname)
@@ -123,10 +129,6 @@ release:
 	tar zcvf $(pkgname2).tar.gz $(pkgname2)
 	rm -rf $(pkgname2)
 	mv -f $(pkgname).tar.gz /usr/src/redhat/SOURCES/
-	cat smartmontools.spec | sed '/Release:/d' > temp.spec
-	echo "Release: " $(counter) > temp.version
-	cat temp.version temp.spec > smartmontools.spec
-	rm -f temp.spec temp.version
 	rpm -ba smartmontools.spec
 	mv /usr/src/redhat/RPMS/i386/$(pkgname)*.rpm .
 	mv /usr/src/redhat/SRPMS/$(pkgname)*rpm .
diff --git a/sm5/smartmontools.spec b/sm5/smartmontools.spec
index 166398eb76b83fa559690dda7a710ded2cd1eafd..7730323cd88a09a02dd14f5b1a03b874fb4109b3 100644
--- a/sm5/smartmontools.spec
+++ b/sm5/smartmontools.spec
@@ -27,7 +27,7 @@ Packager:       Bruce Allen <smartmontools-support@lists.sourceforge.net>
 # http://ftp1.sourceforge.net/smartmontools/smartmontools-%{version}-%{release}.tar.gz
 
 # CVS ID of this file is:
-# $Id: smartmontools.spec,v 1.47 2002/11/07 11:00:56 ballen4705 Exp $
+# $Id: smartmontools.spec,v 1.48 2002/11/07 11:28:17 ballen4705 Exp $
 
 # Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
 # Home page: http://smartmontools.sourceforge.net/
@@ -214,6 +214,8 @@ fi
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * Thu Nov 7 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
+- Changed Makefile so that the -V option does not reflect file state
+  before commit!
 - modified .spec file so that locale information now contains
   character set definition.   Changed pt_BR to pt since we do not use any
   aspect other than language.  See man setlocale.