From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D2E145BA1; Tue, 22 Oct 2024 17:12:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E4EC64029B; Tue, 22 Oct 2024 17:12:19 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 5F85B4029A for ; Tue, 22 Oct 2024 17:12:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729609937; h=from:from: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; bh=ovb9B52xO7XE1/WFYX4J5w3STCk/vHth1r+OsluZ+QY=; b=A109Yf3dlx3LNnluJvzlh3ODLTnaMMgisXd4zMjte1yDSfNU1rX91wVYQH0Lm3lK0xWwZ2 WXReK6nLBQX9woplgsSu2lEwLxx5LRAkKKyVTREMSNqwj3Gd3ibZfPd7naYiduDrdG6qnM cyZKzR7Hs/+9HUzQt1rBDwj2jOYJrtc= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-507-R0rYicDYOXmYad49FpiYOg-1; Tue, 22 Oct 2024 11:12:11 -0400 X-MC-Unique: R0rYicDYOXmYad49FpiYOg-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3963A1955F43; Tue, 22 Oct 2024 15:12:09 +0000 (UTC) Received: from ringo.home (unknown [10.39.208.42]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 192C11955EA3; Tue, 22 Oct 2024 15:12:05 +0000 (UTC) From: Robin Jarry To: dev@dpdk.org, Bruce Richardson , Jeremy Spewock , Luca Vizzarro , Dean Marx , Thomas Monjalon , =?UTF-8?q?Juraj=20Linke=C5=A1?= Subject: [PATCH dpdk] meson: properly disable docs Date: Tue, 22 Oct 2024 17:11:42 +0200 Message-ID: <20241022151142.246535-2-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Fix the following meson warning when -Denable_docs=false: $ meson setup build -Denable_docs=false -Denable_drivers=net/null \ -Denable_libs=rib -Ddisable_apps=* --wipe --fatal-meson-warnings ... Program doxygen found: YES (/usr/bin/doxygen) Configuring doxy-api-html.conf using configuration doc/api/meson.build:54: WARNING: The variable(s) 'DTS_API_MAIN_PAGE' in the input file 'doc/api/doxy-api.conf.in' are not present in the given configuration data. doc/api/meson.build:54:17: ERROR: Fatal warnings enabled, aborting When -Denable_docs=false, do not even enter the doc subdir. Replace all occurrences of get_option('enable_docs') in the doc subdir with true. Fixes: 7f9326423a04 ("dts: add API doc generation") Signed-off-by: Robin Jarry --- doc/api/dts/meson.build | 6 +++--- doc/api/meson.build | 16 ++++++++-------- doc/guides/meson.build | 6 +++--- meson.build | 6 ++++-- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/doc/api/dts/meson.build b/doc/api/dts/meson.build index 5115df70956b..a8edd232ddcf 100644 --- a/doc/api/dts/meson.build +++ b/doc/api/dts/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2023 PANTHEON.tech s.r.o. -sphinx = find_program('sphinx-build', required: get_option('enable_docs')) +sphinx = find_program('sphinx-build', required: true) if not sphinx.found() subdir_done() endif @@ -23,8 +23,8 @@ dts_api_html = custom_target('dts_api_html', output: 'html', command: [sphinx_wrapper, sphinx, meson.project_version(), meson.current_source_dir(), meson.current_build_dir(), extra_sphinx_args], - build_by_default: get_option('enable_docs'), - install: get_option('enable_docs'), + build_by_default: true, + install: true, install_dir: htmldir) doc_targets += dts_api_html diff --git a/doc/api/meson.build b/doc/api/meson.build index ae23e9825edc..d82803df388d 100644 --- a/doc/api/meson.build +++ b/doc/api/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi -doxygen = find_program('doxygen', required: get_option('enable_docs')) +doxygen = find_program('doxygen', required: true) if not doxygen.found() # process DTS API doc build even if DPDK API doc build can't be done @@ -28,9 +28,9 @@ example = custom_target('examples.dox', output: 'examples.dox', command: [generate_examples, join_paths(dpdk_source_root, 'examples'), '@OUTPUT@'], depfile: 'examples.dox.d', - install: get_option('enable_docs'), + install: true, install_dir: htmldir, - build_by_default: get_option('enable_docs')) + build_by_default: true) # set up common Doxygen configuration cdata = configuration_data() @@ -76,9 +76,9 @@ doxy_html_build = custom_target('doxygen-html', output: 'html', depfile: 'html.d', command: [generate_doxygen, '@OUTPUT@', doxygen, '@INPUT@'], - install: get_option('enable_docs'), + install: true, install_dir: htmldir, - build_by_default: get_option('enable_docs')) + build_by_default: true) doc_targets += doxy_html_build doc_target_names += 'Doxygen_API(HTML)' @@ -90,9 +90,9 @@ doxy_man_build = custom_target('doxygen-man', output: 'man', depfile: 'man.d', command: [generate_doxygen, '@OUTPUT@', doxygen, '@INPUT@'], - install: get_option('enable_docs'), + install: true, install_dir: get_option('datadir'), - build_by_default: get_option('enable_docs')) + build_by_default: true) doc_targets += doxy_man_build doc_target_names += 'Doxygen_API(Manpage)' @@ -100,7 +100,7 @@ doc_target_names += 'Doxygen_API(Manpage)' # refresh the manpage database on install # if DPDK manpages are installed to a staging directory, not in MANPATH, this has no effect mandb = find_program('mandb', required: false) -if mandb.found() and get_option('enable_docs') +if mandb.found() meson.add_install_script(mandb) endif diff --git a/doc/guides/meson.build b/doc/guides/meson.build index f8bbfba9f5b5..840f9c8a6bfb 100644 --- a/doc/guides/meson.build +++ b/doc/guides/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation -sphinx = find_program('sphinx-build', required: get_option('enable_docs')) +sphinx = find_program('sphinx-build', required: true) if not sphinx.found() subdir_done() @@ -20,8 +20,8 @@ html_guides = custom_target('html_guides', meson.current_source_dir(), meson.current_build_dir(), extra_sphinx_args], depfile: '.html.d', - build_by_default: get_option('enable_docs'), - install: get_option('enable_docs'), + build_by_default: true, + install: true, install_dir: htmldir) doc_targets += html_guides diff --git a/meson.build b/meson.build index fe9040369ab9..d67d5577a1d4 100644 --- a/meson.build +++ b/meson.build @@ -82,8 +82,10 @@ subdir('drivers') subdir('usertools') subdir('app') -# build docs -subdir('doc') +if get_option('enable_docs') + # build docs + subdir('doc') +endif # build any examples explicitly requested - useful for developers - and # install any example code into the appropriate install path -- 2.47.0