Skip to content

Commit

Permalink
buildsys: remove compatibility mode (#5522)
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored Nov 22, 2023
1 parent 2d9a8db commit 9a21937
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 77 deletions.
3 changes: 1 addition & 2 deletions GNUmakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 0 additions & 16 deletions Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -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
########################################################################
Expand Down
22 changes: 0 additions & 22 deletions README.buildsys.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 0 additions & 9 deletions cnf/compat/gap.sh.in

This file was deleted.

1 change: 0 additions & 1 deletion cnf/compat/gmp.h.in

This file was deleted.

31 changes: 4 additions & 27 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9a21937

Please sign in to comment.