From 9a21937bedaf57a583175996d87a88fb23b4c47b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 22 Nov 2023 17:56:23 +0100 Subject: [PATCH] buildsys: remove compatibility mode (#5522) --- GNUmakefile.in | 3 +-- Makefile.rules | 16 ---------------- README.buildsys.md | 22 ---------------------- cnf/compat/gap.sh.in | 9 --------- cnf/compat/gmp.h.in | 1 - configure.ac | 31 ++++--------------------------- 6 files changed, 5 insertions(+), 77 deletions(-) delete mode 100755 cnf/compat/gap.sh.in delete mode 100644 cnf/compat/gmp.h.in diff --git a/GNUmakefile.in b/GNUmakefile.in index 7b85ee8730..2d4d2f050e 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -22,8 +22,7 @@ HPCGAP = @HPCGAP@ # garbage collector source files GC_SOURCES = @GC_SOURCES@ -# compatibility mode -COMPAT_MODE = @COMPAT_MODE@ +# GAP architecture string GAPARCH = @GAPARCH@ # maintainer mode diff --git a/Makefile.rules b/Makefile.rules index 097906adb7..b5dbb4a3d5 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -905,22 +905,6 @@ sysinfo.gap: config.status $(srcdir)/Makefile.rules cnf/GAP-CFLAGS cnf/GAP-CPPFL @echo "$$sysinfo_gap" > $@ -######################################################################## -# Compatibility mode -# -# If enabled, we prepare the environment to look like it did with -# the old build system, thus enabling existing packages with kernel -# extensions to be compiled against this version of GAP/ -######################################################################## -ifeq ($(COMPAT_MODE),yes) - -# regenerate bin/gap.sh if necessary -all: bin/gap.sh -bin/gap.sh: $(srcdir)/cnf/compat/gap.sh.in config.status - $(SHELL) ./config.status $@ - -endif - ######################################################################## # Specifying GAP calls to use for the test suite and building manuals ######################################################################## diff --git a/README.buildsys.md b/README.buildsys.md index 7fe9dc2c45..f901ab62e7 100644 --- a/README.buildsys.md +++ b/README.buildsys.md @@ -55,8 +55,6 @@ can follow the standard procedure: to add or remove a kernel C source file, you need to add or remove its name here and only here. -* `bin/`: This directory is created for compatibility mode (see below). - * `cnf/`: All files in this directory are part of the build system. * `extern/`: External libraries we bundle with GAP (such as GMP) are @@ -113,26 +111,6 @@ and all the object files and the gap executable will be placed inside builddir. Your srcdir will remain untouched. -## Compatibility mode - -Compatibility mode emulates the build environment of the old GAP build system -in order to allow packages with kernel extensions to be used with the new -build system unmodified. As such, it mainly exists to ease the transition -between new and old build system, and the plan is to remove it once all -packages have been adapted to the new build system. However, that is still -far off. - -Compatibility mode does the following things: - -* create a `bin/gap.sh` shell script invoking `gap` -* ... - -For now, using compatibility mode is required if one wants to build the -kernel extension for most packages which have one. In the future, we will -provide an alternative way to do this, and also will extend `gac` to -cleanly supported building kernel extensions. - - ## Dependency tracking The build system tracks dependencies between files, such as between C source and diff --git a/cnf/compat/gap.sh.in b/cnf/compat/gap.sh.in deleted file mode 100755 index dfc659827c..0000000000 --- a/cnf/compat/gap.sh.in +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -GAP_EXE=$GAP_DIR -if [ "x$GAP_DIR" = "x" ]; then - GAP_DIR=$(cd "@abs_top_srcdir@" && pwd) - GAP_EXE="@abs_top_builddir@" -fi - -exec "$GAP_EXE/gap" -l "$GAP_DIR" "$@" diff --git a/cnf/compat/gmp.h.in b/cnf/compat/gmp.h.in deleted file mode 100644 index 45aa84fe89..0000000000 --- a/cnf/compat/gmp.h.in +++ /dev/null @@ -1 +0,0 @@ -#include "@abs_top_builddir@/extern/install/gmp/include/gmp.h" diff --git a/configure.ac b/configure.ac index 6b2dd1ff9f..0488cce007 100644 --- a/configure.ac +++ b/configure.ac @@ -44,6 +44,10 @@ AC_CONFIG_AUX_DIR([cnf]) AC_CONFIG_HEADERS([build/config.h:src/config.h.in]) AC_CONFIG_COMMANDS([build/stamp-h], [echo timestamp > build/stamp-h]) +AS_IF([test "x$srcdir" = x.], + [AC_MSG_NOTICE([in-tree build])], + [AC_MSG_NOTICE([out-of-tree build])]) + dnl note that the final version used by the GAP kernel is GAP_BUILD_VERSION dnl and is computed by cnf/gap-version-gen.sh, which takes git commit hashes into dnl account to produce a more fine-grained version string for GAP development @@ -932,33 +936,6 @@ AC_MSG_RESULT([${GAPARCH}]) AC_DEFINE_UNQUOTED([GAPARCH], ["$GAPARCH"], [the GAP architecture, for kernel extensions]) AC_SUBST([GAPARCH]) -dnl -dnl User setting: Compatibility mode (on by default) -dnl -AC_ARG_ENABLE([compat-mode], - [AS_HELP_STRING([--disable-compat-mode], [enable compatibility mode])], - [], - [enable_compat_mode=yes] - ) -AC_MSG_CHECKING([whether to enable compatibility mode for packages]) -AC_MSG_RESULT([$enable_compat_mode]) - -AC_SUBST([COMPAT_MODE], [$enable_compat_mode]) -AS_IF([test "x$enable_compat_mode" = xyes], - [ - AC_CONFIG_FILES([bin/gap.sh:cnf/compat/gap.sh.in], [chmod +x bin/gap.sh]) - AS_IF([test x$BUILD_GMP = xyes],[ - AC_CONFIG_FILES([bin/$GAPARCH/extern/gmp/include/gmp.h:cnf/compat/gmp.h.in]) - ]) - AS_IF([test "x$srcdir" = x.], - [ - AC_MSG_NOTICE([in-tree build]) - ], - [ - AC_MSG_NOTICE([out-of-tree build]) - ]) - ]) - dnl dnl Detect host specific setting