git-daemon: add Makefile and documentation.
[userv-utils] / git-daemon / Makefile
1 # Makefile for userv-git-daemon
2 #
3 # This was written by Tony Finch <dot@dotat.at>
4 # You may do anything with it, at your own risk.
5 # http://creativecommons.org/publicdomain/zero/1.0/
6
7 include ../settings.make
8
9 TARGETS= git-upload-pack inetd.conf
10
11 SUBSTVARS= libuserv etcuserv
12 SEDSCRIPT= '$(foreach f, $(SUBSTVARS), s,@$f@,$($f),g; )'
13
14 all: $(TARGETS)
15
16 %: %.in
17 sed $(SEDSCRIPT) <$< >$@.new && mv -f $@.new $@
18
19 install: all
20 mkdir -p $(libuserv) $(etcuserv) $(services)
21 cp git-daemon git-service $(libuserv)
22 cp git-upload-pack $(services)
23 cp git-urlmap $(etcuserv)
24
25 clean:
26 rm -f $(TARGETS)
27
28 # end