Install manpages via make install, also add some autogenerated manpages#8608
Install manpages via make install, also add some autogenerated manpages#8608laanwj merged 9 commits intobitcoin:masterfrom
Conversation
configure.ac
Outdated
|
|
||
| # Enable manpages | ||
| AC_ARG_ENABLE(man, | ||
| [AS_HELP_STRING([--enable-man], |
There was a problem hiding this comment.
Normally we use --disable-* for the help for options which are enabled by default.
There was a problem hiding this comment.
Makes sense after looking at the other configure options. Would this be better:
+ [AS_HELP_STRING([--disable-man],
+ [do not install man pages (default is to install)])],,
And should I remove "# Enable manpages" comment? only --disable-wallet and --debug has a comment everything else doesn't.
|
Why include generated files (the manpages in this case) in the git repo, rather than just building them during make? (configure can disable man by default if help2man isn't found) |
Because this (now manual) step requires actually executing the built executables to get their help output. I disagree with making that a default step in the build process. It will also not work with cross-compilation, and besides that it's an ugly thing that build systems simply should not do. It would also introduce an extra (build-time) dependency on help2man, which we don't want. There's a similar situation for some other generated files which are 'expensive' to produce, such as the built-in seeds list, the translation files, etc. This should be part of the release process but not automatic in the build. |
|
utACK, will test. |
|
Agree with @laanwj that it is helpful to differentiate between generation of the man pages and installation. Keep in mind that this allows to fiddle with the output, in case help2man is not perfect. |
|
Concept ACK |
|
Nits:
Apart from that, tested ACK. |
|
Concept ACK. Agreed with the points above. Though, if we're pre-generating the pages and keeping them in-repo, we need to be careful about #ifdefs in help output. For example: https://github.com/bitcoin/bitcoin/blob/master/src/init.cpp#L317 Also, I'd much rather use a makefile target for generating, similar to the way the other generated files are produced. That helps to keep everything in sync since the vars are shared around. |
I just don't like the alternative. If this could be parsed from the C source without executing, I'd be fine with doing generation during build process. |
…now also runs binaries from build dir by default, added variables for more control
Yes I have updated the script somewhat to strip the commit id from the help2man output. It now also has some variables like BITCOIND BITCOINCLI and so on, as luke-jr suggested above somewhere and it now runs the binaries from the build dir, not from $PATH anymore.
Okay. Should I just write that it needs to be regenerated prior to release, like this?
Oops. Thanks for noticing this, somehow I forgot about bitcoin-tx. It is included now :) I also noticed another annoyance: |
|
here is something which is probably better. master...nomnombtc:man_automake4
Please tell me if you guys like this one better :) |
|
Thanks for sticking with this, ACK d19583f |
…erated manpages d19583f improved gen-manpages.sh, includes bitcoin-tx and strips commit tag, now also runs binaries from build dir by default, added variables for more control (nomnombtc) 09546ca regenerated all manpages with commit tag stripped, also add bitcoin-tx (nomnombtc) ae6e754 change help string --enable-man to --disable-man (nomnombtc) a32c102 add conditional for --enable-man, default is yes (nomnombtc) dc84b6f add doc/man to subdir if configure flag --enable-man is set (nomnombtc) 00dba72 add doc/man/Makefile.am to include manpages (nomnombtc) eb5643b add autogenerated manpages by help2man (nomnombtc) 6edf2fd add gen-manpages.sh description to README.md (nomnombtc) d2cd9c0 add script to generate manpages with help2man (nomnombtc)
Improve autogenerated manpages Cherry-picked from bitcoin/bitcoin#8608. Closes #2086.
…autogenerated manpages d19583f improved gen-manpages.sh, includes bitcoin-tx and strips commit tag, now also runs binaries from build dir by default, added variables for more control (nomnombtc) 09546ca regenerated all manpages with commit tag stripped, also add bitcoin-tx (nomnombtc) ae6e754 change help string --enable-man to --disable-man (nomnombtc) a32c102 add conditional for --enable-man, default is yes (nomnombtc) dc84b6f add doc/man to subdir if configure flag --enable-man is set (nomnombtc) 00dba72 add doc/man/Makefile.am to include manpages (nomnombtc) eb5643b add autogenerated manpages by help2man (nomnombtc) 6edf2fd add gen-manpages.sh description to README.md (nomnombtc) d2cd9c0 add script to generate manpages with help2man (nomnombtc)
…autogenerated manpages d19583f improved gen-manpages.sh, includes bitcoin-tx and strips commit tag, now also runs binaries from build dir by default, added variables for more control (nomnombtc) 09546ca regenerated all manpages with commit tag stripped, also add bitcoin-tx (nomnombtc) ae6e754 change help string --enable-man to --disable-man (nomnombtc) a32c102 add conditional for --enable-man, default is yes (nomnombtc) dc84b6f add doc/man to subdir if configure flag --enable-man is set (nomnombtc) 00dba72 add doc/man/Makefile.am to include manpages (nomnombtc) eb5643b add autogenerated manpages by help2man (nomnombtc) 6edf2fd add gen-manpages.sh description to README.md (nomnombtc) d2cd9c0 add script to generate manpages with help2man (nomnombtc)
…autogenerated manpages d19583f improved gen-manpages.sh, includes bitcoin-tx and strips commit tag, now also runs binaries from build dir by default, added variables for more control (nomnombtc) 09546ca regenerated all manpages with commit tag stripped, also add bitcoin-tx (nomnombtc) ae6e754 change help string --enable-man to --disable-man (nomnombtc) a32c102 add conditional for --enable-man, default is yes (nomnombtc) dc84b6f add doc/man to subdir if configure flag --enable-man is set (nomnombtc) 00dba72 add doc/man/Makefile.am to include manpages (nomnombtc) eb5643b add autogenerated manpages by help2man (nomnombtc) 6edf2fd add gen-manpages.sh description to README.md (nomnombtc) d2cd9c0 add script to generate manpages with help2man (nomnombtc)
This adds a new option
--enable-manto configure, so manpages can be installed viamake install.This option defaults to yes, but opt out of the manpage installation is possible by running
./configure --disable-man(or--enable-man=no)As the license situation of the contrib/debian manpages is that most of them are GPL it was not 100% clear if they can be included here, also they are incomplete anyway so I let
help2mancreate a few manpages from the 0.13.0 binaries and included them.The script used to generate them has also been added to contrib/devtools.
This targets #7626 but was also briefly discussed in #8568