Skip to content
Snippets Groups Projects
Commit 6cbc2e57 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski
Browse files

doc: add automatically generated man pages for gpio-tools


Extend the build files to automatically generate man pages for
gpio-tools using help2man if it's present in the system and we're not
cross-compiling (as the built programs must be executable for help2man
to work).

Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
parent 03a2a19b
No related branches found
No related tags found
No related merge requests found
......@@ -43,3 +43,6 @@ stamp-h1
# unit tests
gpiod-test
# man pages
*.man
......@@ -3,7 +3,7 @@
#
# This file is part of libgpiod.
#
# Copyright (C) 2017-2018 Bartosz Golaszewski <bartekgola@gmail.com>
# Copyright (C) 2017-2019 Bartosz Golaszewski <bartekgola@gmail.com>
#
ACLOCAL_AMFLAGS = -I m4
......@@ -19,6 +19,12 @@ SUBDIRS += tests
endif
if WITH_TOOLS
SUBDIRS += man
endif
if HAS_DOXYGEN
doc:
......
......@@ -3,7 +3,7 @@
#
# This file is part of libgpiod.
#
# Copyright (C) 2017-2018 Bartosz Golaszewski <bartekgola@gmail.com>
# Copyright (C) 2017-2019 Bartosz Golaszewski <bartekgola@gmail.com>
#
AC_PREREQ(2.61)
......@@ -191,6 +191,16 @@ then
AC_MSG_NOTICE([doxygen not found - documentation cannot be generated])
fi
if test "x$cross_compiling" = xno
then
AC_CHECK_PROG([has_help2man], [help2man], [true], [false])
AM_CONDITIONAL([WITH_MANPAGES], [test "x$has_help2man" = xtrue])
if test "x$has_help2man" = xfalse
then
AC_MSG_NOTICE([help2man not found - man pages cannot be generated automatically])
fi
fi
AC_CONFIG_FILES([libgpiod.pc
Makefile
include/Makefile
......@@ -203,6 +213,7 @@ AC_CONFIG_FILES([libgpiod.pc
bindings/cxx/Makefile
bindings/cxx/examples/Makefile
bindings/python/Makefile
bindings/python/examples/Makefile])
bindings/python/examples/Makefile
man/Makefile])
AC_OUTPUT
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of libgpiod.
#
# Copyright (C) 2019 Bartosz Golaszewski <bartekgola@gmail.com>
#
if WITH_MANPAGES
dist_man1_MANS = gpiodetect.man gpioinfo.man gpioget.man gpioset.man gpiofind.man gpiomon.man
%.man: $(top_srcdir)/src/tools/$(*F)
help2man $(top_srcdir)/src/tools/$(*F) --include=./template --output=./$@ --no-info
clean-local:
rm -f $(dist_man1_MANS)
endif
[AUTHOR]
Bartosz Golaszewski <bartekgola@gmail.com>
[REPORTING BUGS]
Report bugs to:
Bartosz Golaszewski <bartekgola@gmail.com>
linux-gpio <linux-gpio@vger.kernel.org>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment