summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès2018-04-30 10:36:11 +0200
committerLudovic Courtès2018-04-30 10:36:11 +0200
commitacbd354ca0a32a5a551869a3650c9d265b83b204 (patch)
treec5d0a300353cd2a1d8033c6e336fa5f80866eb03
parentbaa6c4c9288303cd227ebf7f777df16fdbc7abd0 (diff)
downloadskribilo-acbd354ca0a32a5a551869a3650c9d265b83b204.tar.gz
skribilo-acbd354ca0a32a5a551869a3650c9d265b83b204.tar.lz
skribilo-acbd354ca0a32a5a551869a3650c9d265b83b204.zip
build: Install modules and objects in the usual locations.v0.9.4
* configure.ac: Add '--with-guileobjectdir' and substitute 'guileobjectdir'. * guilec.am (nobase_nodist_module_DATA): Rename to... (nobase_nodist_guileobject_DATA): ... this (skr_install_go_files): Change value to 'install-nobase_nodist_guileobjectDATA'. * src/guile/Makefile.am (nobase_nodist_module_DATA): Change "+=" to "=". (nobase_nodist_module_DATA): Rename to... (nobase_nodist_guileobject_DATA): ... this. * src/skribilo.in (GUILE_LOAD_COMPILED_PATH): Use @guileobjectdir@. * substitute.am (substitute): Add @guileobjectdir@.
-rw-r--r--configure.ac18
-rw-r--r--guilec.am6
-rw-r--r--src/guile/Makefile.am6
-rwxr-xr-xsrc/skribilo.in4
-rw-r--r--substitute.am1
5 files changed, 24 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index a71aad6..73cbc21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,15 @@ AC_ARG_WITH([guilemoduledir],
esac],
[guilemoduledir=""])
+AC_ARG_WITH([guileobjectdir],
+ [AS_HELP_STRING([--with-guileobjectdir=DIR],
+ [install Guile object files under DIR])],
+ [case "x$withval" in
+ xyes|xno) guileobjectdir="";;
+ *) guileobjectdir="$withval";;
+ esac],
+ [guileobjectdir=""])
+
AC_PROG_LN_S
AC_PROG_MKDIR_P
@@ -94,12 +103,15 @@ AM_CONDITIONAL([HAVE_PLOTICUS], [test "x$PLOTICUS" != "x"])
# Emacs.
AM_PATH_LISPDIR
-
-pkgdatadir="$datadir/$PACKAGE_TARNAME"
+dnl Installation directories for .scm and .go files.
if test "x$guilemoduledir" = "x"; then
- guilemoduledir="$pkgdatadir/$PACKAGE_VERSION"
+ guilemoduledir="${datarootdir}/guile/site/$GUILE_EFFECTIVE_VERSION"
+fi
+if test "x$guileobjectdir" = "x"; then
+ guileobjectdir="${libdir}/guile/$GUILE_EFFECTIVE_VERSION/site-ccache"
fi
AC_SUBST([guilemoduledir])
+AC_SUBST([guileobjectdir])
if test "$guilemoduledir" != "$GUILE_SITE"; then
# Guile won't be able to locate the modules "out of the box", so
diff --git a/guilec.am b/guilec.am
index dc6e870..8fa3daf 100644
--- a/guilec.am
+++ b/guilec.am
@@ -7,7 +7,7 @@ if HAVE_GUILE2
GOBJECTS = $(SOURCES:%.scm=%.go)
nobase_dist_module_DATA = $(SOURCES) $(SOURCES_NOT_COMPILED)
-nobase_nodist_module_DATA = $(GOBJECTS)
+nobase_nodist_guileobject_DATA = $(GOBJECTS)
# Compiler warnings.
guile_warnings = \
@@ -46,12 +46,12 @@ SUFFIXES += .go
# files. See
# <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html>
# for details.
-skr_install_go_files = install-nobase_nodist_moduleDATA
+skr_install_go_files = install-nobase_nodist_guileobjectDATA
$(skr_install_go_files): install-nobase_dist_moduleDATA
else !HAVE_GUILE2
nobase_dist_module_DATA = $(SOURCES) $(SOURCES_NOT_COMPILED)
-nobase_nodist_module_DATA =
+nobase_nodist_guileobject_DATA =
endif !HAVE_GUILE2
diff --git a/src/guile/Makefile.am b/src/guile/Makefile.am
index e4dd75c..2d6571c 100644
--- a/src/guile/Makefile.am
+++ b/src/guile/Makefile.am
@@ -1,5 +1,5 @@
# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2012,
-# 2015 Ludovic Courtès <ludo@gnu.org>
+# 2015, 2018 Ludovic Courtès <ludo@gnu.org>
#
# This file is part of Skribilo.
#
@@ -91,13 +91,13 @@ include $(top_srcdir)/substitute.am
include $(top_srcdir)/guilec.am
# Generated files not part of the distribution.
-nobase_nodist_module_DATA += \
+nobase_nodist_module_DATA = \
skribilo/config.scm \
skribilo/utils/images.scm
if HAVE_GUILE2
-nobase_nodist_module_DATA += \
+nobase_nodist_guileobject_DATA += \
skribilo/config.go \
skribilo/utils/images.go
diff --git a/src/skribilo.in b/src/skribilo.in
index 30a7b02..ca44108 100755
--- a/src/skribilo.in
+++ b/src/skribilo.in
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2005, 2006, 2007, 2008, 2009 Ludovic Courtès <ludo@gnu.org>
+# Copyright 2005, 2006, 2007, 2008, 2009, 2018 Ludovic Courtès <ludo@gnu.org>
#
#
# This file is part of Skribilo.
@@ -24,7 +24,7 @@
# needed, the use should explicitly set the `GUILE' environment
# variable to, e.g., "guile --debug".
-GUILE_LOAD_COMPILED_PATH="@guilemoduledir@:$GUILE_LOAD_COMPILED_PATH"
+GUILE_LOAD_COMPILED_PATH="@guileobjectdir@:$GUILE_LOAD_COMPILED_PATH"
export GUILE_LOAD_COMPILED_PATH
main='(module-ref (resolve-interface '\''(skribilo)) '\'skribilo')'
diff --git a/substitute.am b/substitute.am
index 004e7c3..4f69cb8 100644
--- a/substitute.am
+++ b/substitute.am
@@ -5,6 +5,7 @@ AM_V_SUBSTITUTE_ = $(AM_V_SUBSTITUTE_$(AM_DEFAULT_VERBOSITY))
AM_V_SUBSTITUTE_0 = @echo " SUBSTITUTE" $@;
substitute = sed -e 's,[@]guilemoduledir[@],$(guilemoduledir),g' \
+ -e 's,[@]guileobjectdir[@],$(guileobjectdir),g' \
-e 's,[@]abs_top_srcdir[@],$(abs_top_srcdir),g' \
-e 's,[@]abs_top_builddir[@],$(abs_top_builddir),g' \
-e 's,[@]prefix[@],$(prefix),g' \