[pacman-dev] [PATCH] configure.ac : disable doc by default and check for asciidoc
This is a complaint that has been reported many many times. By default, docs are enabled and there is no check for asciidoc, so anyone building from git will see their build fail. We cannot do a strict check for asciidoc because released source tarballs have man pages already built, and it should be possible to install them without having asciidoc. This patch attempts to improve the situation in two ways : 1) disable doc by default 2) print a warning if docs are enabled but asciidoc is not installed Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> --- configure.ac | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index faf774f..aab0e4b 100644 --- a/configure.ac +++ b/configure.ac @@ -100,8 +100,8 @@ AC_ARG_ENABLE(internal-download, # Help line for documentation AC_ARG_ENABLE(doc, - AS_HELP_STRING([--disable-doc], [prevent make from looking at doc/ dir]), - [wantdoc=$enableval], [wantdoc=yes]) + AS_HELP_STRING([--enable-doc], [run make in doc/ dir]), + [wantdoc=$enableval], [wantdoc=no]) # Help line for doxygen AC_ARG_ENABLE(doxygen, @@ -261,12 +261,18 @@ AC_SUBST(CARCHFLAGS) AC_SUBST(CHOST) # Check for documentation support and status +AC_CHECK_PROGS([ASCIIDOC], [asciidoc]) AC_MSG_CHECKING([for building documentation]) if test "x$wantdoc" = "xyes" ; then - AC_MSG_RESULT([yes]) + if test $ASCIIDOC ; then + AC_MSG_RESULT([yes, enabled by configure]) + else + asciidoc="(warning : asciidoc not installed)" + AC_MSG_RESULT([yes $asciidoc]) + fi wantdoc=yes else - AC_MSG_RESULT([no, disabled by configure]) + AC_MSG_RESULT([no]) wantdoc=no fi AM_CONDITIONAL(WANT_DOC, test "x$wantdoc" = "xyes") @@ -389,7 +395,7 @@ ${PACKAGE_NAME}: build script name : ${BUILDSCRIPT} Compilation options: - Run make in doc/ dir : ${wantdoc} + Run make in doc/ dir : ${wantdoc} ${asciidoc} Use download library : ${internaldownload} Doxygen support : ${usedoxygen} debug support : ${debug} -- 1.7.0.2
On 16/03/10 08:53, Xavier Chantry wrote:
We cannot do a strict check for asciidoc because released source tarballs have man pages already built, and it should be possible to install them without having asciidoc.
This patch attempts to improve the situation in two ways : 1) disable doc by default 2) print a warning if docs are enabled but asciidoc is not installed
Should that be a warning or an error? I think it would be much better to fail during the configure. Allan
On Mon, Mar 15, 2010 at 11:58 PM, Allan McRae <allan@archlinux.org> wrote:
On 16/03/10 08:53, Xavier Chantry wrote:
We cannot do a strict check for asciidoc because released source tarballs have man pages already built, and it should be possible to install them without having asciidoc.
This patch attempts to improve the situation in two ways : 1) disable doc by default 2) print a warning if docs are enabled but asciidoc is not installed
Should that be a warning or an error? I think it would be much better to fail during the configure.
See the first paragraph 'We cannot do a strict check..' It is a very stupid problem.. Maybe a solution would be to have a strict asciidoc checking by default, and add a configure option to skip that check (and maybe building of docs but not install). Then we could also keep docs enabled by default.
On 16/03/10 09:13, Xavier Chantry wrote:
On Mon, Mar 15, 2010 at 11:58 PM, Allan McRae<allan@archlinux.org> wrote:
On 16/03/10 08:53, Xavier Chantry wrote:
We cannot do a strict check for asciidoc because released source tarballs have man pages already built, and it should be possible to install them without having asciidoc.
This patch attempts to improve the situation in two ways : 1) disable doc by default 2) print a warning if docs are enabled but asciidoc is not installed
Should that be a warning or an error? I think it would be much better to fail during the configure.
See the first paragraph 'We cannot do a strict check..' It is a very stupid problem..
Maybe a solution would be to have a strict asciidoc checking by default, and add a configure option to skip that check (and maybe building of docs but not install). Then we could also keep docs enabled by default.
Lets just demonstrate I have not looked into this myself... :P How is this handled for a release tarball? I suspect that there must be something in the configure.ac that stops asciidoc usage then. Can we not add the asciidoc check in that if/else check? I could be missing something... Allan
On Tue, Mar 16, 2010 at 12:25 AM, Allan McRae <allan@archlinux.org> wrote:
Lets just demonstrate I have not looked into this myself... :P
How is this handled for a release tarball? I suspect that there must be something in the configure.ac that stops asciidoc usage then. Can we not add the asciidoc check in that if/else check?
I could be missing something...
I was assuming it was just make feature in use. When you run 'make' twice, the second time usually does nothing since everything is already built.
On 16/03/10 10:08, Xavier Chantry wrote:
On Tue, Mar 16, 2010 at 12:25 AM, Allan McRae<allan@archlinux.org> wrote:
Lets just demonstrate I have not looked into this myself... :P
How is this handled for a release tarball? I suspect that there must be something in the configure.ac that stops asciidoc usage then. Can we not add the asciidoc check in that if/else check?
I could be missing something...
I was assuming it was just make feature in use. When you run 'make' twice, the second time usually does nothing since everything is already built.
It sure is... told you I was missing something. I really do not like --disable-doc being the default for releases so I was hopeful there was something we could utilize to distinguish between git and release sources. However, on further investigation, I can not see anything in configure.ac that is suitable. Adding anything would require an extra step for release so I am not really sure what to do. Allan
On Tue, Mar 16, 2010 at 11:54:11AM +1000, Allan McRae wrote:
I really do not like --disable-doc being the default for releases so I was hopeful there was something we could utilize to distinguish between git and release sources. However, on further investigation, I can not see anything in configure.ac that is suitable. Adding anything would require an extra step for release so I am not really sure what to do.
Please excuse any misunderstanding I might be having (or moment of senility) :) If a person has Arch installed, there is almost a guarantee that pacman is installed. So if they want to compile pacman for whatever reason, it would be reasonable to expect them to use the PKGBUILD (with or without modification). The PKGBUILD can have a makedepends on asciidoc. For any other non-PKGBUILD scenario, the lack of asciidoc should cause a configure error (not just a warning) with a note to install asciidoc or use --disable-doc. The reason I say "should" is because I assume that a proper (in the eyes of the developers) install of their package includes documentation. If it does not, then --disable-docs should be the default. -- Jeff My other computer is an abacus.
On Tue, Mar 16, 2010 at 7:02 PM, Jeff <jeff@kcaccess.com> wrote:
For any other non-PKGBUILD scenario, the lack of asciidoc should cause a configure error (not just a warning) with a note to install asciidoc or use --disable-doc. The reason I say "should" is because I assume that a proper (in the eyes of the developers) install of their package includes documentation. If it does not, then --disable-docs should be the default.
That misses the problem, which is that asciidoc is not required if man pages are already built (in released tarballs as opposed to git sources).
On Tue, Mar 16, 2010 at 07:26:42PM +0100, Xavier Chantry wrote:
That misses the problem, which is that asciidoc is not required if man pages are already built (in released tarballs as opposed to git sources).
Okay, then I was miunderstanding. Let me go back through the thread and see if there is something I can find that would be helpful. Other than, generating the doco and running the autofoo tools, is there anything else done to prep a release tarball? -- Jeff My other computer is an abacus.
On 17/03/10 04:26, Xavier Chantry wrote:
That misses the problem, which is that asciidoc is not required if man pages are already built (in released tarballs as opposed to git sources).
Can we use "make -q" in the doc directory to test if any doc building is needed? The main issue with that approach is that the makefile is generated by the configure... So that would need to be run after the makefile is created which might be weird. Allan
On Thu, Mar 18, 2010 at 11:56 AM, Allan McRae <allan@archlinux.org> wrote:
On 17/03/10 04:26, Xavier Chantry wrote:
That misses the problem, which is that asciidoc is not required if man pages are already built (in released tarballs as opposed to git sources).
Can we use "make -q" in the doc directory to test if any doc building is needed? The main issue with that approach is that the makefile is generated by the configure... So that would need to be run after the makefile is created which might be weird.
I don't know how to handle that. But there is still the proposal in my first answer : Maybe a solution would be to have a strict asciidoc checking by default, and add a configure option to skip that check (and maybe building of docs but not install). Then we could also keep docs enabled by default.
On 18/03/10 22:39, Xavier Chantry wrote:
On Thu, Mar 18, 2010 at 11:56 AM, Allan McRae<allan@archlinux.org> wrote:
On 17/03/10 04:26, Xavier Chantry wrote:
That misses the problem, which is that asciidoc is not required if man pages are already built (in released tarballs as opposed to git sources).
Can we use "make -q" in the doc directory to test if any doc building is needed? The main issue with that approach is that the makefile is generated by the configure... So that would need to be run after the makefile is created which might be weird.
I don't know how to handle that.
But there is still the proposal in my first answer : Maybe a solution would be to have a strict asciidoc checking by default, and add a configure option to skip that check (and maybe building of docs but not install). Then we could also keep docs enabled by default.
I against needing an extra configure flag to build our release tarballs. Especially one that will need disabled on most systems. Allan
participants (3)
-
Allan McRae
-
Jeff
-
Xavier Chantry