From 41a18654fb80a7c1aa49faac60499907d6d319e9 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 21 Jul 2025 20:38:57 +0200 Subject: [PATCH 1/2] build: override bundled libsemigroups install paths Fixes: #1073 --- GNUmakefile.in | 16 +++++++++------- configure.ac | 4 ---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index 054c3305f..a2905e932 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -1,6 +1,11 @@ # # Makefile rules for the semigroups package # +abs_top_builddir = @abs_top_builddir@ +top_builddir = @top_builddir@ +abs_builddir = @abs_builddir@ +builddir = @builddir@ + KEXT_NAME = semigroups KEXT_CXXFLAGS = @LIBSEMIGROUPS_CFLAGS@ -std=gnu++17 -O3 @@ -92,17 +97,14 @@ $(KEXT_OBJS): bin/include/libsemigroups/libsemigroups.hpp # the following is only run if BUILT_SOURCES is wound up bin/include/libsemigroups/libsemigroups.hpp: - $(MAKE) -C libsemigroups install + $(MAKE) -C libsemigroups install prefix='${abs_builddir}/bin' includedir='${abs_builddir}/bin/include' libdir='${abs_builddir}/bin/lib' # Cygwin only looks for DLLs in the same directory as the executable # resides in. The following achieves that assuming that the GAP # being used was self-compiled by the user. This supports # both older GAPs with libtool (first) and GAP without libtool (second) - # Additionally, we rebsae the dll with respect to the database to - # avoid fork conflicts - if test -f bin/bin/cygsemigroups*.dll ; then rebase -s bin/bin/cygsemigroups*.dll ; fi - if test -f bin/bin/cygsemigroups*.dll ; then if test -d $(GAPPATH)/.libs; then cp bin/bin/cygsemigroups*.dll $(GAPPATH)/.libs/ ; fi ; fi - if test -f bin/bin/cygsemigroups*.dll ; then cp bin/bin/cygsemigroups*.dll $(GAPPATH)/ ; fi - + if test -f bin/lib/cygsemigroups*.dll ; then rebase -s bin/lib/cygsemigroups*.dll ; fi + if test -f bin/lib/cygsemigroups*.dll ; then if test -d $(GAPPATH)/.libs; then cp bin/lib/cygsemigroups*.dll $(GAPPATH)/.libs/ ; fi ; fi + if test -f bin/lib/cygsemigroups*.dll ; then cp bin/lib/cygsemigroups*.dll $(GAPPATH)/ ; fi endif clean: diff --git a/configure.ac b/configure.ac index 8d764d3a0..6653d51e1 100644 --- a/configure.ac +++ b/configure.ac @@ -16,10 +16,6 @@ AC_CONFIG_MACRO_DIR([m4]) AX_PREFIX_CONFIG_H([src/semigroups-config.hpp],[semigroups],[gen/pkgconfig.h]) -dnl ## abs_top_builddir seems to hold the top build dir for the subpackage -dnl ## libsemigroups which is why this contains ../ -AC_PREFIX_DEFAULT('${abs_top_builddir}/../bin/') - dnl ## dnl ## Set the language dnl ## From 8e30b9deb5c83670eef571ca6a4aaee4b71babbd Mon Sep 17 00:00:00 2001 From: James Mitchell Date: Thu, 26 Mar 2026 17:20:45 +0000 Subject: [PATCH 2/2] Change back lib/bin -> bin/bin --- GNUmakefile.in | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index a2905e932..6602e1d8c 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -102,9 +102,12 @@ bin/include/libsemigroups/libsemigroups.hpp: # resides in. The following achieves that assuming that the GAP # being used was self-compiled by the user. This supports # both older GAPs with libtool (first) and GAP without libtool (second) - if test -f bin/lib/cygsemigroups*.dll ; then rebase -s bin/lib/cygsemigroups*.dll ; fi - if test -f bin/lib/cygsemigroups*.dll ; then if test -d $(GAPPATH)/.libs; then cp bin/lib/cygsemigroups*.dll $(GAPPATH)/.libs/ ; fi ; fi - if test -f bin/lib/cygsemigroups*.dll ; then cp bin/lib/cygsemigroups*.dll $(GAPPATH)/ ; fi + + # Additionally, we rebase the dll with respect to the database to + # avoid fork conflicts + if test -f bin/bin/cygsemigroups*.dll ; then rebase -s bin/bin/cygsemigroups*.dll ; fi + if test -f bin/bin/cygsemigroups*.dll ; then if test -d $(GAPPATH)/.libs; then cp bin/bin/cygsemigroups*.dll $(GAPPATH)/.libs/ ; fi ; fi + if test -f bin/bin/cygsemigroups*.dll ; then cp bin/bin/cygsemigroups*.dll $(GAPPATH)/ ; fi endif clean: