summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorArun Isaac2022-06-20 17:14:52 +0530
committerArun Isaac2022-06-20 17:19:18 +0530
commit9f5add6a0344fcef0611c06a7958031bead835b4 (patch)
treee1d00625247908507fdf1513147f6cd3ff791a9a /Makefile.am
parente4d94a1622356edab873783646dcc351c03036d5 (diff)
downloadguile-xapian-9f5add6a0344fcef0611c06a7958031bead835b4.tar.gz
guile-xapian-9f5add6a0344fcef0611c06a7958031bead835b4.tar.lz
guile-xapian-9f5add6a0344fcef0611c06a7958031bead835b4.zip
Makefile: Suffix libguilexapian with effective Guile version number.
We need to distinguish between libguilexapian built for different versions of Guile. * Makefile.am (lib_LTLIBRARIES): Replace libguilexapian.la with libguilexapian-@GUILE_EFFECTIVE_VERSION@.la. (libguilexapian_la_SOURCES): Rename to libguilexapian_@GUILE_EFFECTIVE_VERSION@_la_SOURCES. (libguilexapian_la_CXXFLAGS): Rename to libguilexapian_@GUILE_EFFECTIVE_VERSION@_la_CXXFLAGS. (libguilexapian_la_LDFLAGS): Rename to libguilexapian_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS. (xapian.i): Substitute @GUILE_EFFECTIVE_VERSION@. (xapian/xapian.go): Depend on libguilexapian-@GUILE_EFFECTIVE_VERSION@.la instead of libguilexapian.la. * xapian.i.in: Load libguilexapian-@GUILE_EFFECTIVE_VERSION@.la instead of libguilexapian.la.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am13
1 files changed, 7 insertions, 6 deletions
diff --git a/Makefile.am b/Makefile.am
index db36483..e88d63b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,6 @@
# guile-xapian --- Guile bindings for Xapian
# Copyright © 2020, 2021, 2022 Arun Isaac <arunisaac@systemreboot.net>
+# Copyright © 2022 Bob131 <bob@bob131.so>
#
# This file is part of guile-xapian.
#
@@ -37,17 +38,17 @@ SWIG_GEN_1 =
# Xapian wrapper
-lib_LTLIBRARIES = libguilexapian.la
+lib_LTLIBRARIES = libguilexapian-@GUILE_EFFECTIVE_VERSION@.la
BUILT_SOURCES = xapian_wrap.cc xapian/wrap.scm
-libguilexapian_la_SOURCES = xapian_wrap.cc
-libguilexapian_la_CXXFLAGS = $(GUILE_CFLAGS) $(XAPIAN_CFLAGS)
-libguilexapian_la_LDFLAGS = $(GUILE_LIBS) $(XAPIAN_LIBS)
+libguilexapian_@GUILE_EFFECTIVE_VERSION@_la_SOURCES = xapian_wrap.cc
+libguilexapian_@GUILE_EFFECTIVE_VERSION@_la_CXXFLAGS = $(GUILE_CFLAGS) $(XAPIAN_CFLAGS)
+libguilexapian_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS = $(GUILE_LIBS) $(XAPIAN_LIBS)
CLEANFILES = xapian.i xapian_wrap.cc xapian/wrap.scm
xapian.i: xapian.i.in Makefile
- sed 's|@libdir[@]|$(libdir)|g' $< > $@
+ sed -e 's|@libdir[@]|$(libdir)|g' -e 's|@GUILE_EFFECTIVE_VERSION[@]|$(GUILE_EFFECTIVE_VERSION)|g' $< > $@
xapian_wrap.cc xapian/wrap.scm &: xapian.i xapian-head.i xapian-headers.i
$(MKDIR_P) xapian
@@ -72,7 +73,7 @@ GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
# Building xapian/xapian.scm additionally requires the libguilexapian
# shared library.
-xapian/xapian.go: xapian/xapian.scm libguilexapian.la
+xapian/xapian.go: xapian/xapian.scm libguilexapian-@GUILE_EFFECTIVE_VERSION@.la
# Tests