]> granicus.if.org Git - sudo/commitdiff
Add lint target to run "mandoc -Tlint" over the manuals.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 11 May 2015 16:22:05 +0000 (10:22 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 11 May 2015 16:22:05 +0000 (10:22 -0600)
doc/Makefile.in

index 069249465cc45cdd915b85552287787b9c2feb47..5d53a31d5379e76b75d82d3558177717367e119e 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2010-2014 Todd C. Miller <Todd.Miller@courtesan.com>
+# Copyright (c) 2010-2015 Todd C. Miller <Todd.Miller@courtesan.com>
 #
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -92,6 +92,17 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 
 all: $(DEVDOCS) $(DOCS)
 
+lint: all
+       @if [ "$(mantype)" != "mdoc" ]; then \
+           echo "make lint only supported for mdoc manuals" 1>&2; \
+           exit 1; \
+       else \
+           for m in $(DOCS); do \
+               echo $(MANDOC) -Tlint $$m; \
+               $(MANDOC) -Tlint $$m; \
+           done; \
+       fi
+
 Makefile: $(srcdir)/Makefile.in
        (cd $(top_builddir) && ./config.status --file doc/Makefile)