GNOME Bugzilla – Bug 559281
Correct check for existance of gtkdoc-rebase
Last modified: 2008-11-06 21:03:15 UTC
The current checks in gtk-doc.make and gtk-doc.notmpl.make for whether gtkdoc-rebase exists in the $PATH are not correct. In case gtkdoc-rebase actually does not exist, the test will fail and abort the make, which I doubt was the intention given that the tests exist in the first place. The attached patch should fix this.
Created attachment 121959 [details] [review] Correct check for existence of gtkdoc-rebase
I don't think thsi is needed. The reason is that the command start with "-", which means don't fail.
Look again. It is the first occurrence (where there is an incorrect test with "which gtkdoc-rebase ...") that will cause a problem. The second will just produce ignored errors (as you mention). However, I suggest to fix them both in the same way (as I do not like errors, even if they are ignored).
How is the first not like the 2nd? The whole rule starts with "-". This is going back and forth and I don't want to fix it for one side and break it for the other. The '!' - is that suported by a plain sh? It seems to have the desired effect. $ which peng >/dev/null && peng; echo $? 1 ensonic@sterni:~/projects/gtk-doc$ which echo >/dev/null && echo; echo $? 0 ensonic@sterni:~/projects/gtk-doc$ ! which peng >/dev/null || peng; echo $? 0 ensonic@sterni:~/projects/gtk-doc$ ! which echo >/dev/null || echo; echo $? 0
Oh, I missed that. Seems a bit weird to me to allow the installation to fail, but that is a different issue. Anyway, the construct with "! which ..." should be fine with POSIX shells (tested with dash). Generally a construct like "!A || B" is preferred over "A && B" when writing shell scripts. This is because the latter will result in $? indicating a failure, even if both expressions actually prevent B from running.
* gtk-doc.make: * gtk-doc.notmpl.make: * tests/gtk-doc.make: * tests/gtk-doc.notmpl.make: Correct check for existance of gtkdoc-rebase (better fix than the previous one #508897). Fixes #559281. This commit broke buildbots, as can be seen at http://jhbuild.bxlug.be:8080/gtk-doc Could you look at the build failure? http://jhbuild.bxlug.be:8080/builders/gtk-doc-mandriva-32/builds/182/steps/gtk-doc%20build/logs/stdio Thanks.
The build break does not seem directly related to my patch, but rather to the fact that the '-' at the beginning of the install-data-local rules were removed. This in itself should be correct, but in one way or another the test documentation is built (or has been built at some earlier time), and when make install then tries to install it in /tester it fails (due to the fact that no $(HTML_DIR) is set). I cannot tell from the log whether the test documentation is built as part of the buildbot run, or if it is just some leftover from some manual testing (it would have been nice if the commands executed by buildbot were included in the log...) To make the installation of the test documentation actually work, I guess configure.in would have to be taught about $(HTML_DIR), i.e., some parts of gtk-doc.m4 needs to be included. Alternatively, make sure the test documentation does not exist.
Peter, thanks for the analysis. I removed the complete install rules from the tests. I don't see how make check can install the docs generated in the tests in a meaningfuly way (it could install them in the builddir somehow). The tests are meant to test the parser anyway. Frederic, the builds are green again. Thanks for the notice.