aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-07-01 22:41:19 +0200
committerGravatar Tom Willemsen2012-07-01 22:41:19 +0200
commit984abc17b3edddb0672a1b6eb342237979750c52 (patch)
tree347889b3dc7d7ec2ecd1bb3bdf63a445f3303a6e
parent884bb23ad348bd5a033073adf3d9ea52f29894ba (diff)
downloadgitto-984abc17b3edddb0672a1b6eb342237979750c52.tar.gz
gitto-984abc17b3edddb0672a1b6eb342237979750c52.zip
Make installation a bit better
Installation now goes into the official site directories for guile, both for *.go as *.scm.
-rw-r--r--gitto/Makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/gitto/Makefile b/gitto/Makefile
index 4c4f95e..a81d1bb 100644
--- a/gitto/Makefile
+++ b/gitto/Makefile
@@ -1,6 +1,8 @@
DESTDIR ?= /usr/local
+SITEDIR = $(shell pkg-config guile-2.0 --variable=sitedir --define-variable=prefix=$(DESTDIR))
+COMPDIR = $(DESTDIR)/lib/guile/2.0/site-ccache
-objects = main.go main.scm
+objects = main.scm main.go
install-objects = $(addprefix install-,$(objects))
uninstall-objects = $(addprefix uninstall-,$(objects))
@@ -13,13 +15,13 @@ install: $(install-objects)
uninstall: $(uninstall-objects)
$(filter %.go,$(install-objects)): install-%:
- install -Dm 644 $* $(DESTDIR)/lib/guile/2.0/ccache/gitto/$*
+ install -Dm 644 $* "$(COMPDIR)/gitto/$*"
$(filter %.scm,$(install-objects)): install-%:
- install -Dm 644 $* $(DESTDIR)/share/guile/2.0/gitto/$*
+ install -Dm 644 $* "$(SITEDIR)/gitto/$*"
$(filter %.go,$(uninstall-objects)): uninstall-%:
- rm -f $(DESTDIR)/lib/guile/2.0/ccache/gitto/$*
+ rm -f "$(COMPDIR)/gitto/$*"
$(filter %.scm,$(uninstall-objects)): uninstall-%:
- rm -f $(DESTDIR)/share/guile/2.0/gitto/$*
+ rm -f "$(SITEDIR}/gitto/$*"