Commit Graph

7 Commits

Author SHA1 Message Date
Jehan b64f79fed9 devel-docs: don't build reference docs when GIR aren't generated.
This can happens in cross-compilation cases for instance.
2023-05-11 12:46:57 +02:00
Jehan 4d8c1e3439 devel-docs: removing version.in.
I was wondering what this version file was for. After some git
archeology, turns out this was used for gtk-docs. Since we replaced
gtk-docs with gi-docgen in commit 92e80d12e8, this can be removed as
well.
2022-02-01 14:00:21 +01:00
Jehan d5e22ad313 configure, meson, devel-docs: make gi-docgen into an auto option.
Also called "feature" option in meson, so that by default it depends on
auto-detection of the gi-docgen hence won't break the configuration when
the tool is missing (the feature is simply disabled).

Also move the program check into the root meson file, which is anyway
much better to have a better visibility of features, otherwise we'd end
up just having tests everywhere in any possible random directory of the
repo.

Finally add a line in the summary of the configuration step, displaying
the docs generation being enabled or disabled.
2021-12-29 00:58:10 +01:00
Niels De Graef 92e80d12e8 docs: Migrate from gtk-doc to gi-docgen
gtk-doc has been slowly dying for the past few years; with gi-docgen we
have a nice successor.

This also makes sure the C documentation also uses the GIR file, which
in turn means faster build times (since all the C code doesn't have to
be parsed and recompiled again), and has a clear dependency graph.

See the [gi-docgen tutorial] for more info on how the system works.

[gi-docgen tutorial]: https://gnome.pages.gitlab.gnome.org/gi-docgen/tutorial.html
2021-12-27 10:47:34 +01:00
Jehan eae3d47e32 devel-docs, meson: g-ir-doc option to generate introspected API docs.
Similar to the --enable-g-ir-doc option I just added on autotools. Also
separate this option from gtk-doc as it is unrelated (not everything
under devel-docs is related to gtk-doc!).
2021-01-29 16:51:47 +01:00
Jehan 82209920a9 devel-docs: Introspected Python libgimp and libgimpui docs generation.
Based on the proposed process proposed by Akkana Peck. Thanks Akk!
For now, it's only in the meson build, which is fairly terrible to use
as soon as we do custom build rules. Here are the list of issues:

- meson does not allow building in subdir (issue 2320 on meson tracker).
  Sure I could make several subdirs with meson in them. But here the
  future goal would be to be able to generate docs for other
  introspected languages, and maybe also other output formats (epub or
  whatnot). For this, since these are basically the same commands which
  are used, the best practice would be to have loops generating one
  target per language/format combination, reusing code rather than ugly
  copy-pasting in subdirectories' meson files).
- custom_target() requires the output parameter to be the complete list
  of generated files. But we have more than a thousand of them. It's not
  practical. Maybe we could try to find a way to generate the list from
  the contents of the .def files which are already exhaustive and exact.
- Install also requires the output list to be complete.
- I temporarily have these docs not generated by default (because the
  gtk-doc option is already crazy slow as it is, making meson near
  unusable for development if it's enabled). If you want to generate the
  docs, the commands are as following (yeah I don't understand what the
  target names are for since meson does not actually create targets with
  these names, so we have to use fake output names instead):

> ninja devel-docs/g-ir-docs/Gimp-python-html
> ninja devel-docs/g-ir-docs/GimpUi-python-html
2021-01-21 16:50:47 +01:00
Félix Piédallu 65eff6f150 Meson port. 2019-09-11 16:42:04 +02:00