-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
75 lines (60 loc) · 1.18 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
include /usr/share/dpkg/pkg-info.mk
include /usr/share/dpkg/architecture.mk
.PHONY: all
all: build
#
# Development
#
.PHONY: run
run:
sudo DEBUG=${DEBUG} usr/bin/rsetup
#
# Build
#
.PHONY: build
build: build-man build-doc
SRC-MAN := man
SRCS-MAN := $(wildcard $(SRC-MAN)/*.md)
MANS := $(SRCS-MAN:.md=)
.PHONY: build-man
build-man: $(MANS)
$(SRC-MAN)/%: $(SRC-MAN)/%.md
pandoc "$<" -o "$@" --from markdown --to man -s
SRC-DOC := .
DOCS := $(SRC-DOC)/SOURCE
build-doc: $(DOCS)
$(SRC-DOC):
mkdir -p $(SRC-DOC)
.PHONY: $(SRC-DOC)/SOURCE
$(SRC-DOC)/SOURCE: $(SRC-DOC)
echo -e "git clone $(shell git remote get-url origin)\ngit checkout $(shell git rev-parse HEAD)" > "$@"
#
# Test
#
.PHONY: test
test:
shellcheck -x usr/bin/rsetup
find lib/ -name '*.sh' -exec shellcheck -x {} +
#
# Install
#
#
# Clean
#
.PHONY: distclean
distclean: clean
.PHONY: clean
clean: clean-man clean-doc
rm -rf debian/.debhelper debian/${DEB_SOURCE} debian/debhelper-build-stamp debian/files debian/*.debhelper.log debian/*.postrm.debhelper debian/*.substvars
.PHONY: clean-man
clean-man:
rm -rf $(MANS)
.PHONY: clean-doc
clean-doc:
rm -rf $(DOCS)
#
# Release
#
.PHONY: deb
deb: debian
debuild --no-sign