]> git.tuebingen.mpg.de Git - paraslash.git/commit - m4/gengetopt/makefile
build: Generate man pages directly from ggo files.
authorAndre Noll <maan@systemlinux.org>
Fri, 30 Aug 2013 00:10:41 +0000 (00:10 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 1 Dec 2013 10:47:32 +0000 (11:47 +0100)
commitaab667adba868be9e9038a8686dc4919a5a8e96d
treecc0863ec6f552a3f639f69731097848420090ed1
parent9a8a158a2b7f2125e24dc387db49fe0c1c19d83c
build: Generate man pages directly from ggo files.

Currently all man pages are created by help2man which executes the
para_xxx binaries just compiled with the --detailed-help and --version
options given to obtain the input for the man page to create.

The obvious shortcoming of this approach is that it simply does not
work when cross-compiling. There is another disadvantage though: Since
the man page file (para_xxx.1) depends on the executable (para_xxx),
any code change causes all affected man pages to be recreated, even
if nothing has changed that would alter the man page content.

The good news is that gengetopt can create the help output without
generating or compiling any code. The bad news is that help2man
insists on executing a program with --help and --version to get the
output.

This commit teaches Makefile to create a dummy shell script for each
executable which accepts the above options and runs gengetopt on the
.ggo file to obtain the help text.

This makes cross-compiling possible and shortens rebuild times since
with the patch applied, the man page is only recreated when the ggo
file changes.
Makefile.in
m4/gengetopt/makefile