From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 83C95A046B; Thu, 9 Jan 2020 16:32:16 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 23B3D1DEC3; Thu, 9 Jan 2020 16:31:46 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 5548D1DEC2 for ; Thu, 9 Jan 2020 16:31:45 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2020 07:31:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,414,1571727600"; d="scan'208";a="216333135" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.2]) by orsmga008.jf.intel.com with ESMTP; 09 Jan 2020 07:31:43 -0800 From: Bruce Richardson To: david.marchand@redhat.com, john.mcnamara@intel.com, bluca@debian.org Cc: dev@dpdk.org, aconole@redhat.com, thomas@monjalon.net, Bruce Richardson Date: Thu, 9 Jan 2020 15:31:10 +0000 Message-Id: <20200109153112.501282-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200109153112.501282-1-bruce.richardson@intel.com> References: <20200109115631.500056-1-bruce.richardson@intel.com> <20200109153112.501282-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 4/6] doc/guides: reduce whitespace in meson build file X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" For building the guides, we can make the meson.build easier to read by using the subdir_done function to quit early. Signed-off-by: Bruce Richardson Acked-by: Aaron Conole --- doc/guides/meson.build | 44 ++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/doc/guides/meson.build b/doc/guides/meson.build index 7931ef3bb..80c21d168 100644 --- a/doc/guides/meson.build +++ b/doc/guides/meson.build @@ -3,26 +3,28 @@ sphinx = find_program('sphinx-build', required: get_option('enable_docs')) -if sphinx.found() - htmldir = join_paths('share', 'doc', 'dpdk') - html_guides_build = custom_target('html_guides_build', - input: meson.current_source_dir(), - output: 'guides', - command: [sphinx, '-b', 'html', - '-d', meson.current_build_dir() + '/.doctrees', - '@INPUT@', meson.current_build_dir() + '/guides'], - build_by_default: get_option('enable_docs'), - install: get_option('enable_docs'), - install_dir: htmldir) +if not sphinx.found() + subdir_done() +endif - doc_targets += html_guides_build - doc_target_names += 'HTML_Guides' +htmldir = join_paths('share', 'doc', 'dpdk') +html_guides = custom_target('html_guides', + input: meson.current_source_dir(), + output: 'guides', + command: [sphinx, '-b', 'html', + '-d', meson.current_build_dir() + '/.doctrees', + '@INPUT@', meson.current_build_dir() + '/guides'], + build_by_default: get_option('enable_docs'), + install: get_option('enable_docs'), + install_dir: htmldir) - # sphinx leaves a .buildinfo in the target directory, which we don't - # want to install. Note that sh -c has to be used, otherwise the - # env var does not get expanded if calling rm/install directly. - meson.add_install_script('sh', '-c', - 'rm -f $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/.buildinfo') - meson.add_install_script('sh', '-c', - 'install -D -m0644 $MESON_SOURCE_ROOT/doc/guides/custom.css $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/_static/css/custom.css') -endif +doc_targets += html_guides +doc_target_names += 'HTML_Guides' + +# sphinx leaves a .buildinfo in the target directory, which we don't +# want to install. Note that sh -c has to be used, otherwise the +# env var does not get expanded if calling rm/install directly. +meson.add_install_script('sh', '-c', + 'rm -f $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/.buildinfo') +meson.add_install_script('sh', '-c', + 'install -D -m0644 $MESON_SOURCE_ROOT/doc/guides/custom.css $MESON_INSTALL_DESTDIR_PREFIX/share/doc/dpdk/guides/_static/css/custom.css') -- 2.24.1