Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
##

ACLOCAL_AMFLAGS = -I m4

include build_support/catalog/catalog.am

EXTRA_DIST = \
Expand Down Expand Up @@ -348,11 +346,8 @@ if WITH_GUI
bin_PROGRAMS = gambit
endif

# Read version from GAMBIT_VERSION file for use in compilation
GAMBIT_VERSION = $(shell cat $(top_srcdir)/build_support/GAMBIT_VERSION)

# Define VERSION for all C++ compilations and set include paths
AM_CPPFLAGS = -I$(top_srcdir)/src -DVERSION=\"$(GAMBIT_VERSION)\"
AM_CPPFLAGS = -I$(top_srcdir)/src -DVERSION=\"$(VERSION)\"

AM_CXXFLAGS = ${LLVM_CXXFLAGS}

Expand Down Expand Up @@ -485,6 +480,6 @@ msw-msi:
light -ext WixUIExtension gambit.wixobj

clang-tidy:
clang-tidy ${top_srcdir}/src/core/*.cc -- --std=c++20 -I ${top_srcdir}/src -DVERSION=\"$(GAMBIT_VERSION)\"
clang-tidy ${top_srcdir}/src/games/*.cc ${top_srcdir}/src/games/*/*.cc -- --std=c++20 -I ${top_srcdir}/src -DVERSION=\"$(GAMBIT_VERSION)\"
clang-tidy ${top_srcdir}/src/solvers/*/*.cc -- --std=c++20 -I ${top_srcdir}/src -DVERSION=\"$(GAMBIT_VERSION)\"
clang-tidy ${top_srcdir}/src/core/*.cc -- --std=c++20 -I ${top_srcdir}/src -DVERSION=\"$(VERSION)\"
clang-tidy ${top_srcdir}/src/games/*.cc ${top_srcdir}/src/games/*/*.cc -- --std=c++20 -I ${top_srcdir}/src -DVERSION=\"$(VERSION)\"
clang-tidy ${top_srcdir}/src/solvers/*/*.cc -- --std=c++20 -I ${top_srcdir}/src -DVERSION=\"$(VERSION)\"
2 changes: 0 additions & 2 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,6 @@ AC_DEFUN([AM_PATH_WXRC],
# and this notice are preserved. This file is offered as-is, without any
# warranty.

#serial 18

dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro
dnl (serial version number 13).

Expand Down
4 changes: 1 addition & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ dnl
AC_INIT([gambit],[m4_esyscmd_s([cat build_support/GAMBIT_VERSION])])
AC_CONFIG_SRCDIR([src/gambit.h])
AM_INIT_AUTOMAKE([subdir-objects foreign])
dnl AC_CONFIG_MACRO_DIR([m4])
AM_OPTIONS_WXCONFIG

dnl User-specified options
Expand All @@ -50,7 +49,6 @@ dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
dnl LT_INIT
AM_PROG_CC_C_O
MINGW_AC_WIN32_NATIVE_HOST
AM_CONDITIONAL(IS_WIN32, [test x$mingw_cv_win32_host = xyes])
Expand Down Expand Up @@ -149,7 +147,7 @@ AC_SUBST(WX_CXXFLAGS)
REZFLAGS=`echo $CXXFLAGS $WX_CXXFLAGS | sed 's/-mthreads//g' | sed 's/-g//g' | sed 's/-O. / /g' | sed 's/-I/--include-dir /g'`
AC_SUBST(REZFLAGS)

GAMBIT_VERSION=`cat build_support/GAMBIT_VERSION`
GAMBIT_VERSION=$VERSION
AC_SUBST(GAMBIT_VERSION)

dnl WiX requires the Product/@Version attribute to be a purely numeric
Expand Down
16 changes: 15 additions & 1 deletion doc/developer.contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,21 @@ When making a new release of Gambit, follow these steps:
- `doc/conf.py` reads from GAMBIT_VERSION file at documentation build time
- Documentation pages reference the `|release|` substitution variable to automatically reflect the updated version number.

The Windows ``.msi`` installer is the one exception: Windows Installer's ``ProductVersion``
.. note::

The C++ build is the one case that does *not* pick up the change automatically.
``configure.ac`` embeds the version via ``AC_INIT`` at *autoconf-generation* time,
not at ``./configure``-run time, so the version baked into the ``configure`` script
(and from there into ``make dist`` tarball names, ``Makefile``, and the compiled
binaries) stays stale until ``configure`` is regenerated. Autoconf's own
``autom4te.cache`` can also serve a stale cached expansion even when you do
regenerate, since it isn't aware that ``configure.ac`` depends on the contents of
``GAMBIT_VERSION``. After editing ``GAMBIT_VERSION``, always force a full
regeneration before building or running ``make dist``::

rm -rf autom4te.cache && autoreconf -fi

The Windows ``.msi`` installer is another exception: Windows Installer's ``ProductVersion``
must be a plain numeric ``major.minor.build`` triple. So, ``configure.ac`` derives a separate
``GAMBIT_MSI_VERSION`` for ``gambit.wxs`` instead of substituting ``GAMBIT_VERSION`` directly.
The build field is banded by release stage so that alpha < beta < rc < the final release of
Expand Down
Loading