* [PATCH iproute2 1/3] man: ss.8: more line breaks
@ 2019-01-12 12:28 Luca Boccassi
2019-01-12 12:28 ` [PATCH iproute2 2/3] man: tc-taprio.8: fix syntax error Luca Boccassi
2019-01-12 12:28 ` [PATCH iproute2 3/3] Makefile: check manpages for syntax errors Luca Boccassi
0 siblings, 2 replies; 3+ messages in thread
From: Luca Boccassi @ 2019-01-12 12:28 UTC (permalink / raw)
To: netdev; +Cc: stephen, Luca Boccassi
groff stiff complains about unbreakable lines:
96: warning [p 2, 3.0i]: can't break line
Indent it some more.
Fixes: 7f5047524c99 ("man: ss.8: break and indent long line")
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
man/man8/ss.8 | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/man/man8/ss.8 b/man/man8/ss.8
index f138c91a..553a6cf4 100644
--- a/man/man8/ss.8
+++ b/man/man8/ss.8
@@ -89,11 +89,17 @@ an uuid of the socket
Show socket memory usage. The output format is:
.RS
.P
-skmem:(r<rmem_alloc>,rb<rcv_buf>,t<wmem_alloc>,tb<snd_buf>,f<fwd_alloc>,
+skmem:(r<rmem_alloc>,rb<rcv_buf>,t<wmem_alloc>,tb<snd_buf>,
.br
.RS
.RS
-w<wmem_queued>,o<opt_mem>,bl<back_log>)
+f<fwd_alloc>,w<wmem_queued>,
+.RE
+.RE
+.br
+.RS
+.RS
+o<opt_mem>,bl<back_log>)
.RE
.RE
.P
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH iproute2 2/3] man: tc-taprio.8: fix syntax error
2019-01-12 12:28 [PATCH iproute2 1/3] man: ss.8: more line breaks Luca Boccassi
@ 2019-01-12 12:28 ` Luca Boccassi
2019-01-12 12:28 ` [PATCH iproute2 3/3] Makefile: check manpages for syntax errors Luca Boccassi
1 sibling, 0 replies; 3+ messages in thread
From: Luca Boccassi @ 2019-01-12 12:28 UTC (permalink / raw)
To: netdev; +Cc: stephen, Luca Boccassi
.Q does not exist so groff complains and the "queues" word is actually
not displayed.
Fixes: 579acb4bc52f ("taprio: Add manpage for tc-taprio(8)")
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
man/man8/tc-taprio.8 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/man8/tc-taprio.8 b/man/man8/tc-taprio.8
index 92055b43..850be9b0 100644
--- a/man/man8/tc-taprio.8
+++ b/man/man8/tc-taprio.8
@@ -45,7 +45,7 @@ How traffic is mapped to different hardware queues is similar to
and so the
.B map
and
-.Q queues
+.B queues
parameters have the same meaning.
The other parameters specify the schedule, and at what point in time
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH iproute2 3/3] Makefile: check manpages for syntax errors
2019-01-12 12:28 [PATCH iproute2 1/3] man: ss.8: more line breaks Luca Boccassi
2019-01-12 12:28 ` [PATCH iproute2 2/3] man: tc-taprio.8: fix syntax error Luca Boccassi
@ 2019-01-12 12:28 ` Luca Boccassi
1 sibling, 0 replies; 3+ messages in thread
From: Luca Boccassi @ 2019-01-12 12:28 UTC (permalink / raw)
To: netdev; +Cc: stephen, Luca Boccassi
Pass the same parameters Lintian uses in Debian.
$ make check
<...>
Checking manpages for syntax errors...
<standard input>:48: warning: macro `Q' not defined
Error in tc-taprio.8
Makefile:27: recipe for target 'check' failed
Signed-off-by: Luca Boccassi <bluca@debian.org>
---
As far as I can see all the shell-ery should be portable and not
bash specific. Do not error out if man is not present, to avoid
issues on minimal build workers. The rest comes from coreutils
(tee, wc) so we can assume they are available.
Makefile | 6 ++++++
man/Makefile | 9 +++++++--
man/man3/Makefile | 6 +++++-
man/man7/Makefile | 6 +++++-
man/man8/Makefile | 6 +++++-
5 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index a513cf38..48f469b0 100644
--- a/Makefile
+++ b/Makefile
@@ -115,6 +115,12 @@ distclean: clobber
check: all
cd testsuite && $(MAKE) && $(MAKE) alltests
+ @if command -v man >/dev/null 2>&1; then \
+ echo "Checking manpages for syntax errors..."; \
+ $(MAKE) -C man check; \
+ else \
+ echo "man not installed, skipping checks for syntax errors."; \
+ fi
cscope:
cscope -b -q -R -Iinclude -sip -slib -smisc -snetem -stc
diff --git a/man/Makefile b/man/Makefile
index 6b095ee4..0c759dd2 100644
--- a/man/Makefile
+++ b/man/Makefile
@@ -2,14 +2,19 @@
INSTALL=install
INSTALLDIR=install -m 0755 -d
INSTALLMAN=install -m 0644
+# Pass the same parameters as Lintian uses on Debian.
+MAN_CHECK=LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings \
+ --encoding=UTF-8 --local-file --troff-device=utf8 --ditroff
+# Hide man output, count and print errors.
+MAN_REDIRECT=2>&1 >/dev/null | tee /dev/fd/2 | wc -l
SUBDIRS = man3 man7 man8
-all clean install:
+all clean install check:
@for subdir in $(SUBDIRS); do $(MAKE) -C $$subdir $@ || exit $$?; done
distclean: clean
-.PHONY: install clean distclean
+.PHONY: install clean distclean check
.EXPORT_ALL_VARIABLES:
diff --git a/man/man3/Makefile b/man/man3/Makefile
index e3d3e607..1732be26 100644
--- a/man/man3/Makefile
+++ b/man/man3/Makefile
@@ -11,4 +11,8 @@ install:
$(INSTALLDIR) $(DESTDIR)$(MANDIR)/man3
$(INSTALLMAN) $(MAN3PAGES) $(DESTDIR)$(MANDIR)/man3
-.PHONY: install clean distclean
+check:
+ @for page in $(MAN3PAGES); do test 0 -eq $$($(MAN_CHECK) $$page \
+ $(MAN_REDIRECT)) || { echo "Error in $$page"; exit 1; }; done
+
+.PHONY: install clean distclean check
diff --git a/man/man7/Makefile b/man/man7/Makefile
index 1a8d5219..c0e545a1 100644
--- a/man/man7/Makefile
+++ b/man/man7/Makefile
@@ -11,4 +11,8 @@ install:
$(INSTALLDIR) $(DESTDIR)$(MANDIR)/man7
$(INSTALLMAN) $(MAN7PAGES) $(DESTDIR)$(MANDIR)/man7
-.PHONY: install clean distclean
+check:
+ @for page in $(MAN7PAGES); do test 0 -eq $$($(MAN_CHECK) $$page \
+ $(MAN_REDIRECT)) || { echo "Error in $$page"; exit 1; }; done
+
+.PHONY: install clean distclean check
diff --git a/man/man8/Makefile b/man/man8/Makefile
index 932ba1f3..0269e174 100644
--- a/man/man8/Makefile
+++ b/man/man8/Makefile
@@ -23,4 +23,8 @@ install:
$(INSTALLDIR) $(DESTDIR)$(MANDIR)/man8
$(INSTALLMAN) $(MAN8PAGES) $(DESTDIR)$(MANDIR)/man8
-.PHONY: install clean distclean
+check: all
+ @for page in $(MAN8PAGES); do test 0 -eq $$($(MAN_CHECK) $$page \
+ $(MAN_REDIRECT)) || { echo "Error in $$page"; exit 1; }; done
+
+.PHONY: install clean distclean check
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-01-12 12:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-12 12:28 [PATCH iproute2 1/3] man: ss.8: more line breaks Luca Boccassi
2019-01-12 12:28 ` [PATCH iproute2 2/3] man: tc-taprio.8: fix syntax error Luca Boccassi
2019-01-12 12:28 ` [PATCH iproute2 3/3] Makefile: check manpages for syntax errors Luca Boccassi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.