Makefile: add target to update .checkpackageignore

When a developer fixes an ignored warning from check-package, he/she
needs to update .checkpackageignore
By running './utils/docker-run make check-package' the developer
receives a warning about this.
Make that change easier to make, by adding a helper target on Makefile.

Add an option --failed-only to check-package that generates output in
the format:
<filename> <check_function> [<check_function> ...]
This is the very same format used by check-package ignore file.

Add the phony target .checkpackageignore

So one can update the ignore file using:
$ ./utils/docker-run make .checkpackageignore

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Ricardo Martincoski
2022-07-31 16:35:10 -03:00
committed by Thomas Petazzoni
parent d631615eb1
commit dd28acc1e8
2 changed files with 17 additions and 1 deletions

View File

@@ -1261,6 +1261,11 @@ check-package:
-a -not -name '*.orig' -a -not -name '*.rej' \
-exec ./utils/check-package --exclude=Sob {} +
.PHONY: .checkpackageignore
.checkpackageignore:
find $(TOPDIR) -type f \( -name '*.mk' -o -name '*.hash' -o -name 'Config.*' -o -name '*.patch' \) \
-exec ./utils/check-package --exclude=Sob --failed-only {} > .checkpackageignore +
include docs/manual/manual.mk
-include $(foreach dir,$(BR2_EXTERNAL_DIRS),$(sort $(wildcard $(dir)/docs/*/*.mk)))