chiark / gitweb /
Merge commit 'refs/top-bases/debian/locations' into debian/locations
[topgit.git] / Makefile
index bafec268d4355976a7a2dfcded9914e49050c18a..4aa48f4cb1b4786f7d8a96072879f722c6a5c742 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,11 @@
-# Set PREFIX to wherever you want to install TopGit
-PREFIX = $(HOME)
-bindir = $(PREFIX)/bin
-cmddir = $(PREFIX)/libexec/topgit
-sharedir = $(PREFIX)/share/topgit
+prefix = $(HOME)
+bindir = $(prefix)/bin
+cmddir = $(prefix)/share/topgit
+docdir = $(prefix)/share/doc/topgit
 hooksdir = $(cmddir)/hooks
 
 
-commands_in = tg-create.sh tg-delete.sh tg-export.sh tg-info.sh tg-patch.sh tg-summary.sh tg-update.sh
+commands_in = $(wildcard tg-*.sh)
 hooks_in = hooks/pre-commit.sh
 
 commands_out = $(patsubst %.sh,%,$(commands_in))
@@ -20,7 +19,7 @@ tg $(commands_out) $(hooks_out): % : %.sh
        @sed -e 's#@cmddir@#$(cmddir)#g;' \
                -e 's#@hooksdir@#$(hooksdir)#g' \
                -e 's#@bindir@#$(bindir)#g' \
-               -e 's#@sharedir@#$(sharedir)#g' \
+               -e 's#@docdir@#$(docdir)#g' \
                $@.sh >$@+ && \
        chmod +x $@+ && \
        mv $@+ $@
@@ -37,8 +36,8 @@ install:: all
        install $(commands_out) "$(DESTDIR)$(cmddir)"
        install -d -m 755 "$(DESTDIR)$(hooksdir)"
        install $(hooks_out) "$(DESTDIR)$(hooksdir)"
-       install -d -m 755 "$(DESTDIR)$(sharedir)"
-       install -m 644 $(help_out) "$(DESTDIR)$(sharedir)"
+       install -d -m 755 "$(DESTDIR)$(docdir)"
+       install -m 644 $(help_out) "$(DESTDIR)$(docdir)"
 
 clean::
        rm -f tg $(commands_out) $(hooks_out) $(help_out)