aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-03-20 22:13:27 +0100
committerLudovic Courtès <ludo@gnu.org>2017-03-20 23:26:18 +0100
commit9437fd7399425ed281e1bfc13240288ba9078caa (patch)
tree35112a154d9a5281e2433e65f6ff0a60cc881b41 /scripts
parent6809d9377b0bd2cf71811637663f2ec0cbe531e5 (diff)
downloadguix-9437fd7399425ed281e1bfc13240288ba9078caa.tar
guix-9437fd7399425ed281e1bfc13240288ba9078caa.tar.gz
build: Install .go files to $libdir/guile/X.Y.
* configure.ac: Define and substitute 'guileobjectdir'. * Makefile.am (nobase_nodist_guilemodule_DATA): Remove $(GOBJECTS). (nobase_nodist_guileobject_DATA): New variable. (guix_install_go_files): Adjust accordingly. (install-data-hook): Likewise. * scripts/guix.in (config-lookup): Add 'exec_prefix' and 'guileobjectdir'. Add '_' in VAR-REF-REGEXP. (maybe-augment-load-paths!): Distinguish OBJECT-DIR from MODULE-DIR.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/guix.in11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/guix.in b/scripts/guix.in
index 5d6921dd09..e20c274242 100644
--- a/scripts/guix.in
+++ b/scripts/guix.in
@@ -30,10 +30,12 @@
(define config-lookup
(let ((config '(("prefix" . "@prefix@")
+ ("exec_prefix" . "@exec_prefix@")
("datarootdir" . "@datarootdir@")
("guilemoduledir" . "@guilemoduledir@")
+ ("guileobjectdir" . "@guileobjectdir@")
("localedir" . "@localedir@")))
- (var-ref-regexp (make-regexp "\\$\\{([a-z]+)\\}")))
+ (var-ref-regexp (make-regexp "\\$\\{([a-z_]+)\\}")))
(define (expand-var-ref match)
(lookup (match:substring match 1)))
(define (expand str)
@@ -45,14 +47,17 @@
(define (maybe-augment-load-paths!)
(unless (getenv "GUIX_UNINSTALLED")
- (let ((module-dir (config-lookup "guilemoduledir")))
+ (let ((module-dir (config-lookup "guilemoduledir"))
+ (object-dir (config-lookup "guileobjectdir")))
(push! module-dir %load-path)
- (push! module-dir %load-compiled-path))
+ (push! object-dir %load-compiled-path))
(let ((updates-dir (and=> (or (getenv "XDG_CONFIG_HOME")
(and=> (getenv "HOME")
(cut string-append <> "/.config")))
(cut string-append <> "/guix/latest"))))
(when (and updates-dir (file-exists? updates-dir))
+ ;; XXX: Currently 'guix pull' puts both .scm and .go files in
+ ;; UPDATES-DIR.
(push! updates-dir %load-path)
(push! updates-dir %load-compiled-path)))))