X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=blobdiff_plain;f=Makefile;h=3ce39a5633f4a7bab6b3835f6169d1b23e78cefd;hp=b73a1f15b9c298e0e922df1c61f6fb15df8f7821;hb=b8b7a716e893c5452abe1bc838c49eda628513af;hpb=248720d6e87fd8730bf72683cac3436630af4deb diff --git a/Makefile b/Makefile index b73a1f1..3ce39a5 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,20 @@ -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 = $(wildcard tg-*.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' \