X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=blobdiff_plain;f=Makefile;h=31cc98e6fecdc1cec803f8c5744eb9b324d5b4b0;hp=2777e1619515e24b35b49ad1aa01a5cf5f0ee254;hb=33c5ab5dd3da43a04d2745a91de88c7afbe92d9b;hpb=0cbd6990ae81d73fdec784f4bd8e7b8e42d16e97 diff --git a/Makefile b/Makefile index 2777e16..31cc98e 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,20 @@ -prefix = $(HOME) -bindir = $(prefix)/bin -cmddir = $(prefix)/libexec/topgit -docdir = $(prefix)/share/doc/topgit -hooksdir = $(cmddir)/hooks +prefix ?= $(HOME) +bindir := $(prefix)/bin +cmddir := $(prefix)/share/topgit +docdir := $(prefix)/share/doc/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' \