diff options
author | Bernhard Voelker <mail@bernhard-voelker.de> | 2018-11-19 00:04:48 +0100 |
---|---|---|
committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2018-12-02 15:52:44 +0100 |
commit | bac58c517814f92e3cbbbe5ae32cfa39546a9cf9 (patch) | |
tree | 259f6ebc1b3710cee6f4367575c62e8d46f5d756 /cfg.mk | |
parent | 74534e07a7b032cfe917fb1f11023522916a82a1 (diff) | |
download | findutils-bac58c517814f92e3cbbbe5ae32cfa39546a9cf9.tar.gz |
maint: adjust preprocessor indentation via cppi
Run 'cppi -a' for all *.[ch] files, and add a syntax-check rule for it.
* cfg.mk (sc_preprocessor_indentation): Add rule.
* find/defs.h: Run 'cppi -a' on this file.
* find/fstype.c: Likewise.
* find/oldfind.c: Likewise.
* find/parser.c: Likewise.
* find/pred.c: Likewise.
* find/print.h: Likewise.
* find/sharefile.h: Likewise.
* gnulib-local/lib/gcc-function-attributes.h: Likewise.
* lib/bugreports.h: Likewise.
* lib/buildcmd.c: Likewise.
* lib/buildcmd.h: Likewise.
* lib/extendbuf.h: Likewise.
* lib/fdleak.h: Likewise.
* lib/findutils-version.h: Likewise.
* lib/listfile.c: Likewise.
* lib/printquoted.h: Likewise.
* lib/regextype.h: Likewise.
* lib/safe-atoi.h: Likewise.
* lib/splitstring.h: Likewise.
* lib/system.h: Likewise.
* locate/locatedb.h: Likewise.
* xargs/xargs.c: Likewise.
Diffstat (limited to 'cfg.mk')
-rw-r--r-- | cfg.mk | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -102,6 +102,16 @@ sc_die_EXIT_FAILURE: exit 1; } \ || : +# Enforce recommended preprocessor indentation style. +sc_preprocessor_indentation: + @if cppi --version >/dev/null 2>&1; then \ + $(VC_LIST_EXCEPT) | grep '\.[ch]$$' | xargs cppi -a -c \ + || { echo '$(ME): incorrect preprocessor indentation' 1>&2; \ + exit 1; }; \ + else \ + echo '$(ME): skipping test $@: cppi not installed' 1>&2; \ + fi + # During 'make update-copyright', convert a sequence with gaps to the minimal # containing range. update-copyright-env = \ |