X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=Makefile;h=3ce39a5633f4a7bab6b3835f6169d1b23e78cefd;hb=b8b7a716e893c5452abe1bc838c49eda628513af;hp=bafec268d4355976a7a2dfcded9914e49050c18a;hpb=16ae579018ef5e931af04953a47593c8be9e3e77;p=topgit.git diff --git a/Makefile b/Makefile index bafec26..3ce39a5 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,20 @@ -# Set PREFIX to wherever you want to install TopGit -PREFIX = $(HOME) -bindir = $(PREFIX)/bin -cmddir = $(PREFIX)/libexec/topgit -sharedir = $(PREFIX)/share/topgit -hooksdir = $(cmddir)/hooks +prefix ?= $(HOME) +bindir := $(prefix)/bin +cmddir := $(prefix)/libexec/topgit +sharedir := $(prefix)/share/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)) -hooks_out = $(patsubst %.sh,%,$(hooks_in)) -help_out = $(patsubst %.sh,%.txt,$(commands_in)) +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) $(help_out) -tg $(commands_out) $(hooks_out): % : %.sh +tg $(commands_out) $(hooks_out): % : %.sh Makefile @echo "[SED] $@" @sed -e 's#@cmddir@#$(cmddir)#g;' \ -e 's#@hooksdir@#$(hooksdir)#g' \