X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=blobdiff_plain;f=Makefile;h=238d07d6a84e91e2c00605cff55afc534b6b11bc;hp=3913d66b9de41db4bb2b78c0af2980a6dbc31cea;hb=db4bc100e4afd0e405443f5bab4a242b989a6a64;hpb=695384ea024bfbb58c15b1be79d959628d70364e diff --git a/Makefile b/Makefile index 3913d66..238d07d 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ PREFIX = $(HOME) bindir = $(PREFIX)/bin cmddir = $(PREFIX)/libexec/topgit +sharedir = $(PREFIX)/share/topgit hooksdir = $(cmddir)/hooks @@ -10,18 +11,22 @@ hooks_in = hooks/pre-commit.sh commands_out = $(patsubst %.sh,%,$(commands_in)) hooks_out = $(patsubst %.sh,%,$(hooks_in)) +help_out = $(patsubst %.sh,%.txt,$(commands_in)) -all:: tg $(commands_out) $(hooks_out) +all:: tg $(commands_out) $(hooks_out) $(help_out) tg $(commands_out) $(hooks_out): % : %.sh @echo "[SED] $@" @sed -e 's#@cmddir@#$(cmddir)#g;' \ -e 's#@hooksdir@#$(hooksdir)#g' \ -e 's#@bindir@#$(bindir)#g' \ + -e 's#@sharedir@#$(sharedir)#g' \ $@.sh >$@+ && \ chmod +x $@+ && \ mv $@+ $@ +$(help_out): README + ./create-help.sh `echo $@ | sed -e 's/tg-//' -e 's/\.txt//'` install:: all install tg "$(bindir)" @@ -29,6 +34,8 @@ install:: all install $(commands_out) "$(cmddir)" install -d -m 755 "$(hooksdir)" install $(hooks_out) "$(hooksdir)" + install -d -m 755 "$(sharedir)" + install $(help_out) "$(sharedir)" clean:: - rm -f tg $(commands_out) $(hooks_out) + rm -f tg $(commands_out) $(hooks_out) $(help_out)