summaryrefslogtreecommitdiff
path: root/ctftilde/gen-pre-inst-config-scm
blob: 85b32202e431de17c2e0ab17267da9105dae179f (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

builddir="$(cd "$(dirname "$0")" && pwd -P)"
cd "$builddir"

eval "$(awk '/^srcdir=/ {print $0; exit(0);}' "$builddir"/config.status)"
srcdir="$(cd "$srcdir" && pwd -P)"

printf '%s' '
(define-module ('"$1"' pre-inst-config)
  #:export (config))

(define datarootpath
  (map (lambda (base)
         (string-append base "/src/resources"))
       `("'"$builddir"'" "'"$srcdir"'")))

(define config
  `((datarootpath . ,datarootpath)))
'