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.