Commit graph

2 commits

Author SHA1 Message Date
Íñigo Huguet
02c1869ed4 meson: exclude intermediate files of docs generation from tarball
We want to distribute the generated documentation when we generate the
tarball because we normally do it when we do a release, but `meson dist`
only includes files that are commited to the repository, so a script
meson-dist-data.sh was added with meson.add_dist_script in commit
1c41066a40 ('build: include documentation in meson dist').

This script was copying the whole documentation folders, including some
intermediate files that are not useful for users that wants to read the
docs. Get rid of them and copy only the files that are useful for users:
the generated html pages in docs/api and docs/libnm and the final man
pages.

Also, including these intermediate files caused at least one build
failure, although quite difficult to reproduce:
- Generate tarball with meson
- Untar the generated tarball
- Using the sources from the tarball, configure the project with
  autotools, but building to an out-of-tree folder, not building in
  the source dir (i.e. using a 'build' subfolder). This is called
  a "VPATH build" by autotools and Make. See:
  - https://www.gnu.org/software/make/manual/html_node/General-Search.html
  - https://www.gnu.org/software/automake/manual/html_node/VPATH-Builds.html
- Build

In that scenario, we get an error trying to generate any file under man/
because the man/ subdirectory has not been created. The reason of this
was that the man/ subdirectory is created by the Makefile when
generating the file man/common.ent. However, this file was present in
the source directory because it has been included in the tarball, so
Make detects it and doesn't run the rules to generate it. The result is
that out-of-tree-dir/man folder is not created.

Not including the intermediate files solves this problem.

Fixes: 1c41066a40 ('build: include documentation in meson dist')
(cherry picked from commit 723ad4c0ad)
2024-06-21 20:40:32 +02:00
Jan Vaclav
1c41066a40 build: include documentation in meson dist
Previously, the tarball generated by `meson dist` did not contain the
autogenerated documentation due to the way meson works (packaging the
latest revision control commit). This introduces a dist script which
builds & copies the generated documentation into the distribution
tarball.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1811
2024-01-17 12:39:46 +00:00