gitto/gitto/Makefile
Tom Willemse d2db2dfb53 Add config management commands
These commands parse the git configuration file and, merge settings
defined in the rc.scm and print out the resulting configuration.
2013-05-17 01:02:39 +02:00

31 lines
958 B
Makefile

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 = config.scm config.go git.scm git.go main.scm main.go path.scm \
path.go
install-objects = $(addprefix install-,$(objects))
uninstall-objects = $(addprefix uninstall-,$(objects))
.PHONY: all install $(install-objects) uninstall $(uninstall-objects)
all: $(filter %.go,$(objects))
$(filter %.go,$(objects)): %.go: %.scm
../env guild compile -o $@ $^
install: $(install-objects)
uninstall: $(uninstall-objects)
$(filter %.go,$(install-objects)): install-%: $(filter %.go,$(objects))
install -Dm 644 $* "$(COMPDIR)/gitto/$*"
$(filter %.scm,$(install-objects)): install-%:
install -Dm 644 $* "$(SITEDIR)/gitto/$*"
$(filter %.go,$(uninstall-objects)): uninstall-%:
rm -f "$(COMPDIR)/gitto/$*"
$(filter %.scm,$(uninstall-objects)): uninstall-%:
rm -f "$(SITEDIR)/gitto/$*"