X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=blobdiff_plain;f=Makefile;h=3ce39a5633f4a7bab6b3835f6169d1b23e78cefd;hp=af4639915031e7a8a0c95c5caf1db206e93401ad;hb=566ea3fef82d408955285b2928b3f481486b809f;hpb=1ec1593458af509437008522be51cbe15c309d45 diff --git a/Makefile b/Makefile index af46399..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 = 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' \