diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2018-07-27 17:14:32 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2018-07-27 17:15:50 +0200 |
commit | 22707789ec7b9ed6a9b9d821ea870354e2ff22d0 (patch) | |
tree | f65204ebc9a88e8d6efe4dd233441a73b72c5732 | |
parent | b76680839240884264c05a0ca96aa5a1b564ae1c (diff) |
Generate %assets-root value.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | config.scm.in (renamed from config.scm) | 16 | ||||
-rw-r--r-- | configure.ac | 2 |
3 files changed, 17 insertions, 2 deletions
@@ -1,4 +1,5 @@ *.go +config.scm configure config.log config.status diff --git a/config.scm b/config.scm.in index d52ae55..43db6cf 100644 --- a/config.scm +++ b/config.scm.in @@ -19,10 +19,24 @@ #:export (%width %height %line-height - %message-margin)) + %message-margin + %assets-root)) (define %width 320) (define %height 240) (define %line-height 12.5) (define %message-margin 4.0) +(define %assets-root + (let* ((prefix "@prefix@") + (datarootdir + (string-append prefix + (string-drop "@datarootdir@" + (string-length "${prefix}")))) + (pkgdatadir + (string-append datarootdir + (string-drop "@datadir@/@PACKAGE@" + (string-length "${datarootdir}"))))) + (if (getenv "INEVITABLE_UNINSTALLED") + (getcwd) + pkgdatadir))) diff --git a/configure.ac b/configure.ac index fe92128..8f8c9c4 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ AM_INIT_AUTOMAKE([color-tests -Wall -Wno-portability foreign]) AM_SILENT_RULES([yes]) AC_PATH_PROG([GUILE], [guile]) -AC_CONFIG_FILES([Makefile]) +AC_CONFIG_FILES([Makefile config.scm]) AC_CONFIG_FILES([pre-inst-env], [chmod +x pre-inst-env]) AC_CONFIG_FILES([scripts/inevitable], [chmod +x scripts/inevitable]) |