@@ -2,11 +2,11 @@ TIDIED_FILES ?=*/*.c */*.h */*/*.c */*/*.h */*/test/*.h */*/test/*.c
2
2
EXCLUDED_TIDIED_FILES = kfc-utils-colors.c|xxxxxxxxx.c
3
3
4
4
get-tidied-files-lines-qty :
5
- @wc -l < $(shell $(MAKE ) -B get-tidied-files) | grep total| tail -n1| tr -s ' ' | cut -d' ' -f2
5
+ @wc -l < $(shell $(MAKE ) -s get-tidied-files) | grep total| tail -n1| tr -s ' ' | cut -d' ' -f2
6
6
get-tidied-files-qty :
7
- @$(MAKE ) -B get-tidied-files| wc -l
7
+ @$(MAKE ) -s get-tidied-files| wc -l
8
8
get-tidied-files :
9
- @$(MAKE ) -B meson-get-c-files| egrep -v ' meson/deps|submodules|subprojects '
9
+ @$(MAKE ) -s meson-get-c-files
10
10
11
11
# $(FIND) -L $(TIDIED_FILES) -type f -maxdepth 3| $(SORT) -u
12
12
@@ -18,8 +18,7 @@ uncrustify:
18
18
# @make -B get-tidied-files|$(XARGS) -P 10 -I {} $(UNCRUSTIFY) -c ~/repos/c_deps/etc/uncrustify.cfg --replace "{}" 2>/dev/null||true
19
19
20
20
uncrustify-clean :
21
- true
22
- # @$(FIND) -L . -type f -name "*unc-backup*" |$(GREP) -v 'submodules|subprojects'|$(XARGS) -I % $(REALPATH) % | $(SORT) -u|$(XARGS) -P 10 -I % $(UNLINK) % 2>/dev/null ||true
21
+ @$(FIND ) . -type f -name " *unc-backup*" | $(GREP ) -v ' submodules|subprojects' | $(XARGS ) -I % $(REALPATH ) % | $(SORT ) -u| $(XARGS ) -P 10 -I % $(UNLINK ) % 2> /dev/null || true
23
22
24
23
fix-dbg :
25
24
@$(SED ) ' s|, %[[:space:]].*u);|, %u);|g' -i $(TIDIED_FILES )
@@ -34,25 +33,21 @@ fix-dbg:
34
33
@$(SED ) ' s|, %[[:space:]].*zu);|, %zu);|g' -i $(TIDIED_FILES )
35
34
36
35
shfmt :
37
- # @if [[ -d scripts ]]; then $(FIND) scripts/*.sh -type f >/dev/null 2>&1 && $(MAKE) -B fmt-scripts 2>/dev/null||true; fi
38
- @true
36
+ @if [[ -d scripts ]]; then $(FIND ) scripts/* .sh -type f > /dev/null 2>&1 && $(MAKE ) -s fmt-scripts 2> /dev/null|| true; fi
39
37
40
38
do-tidy :
41
- true
42
- # @$(MAKE) -B uncrustify uncrustify-clean shfmt fix-dbg 2>/dev/null||true
39
+ @$(MAKE ) -s uncrustify uncrustify-clean shfmt fix-dbg 2> /dev/null|| true
43
40
44
41
get-tidied-files-stats :
45
42
@printf " %s files, %s lines\n" " $( shell make -B get-tidied-files-qty) " " $( shell make -B get-tidied-files-lines-qty) "
46
43
47
44
do-timed-tidy :
48
45
@ts=` $( DATE) +%s%3N` && \
49
46
$(ANSI ) --yellow " Uncrustifying $( shell make -B get-tidied-files-stats) " && \
50
- $(MAKE ) -B do-tidy >&2 && \
47
+ $(MAKE ) -s do-tidy >&2 && \
51
48
end_ts=` $( DATE) +%s%3N` && \
52
49
$(ANSI ) --up=1 -n --green " Uncrustified $( shell make -B get-tidied-files-stats) in " && \
53
50
bc <<< ` printf " %s-%s" " $$ end_ts" " $$ ts" ` | tr -d ' \n' && \
54
51
ansi --blue ms && sleep 1
55
52
56
- tidy :
57
- true
58
- # @$(MAKE) -B do-timed-tidy
53
+ tidy : do-timed-tidy
0 commit comments