1 # Set PREFIX to wherever you want to install TopGit
4 cmddir
= $(PREFIX
)/libexec
/topgit
5 hooksdir
= $(cmddir
)/hooks
8 commands_in
= tg-create.sh tg-delete.sh tg-info.sh tg-patch.sh tg-summary.sh tg-update.sh
9 hooks_in
= hooks
/pre-commit.sh
11 commands_out
= $(patsubst %.sh
,%,$(commands_in
))
12 hooks_out
= $(patsubst %.sh
,%,$(hooks_in
))
14 all:: tg
$(commands_out
) $(hooks_out
)
16 tg
$(commands_out
) $(hooks_out
): % : %.sh
18 @sed
-e
's#@cmddir@#$(cmddir)#g;' \
19 -e
's#@hooksdir@#$(hooksdir)#g' \
20 -e
's#@bindir@#$(bindir)#g' \
27 install tg
"$(bindir)"
28 install -d
-m
755 "$(cmddir)"
29 install $(commands_out
) "$(cmddir)"
30 install -d
-m
755 "$(hooksdir)"
31 install $(hooks_out
) "$(hooksdir)"
34 rm -f tg
$(commands_out
) $(hooks_out
)