diff options
author | Carlos O'Donell <carlos@redhat.com> | 2023-05-18 16:18:22 -0400 |
---|---|---|
committer | Carlos O'Donell <carlos@redhat.com> | 2023-06-02 21:43:05 -0400 |
commit | 547de57e5a54d3a02733523b75f261e95fc71579 (patch) | |
tree | 5a71c8bc300dadde2ed684a4a3078207e85d0338 /Makefile | |
parent | ac14b7ee0620268544a2401c06824dc7d0aeb6a2 (diff) | |
download | glibc-547de57e5a54d3a02733523b75f261e95fc71579.zip glibc-547de57e5a54d3a02733523b75f261e95fc71579.tar.gz glibc-547de57e5a54d3a02733523b75f261e95fc71579.tar.bz2 |
Add lint-makefiles Makefile linting test.
We add a 'make check' test that lints all Makefiles in the source
directory of the glibc build. This linting test ensures that the
lines in all Makefiles will be sorted correctly as developers
creates patches. It is added to 'make check' because it is
light-weight and supports the existing developer workflow
The test adds ~3s to a 'make check' execution.
No regressions on x86_64 and i686.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -564,6 +564,16 @@ $(objpfx)check-wrapper-headers.out: scripts/check-wrapper-headers.py $(headers) --generated $(common-generated) > $@; $(evaluate-test) endif # $(headers) +# Lint all Makefiles; including this one. Pass `pwd` as the source +# directory since the top-level Makefile is in the root of the source +# tree and these tests are run from there. We add light-weight linting +# to the 'check' target to support the existing developer workflow of: +# edit -> make -> make check; without needing an additional step. +tests-special += $(objpfx)lint-makefiles.out +$(objpfx)lint-makefiles.out: scripts/lint-makefiles.sh + $(SHELL) $< "$(PYTHON)" `pwd` > $@ ; \ + $(evaluate-test) + define summarize-tests @grep -E -v '^(PASS|XFAIL):' $(objpfx)$1 || true @echo "Summary of test results$2:" |