diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-09-04 12:32:46 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-09-04 12:32:46 +0200 |
commit | f0699a35b00d0ae35198485ce09af83665c4a88a (patch) | |
tree | 06e7bfa1bbea91505cc1eade5b5e47dd01bd3cd5 | |
parent | 61380bd7ea3421118228d1823e7a3d87d91bda0e (diff) | |
download | external_libqmi-f0699a35b00d0ae35198485ce09af83665c4a88a.zip external_libqmi-f0699a35b00d0ae35198485ce09af83665c4a88a.tar.gz external_libqmi-f0699a35b00d0ae35198485ce09af83665c4a88a.tar.bz2 |
man: generate qmicli manpage from --help-all
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | docs/Makefile.am | 2 | ||||
-rw-r--r-- | docs/man/Makefile.am | 21 |
4 files changed, 29 insertions, 2 deletions
@@ -76,3 +76,5 @@ docs/reference/libqmi-glib/html docs/reference/libqmi-glib/tmpl docs/reference/libqmi-glib/xml docs/reference/libqmi-glib/.libs + +docs/man/qmicli.1 diff --git a/configure.ac b/configure.ac index 356fbba..f04c446 100644 --- a/configure.ac +++ b/configure.ac @@ -86,6 +86,9 @@ AC_SUBST(GLIB_MKENUMS) dnl Documentation GTK_DOC_CHECK(1.0) +dnl Man page +AC_PATH_PROG(HELP2MAN, help2man, false) + AC_CONFIG_FILES([Makefile data/Makefile data/pkg-config/Makefile @@ -103,7 +106,8 @@ AC_CONFIG_FILES([Makefile docs/Makefile docs/reference/Makefile docs/reference/libqmi-glib/Makefile - docs/reference/libqmi-glib/version.xml]) + docs/reference/libqmi-glib/version.xml + docs/man/Makefile]) AC_OUTPUT echo " diff --git a/docs/Makefile.am b/docs/Makefile.am index f3ddc22..88a54ad 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -1 +1 @@ -SUBDIRS = reference +SUBDIRS = reference man diff --git a/docs/man/Makefile.am b/docs/man/Makefile.am new file mode 100644 index 0000000..608545b --- /dev/null +++ b/docs/man/Makefile.am @@ -0,0 +1,21 @@ + +dist_man_MANS = qmicli.1 + +# List of all source files which affect the output of --help-all +SOURCES_WITH_HELP = \ + $(top_srcdir)/cli/qmicli.c \ + $(top_srcdir)/cli/qmicli-dms.c \ + $(top_srcdir)/cli/qmicli-nas.c \ + $(top_srcdir)/cli/qmicli-wds.c \ + $(top_srcdir)/cli/qmicli-pbm.c \ + $(top_srcdir)/cli/qmicli-uim.c + +# Depend only in the source files, not in the actual program, so that the +# manpage doesn't get rebuilt when building from a tarball +qmicli.1: $(SOURCES_WITH_HELP) + - $(AM_V_GEN) $(HELP2MAN) \ + --output=$@ \ + --name='Control QMI devices' \ + --help-option='--help-all' \ + --libtool \ + $(top_builddir)/cli/qmicli |