forked from latchset/pkcs11-provider
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.am
49 lines (42 loc) · 1.19 KB
/
Makefile.am
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
ACLOCAL_AMFLAGS = -Im4
SUBDIRS = src tests
dist_doc_DATA = README
check-style:
@lines=`git diff -U0 --no-color --relative origin/main | clang-format-diff -p1 |wc -l`; \
if [ "$$lines" != "0" ]; then \
echo "Coding Style issues detected"; \
exit 1; \
else \
echo "Coding Styles checks out"; \
fi
check-style-show:
git diff -U0 --no-color --relative origin/main | clang-format-diff -p1
check-style-fix:
git diff -U0 --no-color --relative origin/main | clang-format-diff -i -p1
generate-code:
for pfile in src/*.pre; do \
gfile=`echo $${pfile} | sed s/\.pre/\.gen\.c/`; \
echo "/* DO NOT EDIT, autogenerated from $${pfile} */" > "$${gfile}"; \
echo "/* Modify $${pfile} then run make generate-code */" >> "$${gfile}"; \
cat $${pfile} | $(CC) -E - | grep -v "^#" > "$${gfile}.tmp"; \
sed -i -n -e '/^BEGIN:$$/,$$p' "$${gfile}.tmp"; \
sed -i 's/^BEGIN:$$//' "$${gfile}.tmp"; \
cat "$${gfile}.tmp" >> $${gfile}; \
clang-format -i --verbose "$${gfile}"; \
rm "$${gfile}.tmp"; \
done
DISTCLEANFILES = \
*~
MAINTAINERCLEANFILES = \
Makefile.in \
aclocal.m4 \
ar-lib compile \
config.guess \
config.sub \
configure \
depcomp \
install-sh \
ltmain.sh \
m4/* \
missing \
test-driver