linuxmint / xapp

Cross-desktop libraries and common resources
GNU Lesser General Public License v3.0
129 stars 44 forks source link

Build: re-add an option to disable building documentation #35

Closed eli-schwartz closed 6 years ago

clefebvre commented 6 years ago

Wouldn't this default to disabling docs, if not specified?

In other words, you changed the default build configuration from having docs, to not having docs... should you not introduce a disable-docs option instead, to preserve the same default behaviour as before?

eli-schwartz commented 6 years ago

meson options default to true, see http://mesonbuild.com/Build-options.html#booleans and the output of meson configure after running meson without specifying options.

That being said, it might be worth also trying to autodetect the availability of gtk-doc and turn it off rather than failing the build due to its absence...

clefebvre commented 6 years ago

Cool, why not.

eli-schwartz commented 6 years ago

I force-pushed a change so that if enable-doc is set, it will first check to see whether gtkdoc-scan exists, and issue a warning otherwise.

AFAICT there is no way for meson to report on whether, say, gnome.gtkdoc() is functional.

clefebvre commented 6 years ago

Hi @eli-schwartz,

That looks good, but why use an option? Why not just rely on the presence of the binary? Distributions can then either add it to their build-deps or not.

clefebvre commented 6 years ago

Hi @eli-schwartz, @mtwebster added an option for this and pushed to master.

mtwebster commented 6 years ago

Ah shoot sorry, I missed this PR, we had some internal discussion about this and I just added it.

eli-schwartz commented 6 years ago

The purpose of the option is to allow people to decide they do not want to bother building it, regardless of whether they have gtk-doc installed for unrelated reasons (e.g. personal, non-distro, non-clean-chroot builds).

The purpose of checking for the binary, is to try to gracefully fall back on assuming you don't want it rather than erroring out, if a) the option is enabled by default, and b) gtk-doc is not installed. The merged change works for me, though. (I didn't know whether you wanted it enabled by default, so I figured I would preserve the status quo. Also the previous autotools setup seems to have had it enabled by default.)