GNOME Bugzilla – Bug 740035
docs: make the settings docs work from tarball builds
Last modified: 2014-12-01 11:05:28 UTC
docs/api/settings-spec.xml was accidentally not getting disted, because gtk-doc.make explicitly removes all DISTCLEANFILES from distdir. However, it doesn't actually make sense for the settings docs files to be in DISTCLEANFILES anyway; they were put there rather than CLEANFILES (IIRC) so that "make clean" in a tarball build wouldn't delete them and break things. But the right fix is to just make them only be in CLEANFILES when BUILD_SETTING_DOCS is true, and not ever get deleted otherwise. Meanwhile, in an unrelated but also fatal bug, configure.ac's check for if the generated docs were already present never got updated for the cli/src -> clients/cli move, and so even if we had been disting settings-spec.xml, configure would still think that the tarball didn't have all of the generated docs in it, so SETTING_DOCS_AVAILABLE would be set false and none of the generated docs would get used.
Created attachment 290556 [details] [review] docs: make the settings docs work from tarball builds
Looks right. But now `make distcheck` fails: Making all in libnm make[3]: Entering directory `/data/src/NetworkManager/NetworkManager-0.9.11.0/_build/docs/libnm' make[3]: Leaving directory `/data/src/NetworkManager/NetworkManager-0.9.11.0/_build/docs/libnm' Making all in api make[3]: Entering directory `/data/src/NetworkManager/NetworkManager-0.9.11.0/_build/docs/api' xsltproc --output ../../../docs/api/settings-spec.xml ../../../docs/api/settings-spec.xsl ../../libnm-util/nm-setting-docs.xml I/O error : Permission denied I/O error : Permission denied make[3]: *** [../../../docs/api/settings-spec.xml] Error 11 make[3]: Leaving directory `/data/src/NetworkManager/NetworkManager-0.9.11.0/_build/docs/api' $ ls -la ../../../docs/api/settings-spec.xml \ ../../../docs/api/settings-spec.xsl \ ../../libnm-util/nm-setting-docs.xml -r--r--r--. 1 thom thom 92962 Nov 13 19:11 ../../../docs/api/settings-spec.xml -r--r--r--. 1 thom thom 1480 Nov 13 17:46 ../../../docs/api/settings-spec.xsl -rw-r--r--. 1 thom thom 73802 Nov 13 19:12 ../../libnm-util/nm-setting-docs.xml
Making all in api make[4]: Entering directory `/tmp/NetworkManager/NetworkManager-0.9.11.0/_build/docs/api' DOC Preparing build DOC Scanning header files GEN ../../../docs/api/settings-spec.xml I/O error : Permission denied I/O error : Permission denied make[4]: *** [../../../docs/api/settings-spec.xml] Error 11 make[4]: *** Waiting for unfinished jobs.... DOC Introspecting gobjects make[4]: Leaving directory `/tmp/NetworkManager/NetworkManager-0.9.11.0/_build/docs/api' make[3]: *** [all-recursive] Error 1 All the files in the src/tarball dir (/home/dcbw/Development/fdo/NetworkManager/NetworkManager-0.9.11.0/) are 444 so they can't be written too: $ cd /tmp/NetworkManager/NetworkManager-0.9.11.0/_build/docs/api $ make -j1 GEN ../../../docs/api/settings-spec.xml I/O error : Permission denied I/O error : Permission denied make: *** [../../../docs/api/settings-spec.xml] Error 11 $ ls -al ../../../docs/api/settings-spec.xml -r--r--r--. 1 dcbw dcbw 92962 Nov 13 13:22 ../../../docs/api/settings-spec.xml
Created attachment 290711 [details] [review] fixup! docs: make the settings docs work from tarball builds OK, this fixes the distcheck problem, by making it so that none of the settings docs stuff depend on anything created at build time (meaning none of it will get rebuilt when building from a tarball). The "|" syntax is a GNU make-ism that says that nm-setting-docs.xml can only be built after the gir, etc, are built, but it doesn't need to be RE-built if they change. Making it depend on the source files instead should force it to get rebuilt whenever it actually does need to be (without causing it to ever get rebuilt in a tarball build).
Pushed the two patches to: danw/settings-doc-build-bgo740035 Unless I made a mistake, the `make distcheck` still fails
Yeah, distcheck still fails for me too, even after 'git clean -dfx; autogen; make; make distcheck'. Same error.
For some reason distcheck is not failing for me... I pushed another fixup; I think this should fix it? (nm-setting-docs.xml is no longer getting rebuilt for me during the distcheck.)
Works for me now
Attachment 290556 [details] pushed as 16a9fc4 - docs: make the settings docs work from tarball builds