[pango/ebassi/dist-docs] build: Add documentation to the release tarball
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/ebassi/dist-docs] build: Add documentation to the release tarball
- Date: Mon, 15 Mar 2021 17:06:59 +0000 (UTC)
commit 45f7092424dd3a867cb95040019d912ef0854895
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Mar 12 14:11:37 2021 +0000
build: Add documentation to the release tarball
Rebuilding the project with documentation enabled will also rebuild the
documentation.
build-aux/meson/dist-docs.py | 23 +++++++++++++++++++++++
meson.build | 4 ++++
2 files changed, 27 insertions(+)
---
diff --git a/build-aux/meson/dist-docs.py b/build-aux/meson/dist-docs.py
new file mode 100755
index 00000000..95887412
--- /dev/null
+++ b/build-aux/meson/dist-docs.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+
+import os
+import shutil
+
+references = [
+ 'docs/Pango',
+ 'docs/PangoCairo',
+ 'docs/PangoFc',
+ 'docs/PangoFT2',
+ 'docs/PangoOT',
+ 'docs/PangoXft',
+]
+
+sourceroot = os.environ.get('MESON_SOURCE_ROOT')
+buildroot = os.environ.get('MESON_BUILD_ROOT')
+distroot = os.environ.get('MESON_DIST_ROOT')
+
+for reference in references:
+ src_path = os.path.join(buildroot, reference)
+ if os.path.isdir(src_path):
+ dst_path = os.path.join(distroot, reference)
+ shutil.copytree(src_path, dst_path)
diff --git a/meson.build b/meson.build
index 5f9967c7..894c6071 100644
--- a/meson.build
+++ b/meson.build
@@ -606,3 +606,7 @@ subdir('tools')
if get_option('gtk_doc')
subdir('docs')
endif
+
+if not meson.is_subproject()
+ meson.add_dist_script('build-aux/meson/dist-docs.py')
+endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]