diff --git a/Makefile.in b/Makefile.in index f19214c9..1ae01b2b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -431,7 +431,7 @@ chunk.o: chunk.c conf.h settings.h dmalloc.h append.h chunk.h chunk_loc.h \ error.h error_val.h heap.h compat.o: compat.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h dmalloc.o: dmalloc.c conf.h settings.h dmalloc_argv.h dmalloc.h append.h \ - compat.h debug_tok.h dmalloc_loc.h env.h error_val.h version.h + compat.h debug_tok.h dmalloc_loc.h env.h error_val.h dmalloc_argv.o: dmalloc_argv.c conf.h settings.h append.h dmalloc_argv.h \ dmalloc_argv_loc.h compat.h dmalloc_fc_t.o: dmalloc_fc_t.c conf.h settings.h dmalloc.h dmalloc_argv.h \ @@ -445,7 +445,7 @@ dmalloc_tab.o: dmalloc_tab.c conf.h settings.h append.h chunk.h compat.h \ env.o: env.c conf.h settings.h dmalloc.h append.h compat.h dmalloc_loc.h \ debug_tok.h env.h error.h error.o: error.c conf.h settings.h dmalloc.h append.h chunk.h compat.h \ - debug_tok.h dmalloc_loc.h env.h error.h error_val.h version.h + debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.o: heap.c conf.h settings.h dmalloc.h append.h chunk.h compat.h \ debug_tok.h dmalloc_loc.h error.h error_val.h heap.h protect.o: protect.c conf.h settings.h dmalloc.h dmalloc_loc.h error.h \ @@ -458,7 +458,7 @@ chunk_th.o: chunk.c conf.h settings.h dmalloc.h append.h chunk.h chunk_loc.h \ dmalloc_loc.h compat.h debug_tok.h dmalloc_rand.h dmalloc_tab.h \ error.h error_val.h heap.h error_th.o: error.c conf.h settings.h dmalloc.h append.h chunk.h compat.h \ - debug_tok.h dmalloc_loc.h env.h error.h error_val.h version.h + debug_tok.h dmalloc_loc.h env.h error.h error_val.h user_malloc_th.o: user_malloc.c conf.h settings.h dmalloc.h append.h chunk.h \ compat.h debug_tok.h dmalloc_loc.h env.h error.h error_val.h heap.h \ user_malloc.h return.h diff --git a/BUILD.txt b/RELEASE.txt similarity index 64% rename from BUILD.txt rename to RELEASE.txt index 66e76c3d..0adec107 100644 --- a/BUILD.txt +++ b/RELEASE.txt @@ -2,11 +2,16 @@ The following set of tasks should be performed when the dmalloc library gets released. -1) Update the version number in version.h and where else it lists. -2) Update the ChangeLog file. -3) Update doc files: make docs -4) Consider updating the copyright heads in all files and in chunk.c strings. -5) Run autoconf to make sure configure up to date. +1) Update the ChangeLog file with the release date. +2) Run autoconf to make sure configure up to date. +3) Update the version numbers in the following files: + Changlog + README.md + configure.ac (in AC_INIT) + dmalloc.spec + dmalloc.texi +4) Update doc files: make docs +5) Consider updating the copyright heads in all files and in chunk.c strings. 6) Check in all files. 7) Run tests: - [ maybe mkdir x ; cd x ] @@ -20,12 +25,12 @@ The following set of tasks should be performed when the dmalloc library gets rel 8) Clone on linux and others and run tests: git clone git@github.com:j256/dmalloc.git 9) Run release.sh script. It will run tests on repo. 11) git tag the release: - git tag dmalloc_release_X_X_X - git push origin dmalloc_release_X_X_X + git tag dmalloc_release_X_X_X + git push origin dmalloc_release_X_X_X 12) create release on github for X.X.X from that tag 13) Upload tgz file as part of that release -14) Install the tgz file and html file in the dmalloc.com repo +14) Install the tgz file in the dmalloc.com repo 15) Edit releases/index.html to include the new version -16) Go to the /docs dir and run the explode-docs.sh script. +16) Go to the docs subdir and run the explode-docs.sh script. ------------------------------------------------------------------------------- diff --git a/configure b/configure index cf2f3dad..909c9abb 100755 --- a/configure +++ b/configure @@ -2408,8 +2408,17 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers conf.h" -{ $as_echo "$as_me:${as_lineno-$LINENO}: configurations for the dmalloc library" >&5 -$as_echo "$as_me: configurations for the dmalloc library" >&6;} +dmalloc_version_major=`echo $PACKAGE_VERSION | sed -e 's/\.[0-9][0-9]*\.[0-9][0-9]*$//'` +export dmalloc_version_major +export dmalloc_version_minor=`echo $PACKAGE_VERSION | sed -e 's/^[0-9][0-9]*\.//' | sed -e 's/\.[0-9][0-9]*$//'` +export dmalloc_version_minor +export dmalloc_version_patch=`echo $PACKAGE_VERSION | sed -e 's/^[0-9][0-9]*\.[0-9][0-9]*\.//'` +export dmalloc_version_patch +dmalloc_version="${dmalloc_version_major}.${dmalloc_version_minor}.${dmalloc_version_patch}" +export dmalloc_version + +{ $as_echo "$as_me:${as_lineno-$LINENO}: configurations for the dmalloc library version $dmalloc_version" >&5 +$as_echo "$as_me: configurations for the dmalloc library version $dmalloc_version" >&6;} ############################################################################## # arguments @@ -7231,6 +7240,13 @@ else echo "#define DMALLOC_STDARG 0" >> $newfile.t fi echo '' >> $newfile.t +echo '/* dmalloc version defines */' >> $newfile.t +echo "#define DMALLOC_VERSION_MAJOR ${dmalloc_version_major} /* X.0.0 */" >> $newfile.t +echo "#define DMALLOC_VERSION_MINOR ${dmalloc_version_minor} /* 0.X.0 */" >> $newfile.t +echo "#define DMALLOC_VERSION_PATCH ${dmalloc_version_patch} /* 0.0.X */" >> $newfile.t +echo '' >> $newfile.t +echo "static char *dmalloc_version = \"${dmalloc_version}\";" >> $newfile.t +echo '' >> $newfile.t if cmp -s $newfile $newfile.t 2>/dev/null; then { $as_echo "$as_me:${as_lineno-$LINENO}: $newfile is unchanged" >&5 $as_echo "$as_me: $newfile is unchanged" >&6;} diff --git a/configure.ac b/configure.ac index a412ba5a..6475da73 100644 --- a/configure.ac +++ b/configure.ac @@ -18,11 +18,21 @@ # # The author may be contacted via http://dmalloc.com/ # + AC_INIT(dmalloc, 5.6.4, [http://dmalloc.com/]) AC_CONFIG_SRCDIR(dmalloc.c) AC_CONFIG_HEADER(conf.h) -AC_MSG_NOTICE([configurations for the dmalloc library]) +dmalloc_version_major=`echo $PACKAGE_VERSION | sed -e '[s/\.[0-9][0-9]*\.[0-9][0-9]*$//]'` +export dmalloc_version_major +export dmalloc_version_minor=`echo $PACKAGE_VERSION | sed -e '[s/^[0-9][0-9]*\.//]' | sed -e '[s/\.[0-9][0-9]*$//]'` +export dmalloc_version_minor +export dmalloc_version_patch=`echo $PACKAGE_VERSION | sed -e '[s/^[0-9][0-9]*\.[0-9][0-9]*\.//]'` +export dmalloc_version_patch +dmalloc_version="${dmalloc_version_major}.${dmalloc_version_minor}.${dmalloc_version_patch}" +export dmalloc_version + +AC_MSG_NOTICE([configurations for the dmalloc library version $dmalloc_version]) ############################################################################## # arguments @@ -872,6 +882,13 @@ else echo "#define DMALLOC_STDARG 0" >> $newfile.t fi echo '' >> $newfile.t +echo '/* dmalloc version defines */' >> $newfile.t +echo "#define DMALLOC_VERSION_MAJOR ${dmalloc_version_major} /* X.0.0 */" >> $newfile.t +echo "#define DMALLOC_VERSION_MINOR ${dmalloc_version_minor} /* 0.X.0 */" >> $newfile.t +echo "#define DMALLOC_VERSION_PATCH ${dmalloc_version_patch} /* 0.0.X */" >> $newfile.t +echo '' >> $newfile.t +echo "static char *dmalloc_version = \"${dmalloc_version}\";" >> $newfile.t +echo '' >> $newfile.t if cmp -s $newfile $newfile.t 2>/dev/null; then AC_MSG_NOTICE([$newfile is unchanged]) rm -f $newfile.t diff --git a/dmalloc.c b/dmalloc.c index 405d7fad..a6dc20d2 100644 --- a/dmalloc.c +++ b/dmalloc.c @@ -52,7 +52,6 @@ #include "env.h" #include "error_val.h" #include "dmalloc_loc.h" -#include "version.h" #define HOME_ENVIRON "HOME" /* home directory */ #define SHELL_ENVIRON "SHELL" /* for the type of shell */ diff --git a/dmalloc.h.3 b/dmalloc.h.3 index 2322096b..77e869a9 100644 --- a/dmalloc.h.3 +++ b/dmalloc.h.3 @@ -1,9 +1,4 @@ -/* NOTE: start of dmalloc.h.4 */ - -/* dmalloc version defines */ -#define DMALLOC_VERSION_MAJOR 5 /* X.0.0 */ -#define DMALLOC_VERSION_MINOR 6 /* 0.X.0 */ -#define DMALLOC_VERSION_PATCH 4 /* 0.0.X */ +/* NOTE: start of dmalloc.h.3 */ /* this defines what type the standard void memory-pointer is */ #if (defined(__STDC__) && __STDC__ == 1) || defined(__cplusplus) || defined(STDC_HEADERS) || defined(_ISO_STDLIB_ISO_H) diff --git a/error.c b/error.c index 3a0bc90d..ddbaae92 100644 --- a/error.c +++ b/error.c @@ -72,7 +72,6 @@ #include "error.h" #include "error_val.h" #include "dmalloc_loc.h" -#include "version.h" #if LOCK_THREADS #if IDENT_WORKS diff --git a/release.sh b/release.sh index 1cb8bacb..8eda29c1 100644 --- a/release.sh +++ b/release.sh @@ -3,12 +3,31 @@ # Shell script if you are going to package the library up for release # -set -e - cwd=`pwd` -version=`grep dmalloc_version version.h | cut -f2 -d\"` +version=`grep dmalloc_version dmalloc.h.2 | cut -f2 -d\"` dir=dmalloc-$version +head -1 ChangeLog.txt | grep -q $version +if [ $? -ne 0 ]; then + echo "First line of ChangeLog.txt does not include version $version" + head -1 ChangeLog.txt + exit 1 +fi +grep -q "dmalloc_version Version $version" dmalloc.texi +if [ $? -ne 0 ]; then + echo "dmalloc.texi does not include version $version" + grep -q "dmalloc_version " dmalloc.texi + exit 1 +fi +grep -q "Version: $version" dmalloc.spec +if [ $? -ne 0 ]; then + echo "dmalloc.spec does not include version $version" + grep "Version: " dmalloc.spec + exit 1 +fi + +set -e + # run tests echo "Running tests" rm -rf $dir diff --git a/version.h b/version.h deleted file mode 100644 index 0fb1df85..00000000 --- a/version.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Version string for the library - * - * Copyright 2020 by Gray Watson - * - * This file is part of the dmalloc package. - * - * Permission to use, copy, modify, and distribute this software for - * any purpose and without fee is hereby granted, provided that the - * above copyright notice and this permission notice appear in all - * copies, and that the name of Gray Watson not be used in advertising - * or publicity pertaining to distribution of the document or software - * without specific, written prior permission. - * - * Gray Watson makes no representations about the suitability of the - * software described herein for any purpose. It is provided "as is" - * without express or implied warranty. - * - * The author may be contacted via http://dmalloc.com/ - */ - -#ifndef __VERSION_H__ -#define __VERSION_H__ - -/* - * NOTE to gray: whenever this is changed, a corresponding entry - * should be entered in: - * - * Changlog - * README.md - * configure.ac (in AC_INIT) - * dmalloc.spec - * dmalloc.texi - * dmalloc.h.3 (DMALLOC_VERSION defines at top of file) - */ -static char *dmalloc_version = "5.6.4" ; - -#endif /* ! __VERSION_H__ */