-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
35 lines (27 loc) · 950 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# vim: set ts=4:
TCLSH?= tclsh8.7
REPO= fossil info | grep ^repository | awk '{print $$2}'
all:
@echo "Supported targets: docs, man, test, clean"
.PHONY: docs
docs: README.adoc
asciidoctor -b xhtml5 -a generate_manpage=yes -a toc -d article -o docs/index.html README.adoc
sed -i '' "1s|^|<div class='fossil-doc' data-title='retcl - Redis client library for Tcl'>\n|" docs/index.html
man: README.adoc
asciidoctor -b manpage -a generate_manpage=yes -o retcl.n README.adoc
.PHONY: test
test:
${TCLSH} test/all.tcl
clean:
rm -f retcl.n
git:
@if [ -e git-import ]; then \
echo "The 'git-import' directory already exists"; \
exit 1; \
fi; \
git init -b master git-import && cd git-import && \
fossil export --git --rename-trunk master --repository `${REPO}` | \
git fast-import && git reset --hard HEAD && \
git remote add origin [email protected]:gahr/retcl.git && \
git push -f origin master && \
cd .. && rm -rf git-import