diff --git a/configure.ac b/configure.ac index 023753457..0521a8441 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,13 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT +m4_define([VER_MAJOR], [14]) +m4_define([VER_MINOR], [0]) +m4_define([VER_EXTRA], [stable]) +AC_INIT([iverilog], [VER_MAJOR.VER_MINOR (VER_EXTRA)]) +AC_SUBST([VERSION_MAJOR], [VER_MAJOR]) +AC_SUBST([VERSION_MINOR], [VER_MINOR]) +AC_SUBST([VERSION_EXTRA], [" (VER_EXTRA)"]) +AC_SUBST([VERSION], ["VER_MAJOR.VER_MINOR (VER_EXTRA)"]) + AC_CONFIG_SRCDIR([netlist.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_HEADERS([_pli_types.h]) @@ -366,5 +374,5 @@ then AC_MSG_ERROR(cannot configure white space in libdir: $libdir) fi AC_MSG_RESULT(ok) -AC_CONFIG_FILES([Makefile ivlpp/Makefile vhdlpp/Makefile vvp/Makefile vpi/Makefile driver/Makefile driver-vpi/Makefile cadpli/Makefile libveriuser/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-vvp/Makefile tgt-vhdl/Makefile tgt-fpga/Makefile tgt-verilog/Makefile tgt-pal/Makefile tgt-vlog95/Makefile tgt-pcb/Makefile tgt-blif/Makefile tgt-sizer/Makefile]) +AC_CONFIG_FILES([Makefile ivlpp/Makefile vhdlpp/Makefile vvp/Makefile vpi/Makefile driver/Makefile driver-vpi/Makefile cadpli/Makefile libveriuser/Makefile tgt-null/Makefile tgt-stub/Makefile tgt-vvp/Makefile tgt-vhdl/Makefile tgt-fpga/Makefile tgt-verilog/Makefile tgt-pal/Makefile tgt-vlog95/Makefile tgt-pcb/Makefile tgt-blif/Makefile tgt-sizer/Makefile version_base.h]) AC_OUTPUT diff --git a/scripts/CREATE_BRANCH.sh b/scripts/CREATE_BRANCH.sh index e35546072..9e717e062 100644 --- a/scripts/CREATE_BRANCH.sh +++ b/scripts/CREATE_BRANCH.sh @@ -27,7 +27,8 @@ case $1 in esac major=$1 - +minor=0 +extra="stable" branch="v${major}-branch" branch_exists=`git ls-remote --heads origin $branch` @@ -39,10 +40,11 @@ fi echo "Creating branch $branch" git checkout -b $branch -echo "Updating version_base.h..." -sed -i -E "s/(define\s+VERSION_MAJOR\s+).*/\1$major/" version_base.h -sed -i -E "s/(define\s+VERSION_MINOR\s+).*/\10/" version_base.h -sed -i -E "s/(define\s+VERSION_EXTRA\s+).*/\1\" \(stable\)\"/" version_base.h +file=configure.ac +echo "Updating $file..." +sed -i -E "s/(m4_define\(\[VER_MAJOR\],[[:space:]]*\[)[^]]*(\]\))/\1$major\2/" $file +sed -i -E "s/(m4_define\(\[VER_MINOR\],[[:space:]]*\[)[^]]*(\]\))/\1$minor\2/" $file +sed -i -E "s/(m4_define\(\[VER_EXTRA\],[[:space:]]*\[)[^]]*(\]\))/\1$extra\2/" $file echo "Updating aclocal.m4..." sed -i -E "s/(install_suffix='-)dev/\1$major/" aclocal.m4 diff --git a/version_base.h b/version_base.h.in similarity index 76% rename from version_base.h rename to version_base.h.in index 46b0e93eb..a0064332c 100644 --- a/version_base.h +++ b/version_base.h.in @@ -3,14 +3,14 @@ * Edit this definition in version_base.in to define the base version * number for the compiled result. */ -# define VERSION_MAJOR 14 -# define VERSION_MINOR 0 +#define VERSION_MAJOR @VERSION_MAJOR@ +#define VERSION_MINOR @VERSION_MINOR@ /* * This will be appended to the version. Use this to mark development * versions and the like. */ -# define VERSION_EXTRA " (devel)" +# define VERSION_EXTRA "@VERSION_EXTRA@" # define VERSION_STRINGIFY(x) #x # define VERSION_STR(a,b,extra) VERSION_STRINGIFY(a.b) extra