]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Makefile: lint-iwyu: Be silent if there are no problems
authorAlejandro Colomar <alx.manpages@gmail.com>
Sun, 1 May 2022 23:35:58 +0000 (01:35 +0200)
committerAlejandro Colomar <alx.manpages@gmail.com>
Sun, 1 May 2022 23:46:23 +0000 (01:46 +0200)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Makefile

index cea48edae41cc60f6ff8652350971d9fb2efca8d..4b93729e199a939ae4e81d2b55a40b32f405c634 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -386,7 +386,10 @@ $(_LINT_clang-tidy): %.lint.clang-tidy.touch: %.c
 
 $(_LINT_iwyu): %.lint.iwyu.touch: %.c
        $(info LINT (iwyu)      $@)
-       $(IWYU) $(IWYUFLAGS) $(CPPFLAGS) $(CFLAGS) $<
+       $(IWYU) $(IWYUFLAGS) $(CPPFLAGS) $(CFLAGS) $< 2>&1 \
+       | tac \
+       | sed '/correct/{N;d}' \
+       | tac
        touch $@
 
 $(_LINT_groff): $(_LINTDIR)/%.lint.groff.touch: $(MANDIR)/% | $$(@D)/.