-
Notifications
You must be signed in to change notification settings - Fork 3
/
utils.mk
37 lines (32 loc) · 806 Bytes
/
utils.mk
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
UBUNTU_BASE_IMAGE := ubuntu:20.04
.PHONY: $(shell ls)
help:
@echo "usage: make [action]"
@echo ""
@echo "available actions:"
@echo ""
@echo " indent"
@echo " test"
@echo ""
indent:
# https://gstreamer.freedesktop.org/documentation/frequently-asked-questions/developing.html?gi-language=c#what-is-the-coding-style-for-gstreamer-code
docker run --rm -it -v $(PWD):/s $(UBUNTU_BASE_IMAGE) sh -c \
"apt update && apt install -y indent \
&& echo ok \
&& cd /s && indent \
--braces-on-if-line \
--case-brace-indentation0 \
--case-indentation2 \
--braces-after-struct-decl-line \
--line-length80 \
--no-tabs \
--cuddle-else \
--dont-line-up-parentheses \
--continuation-indentation4 \
--honour-newlines \
--tab-size8 \
--indent-level2 \
*.c *.h \
&& rm *~"
test:
cd test && make