-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
54 lines (36 loc) · 1.25 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
BUILD_DIR=build
.PHONY: all audit lint test build-rpm build-scripts doc quick-package package
all: audit doc-package package verify
clean:
rm -rf build docs coverage rpm-manager.tar.gz
doc:
doxygen tools/Doxyfile
audit: lint test
lint:
shellcheck --shell bash rpm-manager.sh src/*
test:
kcov --bash-dont-parse-binary-dir --include-path=src,rpm-manager.sh coverage bats --tap test
verify: build/rpm-manager
MANAGER=$< bats --tap test/inte_*.bats
package: build-scripts licenses
find build/licenses -type f -exec chmod 644 {} \;
find build -type d -exec chmod 755 {} \;
chmod 755 build/rpm-manager
tar -czf rpm-manager.tar.gz --sort=name --owner=root:0 --group=root:0 --mtime='UTC 2021-01-01' -C build .
quick-package: build-scripts licenses
tar -czf rpm-manager.tar.gz -C build .
doc-package: doc
tar -czf rpm-manager-doc.tar.gz --sort=name --owner=root:0 --group=root:0 --mtime='UTC 2021-01-01' -C docs/html .
build-scripts: build build/rpm-manager
build-rpm:
echo 'Not supported'
false
build:
mkdir -p $@
build/licenses:
mkdir -p $@
build/licenses/LICENSE: build/licenses
cp LICENSE $@
licenses: build/licenses/LICENSE
build/rpm-manager: rpm-manager.sh build
awk '{if($$1=="source"){system("cat "$$2); print "\n"}else{print $$0}}' '$<' >"$@"