From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 9316558973 for ; Fri, 5 Feb 2016 23:46:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2A956E0838; Fri, 5 Feb 2016 23:46:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A6328E0838 for ; Fri, 5 Feb 2016 23:46:02 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A7544340B4F for ; Fri, 5 Feb 2016 23:46:01 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3AA6B8F4 for ; Fri, 5 Feb 2016 23:46:00 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1454715954.13a31c7b34b8afe93bb38f751eb6b1e45c590dca.robbat2@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: Makefile X-VCS-Directories: / X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 13a31c7b34b8afe93bb38f751eb6b1e45c590dca X-VCS-Branch: master Date: Fri, 5 Feb 2016 23:46:00 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3000a170-eeab-47eb-abee-443965ebd5da X-Archives-Hash: 047fa710ca0fe371b601cf6793ac5230 commit: 13a31c7b34b8afe93bb38f751eb6b1e45c590dca Author: Robin H. Johnson gentoo org> AuthorDate: Fri Feb 5 23:45:38 2016 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Fri Feb 5 23:45:54 2016 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=13a31c7b Makefile: add a check to ensure all output from --help is documented. Signed-off-by: Robin H. Johnson gentoo.org> Makefile | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 207f7cf..5bea2ba 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ check-git-repository: git diff --quiet || { echo 'STOP, you have uncommitted changes in the working directory' ; false ; } git diff --cached --quiet || { echo 'STOP, you have uncommitted changes in the index' ; false ; } -dist: check-git-repository distclean $(EXTRA_DIST) +dist: verify-doc check-git-repository distclean $(EXTRA_DIST) mkdir "$(distdir)" git ls-files -z | xargs -0 cp --no-dereference --parents --target-directory="$(distdir)" \ $(EXTRA_DIST) @@ -41,7 +41,7 @@ dist: check-git-repository distclean $(EXTRA_DIST) distclean: clean rm -Rf "$(distdir)" "$(distdir)".tar "$(distdir)".tar.xz -.PHONY: clean check-git-repository dist distclean kconfig +.PHONY: clean check-git-repository dist distclean kconfig verify-doc # Generic rules %/generated-config: %/arch-config $(BASE_KCONF) merge.pl Makefile @@ -54,3 +54,30 @@ distclean: clean %.8: doc/%.8.txt doc/asciidoc.conf Makefile genkernel a2x --conf-file=doc/asciidoc.conf --attribute="genkernelversion=$(PACKAGE_VERSION)" \ --format=manpage -D . "$<" + +verify-doc: doc/genkernel.8.txt + @rm -f faildoc ; \ + GK_SHARE=. ./genkernel --help | \ + sed 's,-->, ,g' | \ + fmt -1 | \ + grep -e '--' | \ + tr -s '[:space:].,' ' ' | \ + sed -r \ + -e 's,=<[^>]+>,,g' | \ + tr -s ' ' '\n' | \ + sed -r \ + -e 's,[[:space:]]*--(no-)?,,g' \ + -e '/bootloader/s,=grub,,g' | \ + while read opt ; do \ + regex="^*--(...no-...)?$$opt" ; \ + if ! egrep -e "$$regex" $< -sq ; then \ + touch faildoc ; \ + echo "Undocumented option: $$opt" ; \ + fi ; \ + done ; \ + if test -e faildoc ; then \ + echo "Refusing to build!" ; \ + rm -f faildoc ; \ + exit 1 ; \ + fi ; \ + rm -f faildoc