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 59D0445702; Wed, 31 Jul 2024 18:00:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0191342EFE; Wed, 31 Jul 2024 17:59:59 +0200 (CEST) Received: from fhigh6-smtp.messagingengine.com (fhigh6-smtp.messagingengine.com [103.168.172.157]) by mails.dpdk.org (Postfix) with ESMTP id 237A042EFD for ; Wed, 31 Jul 2024 17:59:58 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfhigh.nyi.internal (Postfix) with ESMTP id D03571146D39; Wed, 31 Jul 2024 11:59:57 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 31 Jul 2024 11:59:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1722441597; x= 1722527997; bh=Eio306gvapt6zEvwxkfS+OUo3jGqNuZKNrRgQPj0btM=; b=F 5ca8TCDT44wrks0Vd4XuF4ys8LZoIcMAikoWYynNlxYjMVn0HLXX5w2wTgROq4sd SGjwOF3X/pgf9EC8Um7CQESc3ftW5PIfQjDx7eKudwfLOdzDjliyOVXm2ZjsjtmM WYVHoAzZJfG34bkWjt/02RXk1ANfrg4hi6sW41oGd4natOZRuCRsb2smg4RV/LrL LNj7AL33GfrB956inCYbiPGXBuCUNjL+sTV6xaczbqovgTCTNdkYa+pp/GYgsTi8 VtwFKbK7pI1NrApuc9LjVnciVCJua8wLiucx+FV6gdHCCDH+V+HWHgL31Vhzj22b S2c+suu5JfhF6LvTPzrCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1722441597; x= 1722527997; bh=Eio306gvapt6zEvwxkfS+OUo3jGqNuZKNrRgQPj0btM=; b=G IQYh2lCR1C4ntQTQQ2eLCho4ITAnvMcQKZJ90Nv4JlA6ZA8DOoAvk+HxhS3rlkv5 2/DkQ8o6t0hoogkJT2nOapc6b7ut0umPhptifIZ8MFd2C5xpFy6lSW+6r1hlbJSI rgSEk6YI2U2G4kaNrch/mRKstxsCmGq0CkSC0iM4icFziRXuPccBI1yprgdmm4TW 5q1z0cgrIZIIHuwujr0dibWNdd7XbImUNqmx2dPFH23TObTdsJkKrl4eDoSRThbA 898qUiDTyL6Dk4jIUMjPXcpbDPEYDsF/ONPwItSwdelCVjydeNGNkognyDt1ZRv+ QwqBUkn9jvSbADyOWLrow== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrjeeigdeliecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepvdejhfdugeehvddtieejieegteeuudfgjeeukeeiledthfetveek hefhieelhfdtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthdpnhgspghrtghpthhtoheptd X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 31 Jul 2024 11:59:56 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: Ferruh Yigit , Bruce Richardson Subject: [PATCH v3 1/2] doc: copy custom CSS on guides build Date: Wed, 31 Jul 2024 17:57:27 +0200 Message-ID: <20240731155947.1681531-2-thomas@monjalon.net> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240731155947.1681531-1-thomas@monjalon.net> References: <20240721095351.355639-1-thomas@monjalon.net> <20240731155947.1681531-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The custom CSS file for Sphinx guides was copied during install, but not during build time. Before switching to Meson, the Makefile was copying this file in the build steps, so the doc was complete and viewable from the build directory. It is especially useful to get full documentation in the build directory when building only documentation with "ninja -C build doc". The command "ninja install" was required to get the CSS file installed, but it requires to build the libraries as well. The CSS file is now copied as part of the Sphinx build script, and it will be installed as part of the whole html directory. Signed-off-by: Thomas Monjalon Acked-by: Ferruh Yigit --- v2: create destination directory in case RtD theme is unavailable v3: no change --- buildtools/call-sphinx-build.py | 10 ++++++++++ doc/guides/meson.build | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py index da19e950c9..623e7363ee 100755 --- a/buildtools/call-sphinx-build.py +++ b/buildtools/call-sphinx-build.py @@ -3,6 +3,8 @@ # Copyright(c) 2019 Intel Corporation # +import filecmp +import shutil import sys import os from os.path import join @@ -30,4 +32,12 @@ with open(join(dst, '.html.d'), 'w') as d: d.write('html: ' + ' '.join(srcfiles) + '\n') +# copy custom CSS file +css = 'custom.css' +src_css = join(src, css) +dst_css = join(dst, 'html', '_static', 'css', css) +if not os.path.exists(dst_css) or not filecmp.cmp(src_css, dst_css): + os.makedirs(os.path.dirname(dst_css), exist_ok=True) + shutil.copyfile(src_css, dst_css) + sys.exit(process.returncode) diff --git a/doc/guides/meson.build b/doc/guides/meson.build index 51f81da2e3..f8bbfba9f5 100644 --- a/doc/guides/meson.build +++ b/doc/guides/meson.build @@ -24,7 +24,5 @@ html_guides = custom_target('html_guides', install: get_option('enable_docs'), install_dir: htmldir) -install_data(files('custom.css'), install_dir: join_paths(htmldir,'_static', 'css')) - doc_targets += html_guides doc_target_names += 'HTML_Guides' -- 2.45.0