From nobody Sun Feb 8 15:08:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1594894299; cv=none; d=zohomail.com; s=zohoarc; b=WkIm7Vr30sgWwgZfubSQJ0Aa7eS+ND2Aq0aXMaNyCsVY/OJEFyuDsRpwsT6RDLSfmZz2tO3UZxffmwalxvsjpmELj3z6dmWwMVnYEaARCHtGfp1lF+AoIEDkMQewnR1PHsub3he/ULCl9WCMOqke1swcyu59E5hyqFK4OnwzfTI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594894299; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5cO1+PTszHMH6L8uJZYjwkwq/86gSaIShUIhQ+fhl9w=; b=AKfbTuu4uYr4ba9pu7K45eM37zY0nu9sR+X8KCvzsK5LVHQwkEZKfqSAvI+/UnbVSrwpytq0WNj7HqAljsDXQSiP3pxTp1qHqM4XDQVHJxVU3pl6syI1QjqJxchfb0sBUhtLbY9CnHFiIlLZQlIxJ+FR7GuyqXpwnFTj0IiUX74= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1594894299036245.0979196672847; Thu, 16 Jul 2020 03:11:39 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-145-U7rscFt1NDm9iaSLHkc74A-1; Thu, 16 Jul 2020 06:11:35 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A1B121888AAA; Thu, 16 Jul 2020 10:11:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 80F9079D16; Thu, 16 Jul 2020 10:11:29 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 50A2C181B9FD; Thu, 16 Jul 2020 10:11:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06GA7mBZ021242 for ; Thu, 16 Jul 2020 06:07:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3E8F12DE96; Thu, 16 Jul 2020 10:07:48 +0000 (UTC) Received: from antique-work.redhat.com (unknown [10.40.194.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id ADB102DE6B for ; Thu, 16 Jul 2020 10:07:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594894297; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=5cO1+PTszHMH6L8uJZYjwkwq/86gSaIShUIhQ+fhl9w=; b=Z2egr/eAawhDFUhUY4GCvl9BLuyiZaSGr7S1nq2MlPXvODq6rAgrczLXFIN+ZLfOFyhNw5 GE20MiVs+2CZ7GR73IJ90VuAeA7vjnNCK67sx3hlDb0Ur5sMKQjT33cin3YF9nuiKppJHR V2vM/7HwmM9i1aEW5nnnxLbzYAUCeqA= X-MC-Unique: U7rscFt1NDm9iaSLHkc74A-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH 344/351] meson: add rule to build and install only web documentation Date: Thu, 16 Jul 2020 11:59:40 +0200 Message-Id: <3d4b7d3c7c312250bdb249a834732077652396e5.1594891445.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Pavel Hrdina --- docs/fonts/meson.build | 6 ++++-- docs/html/meson.build | 7 +++++++ docs/internals/meson.build | 5 ++++- docs/js/meson.build | 6 ++++-- docs/kbase/meson.build | 5 ++++- docs/logos/meson.build | 6 ++++-- docs/manpages/meson.build | 5 ++++- docs/meson.build | 26 ++++++++++++++++++++++---- scripts/meson-install-web.py | 10 ++++++++++ scripts/meson.build | 1 + 10 files changed, 64 insertions(+), 13 deletions(-) create mode 100755 scripts/meson-install-web.py diff --git a/docs/fonts/meson.build b/docs/fonts/meson.build index 8c0a2f1554d..e4109c6e7dc 100644 --- a/docs/fonts/meson.build +++ b/docs/fonts/meson.build @@ -15,8 +15,10 @@ fonts =3D [ =20 install_data(fonts, install_dir: docs_html_dir / 'fonts') =20 -# This hack enables us to view the web pages -# from within the uninstalled build tree foreach file : fonts + # This hack enables us to view the web pages + # from within the uninstalled build tree configure_file(input: file, output: file, copy: true) + + install_web_files +=3D '@0@:@1@'.format(meson.current_source_dir() / fil= e, docs_html_dir / 'fonts') endforeach diff --git a/docs/html/meson.build b/docs/html/meson.build index c87cc9f7ea2..e194b5942c2 100644 --- a/docs/html/meson.build +++ b/docs/html/meson.build @@ -7,6 +7,10 @@ apipng =3D [ =20 install_data(apipng, install_dir: docs_html_dir / 'html') =20 +foreach file : apipng + install_web_files +=3D '@0@:@1@'.format(meson.current_source_dir() / fil= e, docs_html_dir / 'html') +endforeach + docs_html_gen =3D [] docs_html_dep =3D [] =20 @@ -80,8 +84,11 @@ endforeach =20 docs_html_paths =3D [] =20 +install_web_deps +=3D docs_html_dep + foreach file : docs_html_gen docs_html_paths +=3D file.full_path() + install_web_files +=3D '@0@:@1@'.format(file.full_path(), docs_html_dir = / 'html') endforeach =20 test( diff --git a/docs/internals/meson.build b/docs/internals/meson.build index 944903ae27f..e600c84af60 100644 --- a/docs/internals/meson.build +++ b/docs/internals/meson.build @@ -9,7 +9,7 @@ foreach name : internals_in_files html_in_file =3D '@0@.html.in'.format(name) html_file =3D '@0@.html'.format(name) =20 - custom_target( + out_file =3D custom_target( html_file, input: html_in_file, output: html_file, @@ -29,4 +29,7 @@ foreach name : internals_in_files install: true, install_dir: docs_html_dir / 'internals', ) + + install_web_deps +=3D out_file + install_web_files +=3D '@0@:@1@'.format(out_file.full_path(), docs_html_= dir / 'internals') endforeach diff --git a/docs/js/meson.build b/docs/js/meson.build index da90cbf96e1..cbf2dc2633c 100644 --- a/docs/js/meson.build +++ b/docs/js/meson.build @@ -4,8 +4,10 @@ docs_js_files =3D [ =20 install_data(docs_js_files, install_dir: docs_html_dir / 'js') =20 -# This hack enables us to view the web pages -# from within the uninstalled build tree foreach file : docs_js_files + # This hack enables us to view the web pages + # from within the uninstalled build tree configure_file(input: file, output: file, copy: true) + + install_web_files +=3D '@0@:@1@'.format(meson.current_source_dir() / f= ile, docs_html_dir / 'js') endforeach diff --git a/docs/kbase/meson.build b/docs/kbase/meson.build index 6a17d674436..d46289245b2 100644 --- a/docs/kbase/meson.build +++ b/docs/kbase/meson.build @@ -18,7 +18,7 @@ foreach name : docs_kbase_files =20 html_in =3D docs_rst2html_gen.process(rst_file) =20 - custom_target( + out_file =3D custom_target( html_file, input: html_in, output: html_file, @@ -38,4 +38,7 @@ foreach name : docs_kbase_files install: true, install_dir: docs_html_dir / 'kbase', ) + + install_web_deps +=3D out_file + install_web_files +=3D '@0@:@1@'.format(out_file.full_path(), docs_html_= dir / 'kbase') endforeach diff --git a/docs/logos/meson.build b/docs/logos/meson.build index da92c397cde..70ba67d71c7 100644 --- a/docs/logos/meson.build +++ b/docs/logos/meson.build @@ -22,8 +22,10 @@ docs_logo_files =3D [ =20 install_data(docs_logo_files, install_dir: docs_html_dir / 'logos') =20 -# This hack enables us to view the web pages -# from within the uninstalled build tree foreach file : docs_logo_files + # This hack enables us to view the web pages + # from within the uninstalled build tree configure_file(input: file, output: file, copy: true) + + install_web_files +=3D '@0@:@1@'.format(meson.current_source_dir() / fil= e, docs_html_dir / 'logos') endforeach diff --git a/docs/manpages/meson.build b/docs/manpages/meson.build index 72d362e92d8..c53109c8d29 100644 --- a/docs/manpages/meson.build +++ b/docs/manpages/meson.build @@ -103,7 +103,7 @@ foreach data : docs_man_files capture: true, ) =20 - custom_target( + out_file =3D custom_target( html_file, input: html_in, output: html_file, @@ -123,4 +123,7 @@ foreach data : docs_man_files install: true, install_dir: docs_html_dir / 'manpages', ) + + install_web_deps +=3D out_file + install_web_files +=3D '@0@:@1@'.format(out_file.full_path(), docs_html_= dir / 'manpages') endforeach diff --git a/docs/meson.build b/docs/meson.build index 6d3d002fd7c..773e127ca74 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -129,6 +129,10 @@ docs_rst_files =3D [ 'submitting-patches', ] =20 +# list of web targets to build for docs/web rule +install_web_deps =3D [] +install_web_files =3D [] + install_data(docs_assets, install_dir: docs_html_dir) =20 aclperms_gen =3D custom_target( @@ -191,7 +195,7 @@ foreach name : docs_html_in_files html_in_file =3D '@0@.html.in'.format(name) html_file =3D '@0@.html'.format(name) =20 - custom_target( + out_file =3D custom_target( html_file, input: html_in_file, output: html_file, @@ -211,6 +215,9 @@ foreach name : docs_html_in_files install: true, install_dir: docs_html_dir, ) + + install_web_deps +=3D out_file + install_web_files +=3D '@0@:@1@'.format(out_file.full_path(), docs_html_= dir) endforeach =20 =20 @@ -262,7 +269,7 @@ docs_html_in_gen +=3D { foreach data : docs_html_in_gen html_file =3D '@0@.html'.format(data['name']) =20 - custom_target( + out_file =3D custom_target( html_file, input: data['file'], output: html_file, @@ -282,6 +289,9 @@ foreach data : docs_html_in_gen install: true, install_dir: docs_html_dir, ) + + install_web_deps +=3D out_file + install_web_files +=3D '@0@:@1@'.format(out_file.full_path(), docs_html_= dir) endforeach =20 subdir('fonts') @@ -294,8 +304,16 @@ subdir('manpages') subdir('schemas') =20 =20 -# This hack enables us to view the web pages -# from within the uninstalled build tree foreach file : docs_assets + # This hack enables us to view the web pages + # from within the uninstalled build tree configure_file(input: file, output: file, copy: true) + + install_web_files +=3D '@0@:@1@'.format(meson.current_source_dir() / fil= e, docs_html_dir) endforeach + +run_target( + 'install-web', + command: [ meson_python_prog, meson_install_web_prog.path(), install_web= _files ], + depends: install_web_deps, +) diff --git a/scripts/meson-install-web.py b/scripts/meson-install-web.py new file mode 100755 index 00000000000..a03f8523cd9 --- /dev/null +++ b/scripts/meson-install-web.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 + +import os +import shutil +import sys + +for desc in sys.argv[1:]: + inst =3D desc.split(':') + os.makedirs(inst[1], exist_ok=3DTrue) + shutil.copy(inst[0], inst[1]) diff --git a/scripts/meson.build b/scripts/meson.build index fa2ed57c99d..2f46ece59fb 100644 --- a/scripts/meson.build +++ b/scripts/meson.build @@ -26,6 +26,7 @@ scripts =3D [ 'meson-dist.sh', 'meson-gen-authors.sh', 'meson-html-gen.py', + 'meson-install-web.py', 'meson-python.sh', 'meson-timestamp.sh', 'mock-noinline.py', --=20 2.26.2