Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move GAP kernel version to configure script #2873

Merged
merged 1 commit into from
Sep 28, 2018
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
4 changes: 4 additions & 0 deletions GNUmakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ GC_SOURCES = @GC_SOURCES@
COMPAT_MODE = @COMPAT_MODE@
GAPARCH = @GAPARCH@

# GAP kernel version
GAP_KERNEL_MINOR_VERSION = @gap_kernel_minor_version@
GAP_KERNEL_MAJOR_VERSION = @gap_kernel_major_version@

# autoconf package metadata
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
Expand Down
3 changes: 3 additions & 0 deletions Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,9 @@ sysinfo.gap: config.status $(srcdir)/Makefile.rules cnf/GAP-CFLAGS cnf/GAP-CPPFL
@echo "GAP_HPCGAP=$(HPCGAP)" >> $@
@echo "GAP_ADDGUARDS2=$(ADDGUARDS2)" >> $@
@echo "" >> $@
@echo "GAP_KERNEL_MAJOR_VERSION=$(GAP_KERNEL_MAJOR_VERSION)" >> $@
@echo "GAP_KERNEL_MINOR_VERSION=$(GAP_KERNEL_MINOR_VERSION)" >> $@
@echo "" >> $@
@echo "GAP_BIN_DIR=\"$(abs_builddir)\"" >> $@
@echo "GAP_LIB_DIR=\"$(abs_srcdir)\"" >> $@
@echo "" >> $@
Expand Down
16 changes: 14 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -575,13 +575,25 @@ AS_IF([test "x$with_gc" = xboehm],
]
)

dnl
dnl Define kernel version
dnl


gap_kernel_major_version=5
gap_kernel_minor_version=0
AC_SUBST([gap_kernel_major_version])
AC_SUBST([gap_kernel_minor_version])

AC_DEFINE_UNQUOTED([GAP_KERNEL_MAJOR_VERSION], $gap_kernel_major_version, [The major version of the kernel ABI])
AC_DEFINE_UNQUOTED([GAP_KERNEL_MINOR_VERSION], $gap_kernel_minor_version, [The minor version of the kernel ABI])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we do this, we might as well start using this to version the libgap shared library, by passing.Not at all saying this should be done in this PR (it's a bit tricky to get semantically right, though not much if one takes the time to read the explanations on what the arguments mean), just wanted to mention it -- we could file an issue for that idea, then somebody (possibly me) can one day look into it.


dnl
dnl User setting: Compatibility mode (on by default)
dnl
AS_IF([test "x$enable_hpcgap" = xyes],
[GAPARCH="$host-hpcgap${ABI}"],
[GAPARCH="$host-default${ABI}"])
[GAPARCH="$host-hpcgap${ABI}-kv${gap_kernel_major_version}"],
[GAPARCH="$host-default${ABI}-kv${gap_kernel_major_version}"])
AS_IF([test "x$ARCHEXT" != "x"],
[GAPARCH="$GAPARCH-$ARCHEXT"])
AS_IF([test "x$ARCH" != "x"],
Expand Down
5 changes: 3 additions & 2 deletions src/modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@
**
*/

#define GAP_KERNEL_MAJOR_VERSION 5
#define GAP_KERNEL_MINOR_VERSION 0
// GAP_KERNEL_MAJOR_VERSION and GAP_KERNEL_MINOR_VERSION are defined in
// config.h

#define GAP_KERNEL_API_VERSION \
((GAP_KERNEL_MAJOR_VERSION)*1000 + (GAP_KERNEL_MINOR_VERSION))

Expand Down