From patchwork Fri Dec 27 13:59:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13921915 Received: from fhigh-b8-smtp.messagingengine.com (fhigh-b8-smtp.messagingengine.com [202.12.124.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E77371F4734 for ; Fri, 27 Dec 2024 14:00:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.159 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308003; cv=none; b=oSwaMBpe/lHAM7Kicq3Jo7E9QFFNFk5lmkPMrONMD6VWU5m+16CHDC+MWVKvuLQtF93/Gje1nCUEF1IjljlDsbzQijT4TMOgABjR28qSQUW70SK6xQBl21qTEY+YnvdE1stA87yUYHZ0OkKuRYHTulrS20lJag3atenxz91CClc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308003; c=relaxed/simple; bh=Xky0MIsmSYb9kT1S4ct+k8qmtdizUeYDvHtSBtotcoI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=gUDObcPYJEUdzsWapvrffVrs5Fp8bMWaxuGiasrSgAx9iPdID0kBPQHwTwkOg6V/Afx8bwpWsOM6Zjpy21W2D6IWP2wzeIHd7b96YNxatyF8LVJH9wmCK6rkdsAPHWvr0zq62DLIhW2hysk32WSqC3u9neN1n0W5l8JufdhFQ2s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=CApBolm5; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=dY256LWk; arc=none smtp.client-ip=202.12.124.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="CApBolm5"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="dY256LWk" Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.stl.internal (Postfix) with ESMTP id 232EE2540185; Fri, 27 Dec 2024 09:00:01 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Fri, 27 Dec 2024 09:00:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1735308000; x=1735394400; bh=jeoeGWhyM+NktE1zo0heZRue3FElxswEzMgp4gw/oQo=; b= CApBolm5L39MTocyfWAQ4ZsKz6+4BEorC/zcBq0UTJcofSu+Bry1/PUTYf8jG1qj yTYC8asjvRkgKVi1e7n6MDZMirr0D7vEaVFYaIfIfssGz12CyTn8wgKxlFuEnq8u pNpFpsvnpUjXCfbW+LPbIheGD7qBkKNxwKYAPkGZa8xXnlk1UKUqBAkfUowuuv6Y qd0yz6AOE3a/bGBO1Szs7l7yhPuTS9m2EYJQ+p6mm7RV2f1qXeghq3je8X1V827Q o0UkOO9bygI8YeYTPhOWGEpeDTCzyG6iCi3SMRTVBfvyL+k5j4Wu99aSOv88gIYb 5orlZuLdU1v+R79Ko4qVPQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735308000; x= 1735394400; bh=jeoeGWhyM+NktE1zo0heZRue3FElxswEzMgp4gw/oQo=; b=d Y256LWkVIUvCVDNBDt3feq19/m7CGtPT9okibe4DLnjD8IA6wDoNDE6ATY7+wN7t TGnc8ZbqVWNraZJIXQPdriKdKOAubWmKej40zn+jTp9rrzxSVT8eUJtCj9N4ZJw+ DV+hR+RsX3QQl1wKPQ9yxtiUy7vfKmujUPol6PYJsAPQf42Jzfmljvr59faF+V5e AbyktThCkoRvozjPxS9M2x8C0/p7RV52FS92/xGbiW+s2sRR8XGRiYusm3DrBkZF PvkrsXmaDz7C6UP3r2MmNcI0bMIKdRSnwLlfC/8DINw/htGG5i0SFVn8qqyxD1B3 jiJV1tUOP4GnLQympUJNA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvtddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdej necuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrih hmqeenucggtffrrghtthgvrhhnpeeffeeliedvteehgfduheeuffehieehheejvdehkeel gefftdffveeileduieetkeenucffohhmrghinheptghonhhfrdhinhdprhgsrdhinhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhk shdrihhmpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtth hopehtohhonhesihhothgtlhdrtghomhdprhgtphhtthhopehgihhtsehvghgvrhdrkhgv rhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Dec 2024 09:00:00 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id f84c8ba6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 27 Dec 2024 13:57:55 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 27 Dec 2024 14:59:29 +0100 Subject: [PATCH v2 01/12] meson: wire up support for AsciiDoctor Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241227-b4-pks-meson-docs-v2-1-f61e63edbfa1@pks.im> References: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> In-Reply-To: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> To: git@vger.kernel.org Cc: Toon Claes X-Mailer: b4 0.14.2 While our Makefile supports both Asciidoc and AsciiDoctor, our Meson build instructions only support the former. Wire up support for the latter, as well. Our Makefile always favors Asciidoc, but Meson will automatically figure out which of both to use based on whether they are installed or not. To keep compatibility with our Makefile it favors Asciidoc over Asciidoctor in case both are available. Signed-off-by: Patrick Steinhardt --- Documentation/meson.build | 110 ++++++++++++++++++++++++++++++++++------------ meson_options.txt | 2 + 2 files changed, 84 insertions(+), 28 deletions(-) diff --git a/Documentation/meson.build b/Documentation/meson.build index fca3eab1f1360a5fdeda89c1766ab8cdb3267b89..acd6d86ec779e63230c88b7bff937aff330d2d4f 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -204,29 +204,87 @@ manpages = { 'gitworkflows.txt' : 7, } -asciidoc = find_program('asciidoc') -git = find_program('git', required: false) -xmlto = find_program('xmlto') +docs_backend = get_option('docs_backend') +if docs_backend == 'auto' + if find_program('asciidoc', required: false).found() + docs_backend = 'asciidoc' + elif find_program('asciidoctor', required: false).found() + docs_backend = 'asciidoctor' + else + error('Neither asciidoc nor asciidoctor were found.') + endif +endif -asciidoc_conf = custom_target( - command: [ - shell, - meson.project_source_root() / 'GIT-VERSION-GEN', - meson.project_source_root(), - '@INPUT@', - '@OUTPUT@', - ], - input: meson.current_source_dir() / 'asciidoc.conf.in', - output: 'asciidoc.conf', - depends: [git_version_file], - env: version_gen_environment, -) +if docs_backend == 'asciidoc' + asciidoc = find_program('asciidoc', required: true) + asciidoc_html = 'xhtml11' + asciidoc_docbook = 'docbook' + xmlto_extra = [ ] -asciidoc_common_options = [ - asciidoc, - '--conf-file=' + asciidoc_conf.full_path(), - '--attribute=build_dir=' + meson.current_build_dir(), -] + asciidoc_conf = custom_target( + command: [ + shell, + meson.project_source_root() / 'GIT-VERSION-GEN', + meson.project_source_root(), + '@INPUT@', + '@OUTPUT@', + ], + input: meson.current_source_dir() / 'asciidoc.conf.in', + output: 'asciidoc.conf', + depends: [git_version_file], + env: version_gen_environment, + ) + + asciidoc_common_options = [ + asciidoc, + '--conf-file=' + asciidoc_conf.full_path(), + '--attribute=build_dir=' + meson.current_build_dir(), + ] + + documentation_deps = [ + asciidoc_conf, + ] +elif docs_backend == 'asciidoctor' + asciidoctor = find_program('asciidoctor', required: true) + asciidoc_html = 'xhtml5' + asciidoc_docbook = 'docbook5' + xmlto_extra = [ + '--skip-validation', + '-x', meson.current_source_dir() / 'manpage.xsl', + ] + + asciidoctor_extensions = custom_target( + command: [ + shell, + meson.project_source_root() / 'GIT-VERSION-GEN', + meson.project_source_root(), + '@INPUT@', + '@OUTPUT@', + ], + input: meson.current_source_dir() / 'asciidoctor-extensions.rb.in', + output: 'asciidoctor-extensions.rb', + depends: [git_version_file], + env: version_gen_environment, + ) + + asciidoc_common_options = [ + asciidoctor, + '--attribute', 'compat-mode', + '--attribute', 'tabsize=8', + '--attribute', 'litdd=--', + '--attribute', 'docinfo=shared', + '--attribute', 'build_dir=' + meson.current_build_dir(), + '--load-path', meson.current_build_dir(), + '--require', 'asciidoctor-extensions', + ] + + documentation_deps = [ + asciidoctor_extensions, + ] +endif + +git = find_program('git', required: false) +xmlto = find_program('xmlto') cmd_lists = [ 'cmds-ancillaryinterrogators.txt', @@ -243,10 +301,6 @@ cmd_lists = [ 'cmds-foreignscminterface.txt', ] -documentation_deps = [ - asciidoc_conf, -] - documentation_deps += custom_target( command: [ perl, @@ -278,7 +332,7 @@ foreach manpage, category : manpages if get_option('docs').contains('man') manpage_xml_target = custom_target( command: asciidoc_common_options + [ - '--backend=docbook', + '--backend=' + asciidoc_docbook, '--doctype=manpage', '--out-file=@OUTPUT@', meson.current_source_dir() / manpage, @@ -301,7 +355,7 @@ foreach manpage, category : manpages manpage_xml_target, '-o', meson.current_build_dir(), - ], + ] + xmlto_extra, output: manpage_path, install: true, install_dir: get_option('mandir') / 'man' + category.to_string(), @@ -311,7 +365,7 @@ foreach manpage, category : manpages if get_option('docs').contains('html') and category == 1 custom_target( command: asciidoc_common_options + [ - '--backend=xhtml11', + '--backend=' + asciidoc_html, '--doctype=manpage', '--out-file=@OUTPUT@', meson.current_source_dir() / manpage, diff --git a/meson_options.txt b/meson_options.txt index 4be7eab39939178ae2ffde1ff9e78f83a1b482b2..f50bb40cdf6046529a0cea0a03a8cb696c3a6b18 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -85,6 +85,8 @@ option('docs', type: 'array', choices: ['man', 'html'], value: [], description: 'Which documenattion formats to build and install.') option('default_help_format', type: 'combo', choices: ['man', 'html'], value: 'man', description: 'Default format used when executing git-help(1).') +option('docs_backend', type: 'combo', choices: ['asciidoc', 'asciidoctor', 'auto'], value: 'auto', + description: 'Which backend to use to generate documentation.') # Testing. option('tests', type: 'boolean', value: true, From patchwork Fri Dec 27 13:59:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13921916 Received: from fout-b7-smtp.messagingengine.com (fout-b7-smtp.messagingengine.com [202.12.124.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0AC8D1F3D46 for ; Fri, 27 Dec 2024 14:00:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308005; cv=none; b=SYbXtSds49j1lZ8qmvPJwuTwqrOSlzbT/iecSQ6wsxbmevTtX/3t8iJEqoJdH8Cd9Sps80469JTH/d+Fnkw3oTeKFFQQ8uwLFOh30d62jcpaCnMescTEI9WW0hBPUU2Z1FRpyA/7jAkfQ3OIOtpZrR0I5KozBpuRSDtsdRK/lBk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308005; c=relaxed/simple; bh=YDWzGfV5zkk7Hpk9EzhsKEon5ABDfI7fMSB+XZm7C98=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Pnz4ve/6ljxIAHlEApY5SZaxQRDf55EHeNlBxoo1BUrdCcbNycp9EhR2SBH5dKwNjNIHCk1e78Xz9O1FJzVaNzDcKqVX/UAWm8AujeAVxqGGSVC33YvmYOYoRxrnM7pz+rVnlQcVVWznf4ORL5jHOpPc/ZPvezvSTUXXDH2x1Yg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=OJR9ntVI; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=DR6Ogyis; arc=none smtp.client-ip=202.12.124.150 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="OJR9ntVI"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="DR6Ogyis" Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfout.stl.internal (Postfix) with ESMTP id 16F6611400D9; Fri, 27 Dec 2024 09:00:03 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Fri, 27 Dec 2024 09:00:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1735308002; x=1735394402; bh=m6PUH5hc5VnZEjAw45PgVSbEFwSbOCM6SRruq77T2TY=; b= OJR9ntVIw7ExjL9bLf4whA+3DOOe4CoWkQatn2057wixTiwZn+98qk4v9CierS0o mrxAtF+BcpHVlBYo5/9gVaZNvywBeo5YYK0GQ2AA0RBX2UNdb2DF0G4x/i6hDaOA yZ4zhZmZzgLKUPC4wPPNKoSQLM7Q88QcsNlqPoZ8OLoXCDJtnB1EaIYwcaGV8RJQ fJP0FhKzyEmmO59na0W2GsWMt+ipklfOk1WxAUOTy/Zc3JI0iYhpsVKqJgT2eVzk aSiw7BDU89WGBhh5JK1D4Dcok4kfdhangEAJka0+g/vC3OjUD+YNgcAYguqNBr/3 hChO7AE2dn0a27o59BOtzA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735308002; x= 1735394402; bh=m6PUH5hc5VnZEjAw45PgVSbEFwSbOCM6SRruq77T2TY=; b=D R6Ogyis6HYJjF5pJ2tyyWT+OQehuwSvuE0AqKdBwgGP7AUrjqCY5Xehy6NQfVHYt KRV0p3if8ko5U9a/ZiPq0Lt6dT3lO1Ucgk0pxPZ98+isef22FDNOkMeYeYnp1725 JFi3KhyO11sUlgRB/eJN0U3zujD0pb2/bSd/3GLsBL7b+01b51qbYf1Uwb2f5HJv pHDaaNK26MBQEBkfI7PdPJqjORzo1+HQKFCnzk5v0pC8XbTwXN+dowJpXguf3VpS es2odh4juXxn1pAplEd+xGyJYWmd0aLaGY5b7N/rwMalTYpXL86KDzf9emPkyCLI ctW0Y48BeaZSWe1n1Kl7Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvtddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdej necuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrih hmqeenucggtffrrghtthgvrhhnpeeffeeliedvteehgfduheeuffehieehheejvdehkeel gefftdffveeileduieetkeenucffohhmrghinheptghonhhfrdhinhdprhgsrdhinhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhk shdrihhmpdhnsggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtth hopehtohhonhesihhothgtlhdrtghomhdprhgtphhtthhopehgihhtsehvghgvrhdrkhgv rhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Dec 2024 09:00:01 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 5dec6fd0 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 27 Dec 2024 13:57:56 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 27 Dec 2024 14:59:30 +0100 Subject: [PATCH v2 02/12] meson: properly wire up dependencies for our docs Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241227-b4-pks-meson-docs-v2-2-f61e63edbfa1@pks.im> References: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> In-Reply-To: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> To: git@vger.kernel.org Cc: Toon Claes X-Mailer: b4 0.14.2 A couple of Meson documentation targets use `meson.current_source_dir()` to resolve inputs. This has the downside that it does not automagically make Meson track these inputs as a dependency. After all, string arguments really can be anything, even if they happen to match an actual filesystem path. Adapt these build targets to instead use inputs. Signed-off-by: Patrick Steinhardt --- Documentation/meson.build | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/Documentation/meson.build b/Documentation/meson.build index acd6d86ec779e63230c88b7bff937aff330d2d4f..b3c8b6c56339e10099f8c37a4d8198f402192520 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -229,7 +229,7 @@ if docs_backend == 'asciidoc' '@INPUT@', '@OUTPUT@', ], - input: meson.current_source_dir() / 'asciidoc.conf.in', + input: 'asciidoc.conf.in', output: 'asciidoc.conf', depends: [git_version_file], env: version_gen_environment, @@ -261,7 +261,7 @@ elif docs_backend == 'asciidoctor' '@INPUT@', '@OUTPUT@', ], - input: meson.current_source_dir() / 'asciidoctor-extensions.rb.in', + input: 'asciidoctor-extensions.rb.in', output: 'asciidoctor-extensions.rb', depends: [git_version_file], env: version_gen_environment, @@ -304,10 +304,11 @@ cmd_lists = [ documentation_deps += custom_target( command: [ perl, - meson.current_source_dir() / 'cmd-list.perl', + '@INPUT@', meson.project_source_root(), meson.current_build_dir(), ] + cmd_lists, + input: 'cmd-list.perl', output: cmd_lists ) @@ -315,7 +316,7 @@ foreach mode : [ 'diff', 'merge' ] documentation_deps += custom_target( command: [ shell, - meson.current_source_dir() / 'generate-mergetool-list.sh', + '@INPUT@', '..', 'diff', '@OUTPUT@' @@ -324,6 +325,7 @@ foreach mode : [ 'diff', 'merge' ] 'MERGE_TOOLS_DIR=' + meson.project_source_root() / 'mergetools', 'TOOL_MODE=' + mode, ], + input: 'generate-mergetool-list.sh', output: 'mergetools-' + mode + '.txt', ) endforeach @@ -335,9 +337,10 @@ foreach manpage, category : manpages '--backend=' + asciidoc_docbook, '--doctype=manpage', '--out-file=@OUTPUT@', - meson.current_source_dir() / manpage, + '@INPUT@', ], depends: documentation_deps, + input: manpage, output: fs.stem(manpage) + '.xml', ) @@ -345,10 +348,8 @@ foreach manpage, category : manpages manpage_target = custom_target( command: [ xmlto, - '-m', - meson.current_source_dir() / 'manpage-normal.xsl', - '-m', - meson.current_source_dir() / 'manpage-bold-literal.xsl', + '-m', '@INPUT0@', + '-m', '@INPUT1@', '--stringparam', 'man.base.url.for.relative.links=' + get_option('prefix') / get_option('mandir'), 'man', @@ -356,6 +357,10 @@ foreach manpage, category : manpages '-o', meson.current_build_dir(), ] + xmlto_extra, + input: [ + 'manpage-normal.xsl', + 'manpage-bold-literal.xsl', + ], output: manpage_path, install: true, install_dir: get_option('mandir') / 'man' + category.to_string(), @@ -368,9 +373,10 @@ foreach manpage, category : manpages '--backend=' + asciidoc_html, '--doctype=manpage', '--out-file=@OUTPUT@', - meson.current_source_dir() / manpage, + '@INPUT@', ], depends: documentation_deps, + input: manpage, output: fs.stem(manpage) + '.html', install: true, install_dir: get_option('datadir') / 'doc/git-doc', From patchwork Fri Dec 27 13:59:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13921917 Received: from fout-b7-smtp.messagingengine.com (fout-b7-smtp.messagingengine.com [202.12.124.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 544FF1F5407 for ; Fri, 27 Dec 2024 14:00:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308006; cv=none; b=LeeM/Q1/ldlWudXrjpp4aKbOGR895YGWLMt7EVyBvCHZONSIbiSmMq9fOBGvQCZjpws1CedIw7cXDyZzZN8b3viNaI2prRSpkLA0pMmJBvw1uvD15ylSLdKBE8cvudjzRdmbPWEZ2gbDCDYc10Y02fYL2pz08+He61f3d8iL1YA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308006; c=relaxed/simple; bh=G7bll/iTqD6mOxHLRUiv3nmSOIv/sQaeQeVTDynXsu8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=mVqSQ2DxzreVI+F2QW+VQqCc+iJxUThfsywhwi5WRMY/vF10QXUxv7SwPA9xPSujYhFHFNZhIS76gIYsbsTYNpiF5XNKIj5JtNI1gZDdGE5V8SOThS9TuO3+cvc4HlHUdcKstZP93n9NrgxRAoQl+ve/C+iYNXQvSbcoNZpMcFk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=CM2QZQ31; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=odvISTyw; arc=none smtp.client-ip=202.12.124.150 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="CM2QZQ31"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="odvISTyw" Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.stl.internal (Postfix) with ESMTP id 9DCA0114011B; Fri, 27 Dec 2024 09:00:04 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Fri, 27 Dec 2024 09:00:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1735308004; x=1735394404; bh=7QylO4lrZ14ILdgrFzFd6wQLgQojwvND8WJqqGggpHI=; b= CM2QZQ318qhzVqKYwBvDOx5QrTWkFC0/DHVSjpmL85HFdSJ+5jdjVkfSTWe9XCpN 7ckUN3SpSoc4xadBm8Cuykn741PTAPskhPFDZQCj+xbg5FY2727LnjW3hR4dIbRE Lz4I18ynI/gerR0PWhKvt1em+1JicDriBcVPQBHG7X4N54P76tOWexSHa8zV1wI9 gqfw29NuiYjnn2LnOMBgVqeI4ioYnUfuuxTIcmxcQUtDQcMRYWh0NXPWyp/7ZX3y w6qCulUszsz0Y7xhMc2jKLgQQp5ANnRl5jU8z6686d0dTgNvmj8tZBfFQpca/RLx gv686gJz7qZ4rusNgz0D4Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735308004; x= 1735394404; bh=7QylO4lrZ14ILdgrFzFd6wQLgQojwvND8WJqqGggpHI=; b=o dvISTywKxs6vxV340vOWRxrqADHrv8//U3VtlMkn9l7b4TUvppQ4A2cjb/GvdUOT Yr24ugEqs0o6YbPQKj5ZfCIDr227edXWEqv2C/V9+O5bJoiwQysOpGyeFCTN4pzl R3sBbAkLbfIZX6EUBKzU5jDmEEj8bxi0Qbk00nLdovpgYscgM9B57DIdZP0x/L5u aSk/VYpkuPtA7AVjcbvnMDN+d+xxvZyjGLv7PoRj4nDXKhRRso/fCXdSLFBSjRc8 kuuess1jN5fljv/vSmRjmPHkUIBMgkMjJ8oLKN6NMHQSzLWgi0WcyAizWaFEiD7D Lh9IWmtB04gDEeuAQAgJw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvtddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdej necuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrih hmqeenucggtffrrghtthgvrhhnpeffueeiudejvdekheeuvdekfeffiedvueelteekudeh jeetkeegvddugfdtgfeileenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpshesphhkshdrihhmpdhnsggprhgtphhtthhopedvpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpd hrtghpthhtohepthhoohhnsehiohhttghlrdgtohhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Dec 2024 09:00:03 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 98f02edd (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 27 Dec 2024 13:57:57 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 27 Dec 2024 14:59:31 +0100 Subject: [PATCH v2 03/12] meson: fix generation of merge tools Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241227-b4-pks-meson-docs-v2-3-f61e63edbfa1@pks.im> References: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> In-Reply-To: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> To: git@vger.kernel.org Cc: Toon Claes X-Mailer: b4 0.14.2 Our buildsystems generate a list of diff and merge tools that ultimately end up in our documentation. And while Meson does wire up the logic, it tries to use the TOOL_MODE environment variable to set up the mode. This is wrong though: the mode is set via an argument that we have fixed to 'diff' mode by accident. Fix this such that merge tools are properly generated. Signed-off-by: Patrick Steinhardt --- Documentation/meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/meson.build b/Documentation/meson.build index b3c8b6c56339e10099f8c37a4d8198f402192520..c2512328ca9b76a5dd512453ddbb776faea7967f 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -318,12 +318,11 @@ foreach mode : [ 'diff', 'merge' ] shell, '@INPUT@', '..', - 'diff', + mode, '@OUTPUT@' ], env: [ 'MERGE_TOOLS_DIR=' + meson.project_source_root() / 'mergetools', - 'TOOL_MODE=' + mode, ], input: 'generate-mergetool-list.sh', output: 'mergetools-' + mode + '.txt', From patchwork Fri Dec 27 13:59:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13921918 Received: from fhigh-b8-smtp.messagingengine.com (fhigh-b8-smtp.messagingengine.com [202.12.124.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FBBE1F4E5A for ; Fri, 27 Dec 2024 14:00:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.159 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308008; cv=none; b=tahUGDV4j8OMcT9UPSmZ4pG/S6oruXa/FdN9cBQAROrhOe6mH72D6Aj5OpxjMTzZNFqyp9jln3g6r7v9G8TNIpMXZF2BmCzioufuOO6gkN9/XSbHTsL+72Grju+XOk80X1N4k4fK4CVjWm1sgLF3mk0/FPHDtOdFPgMxA6QlMy4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308008; c=relaxed/simple; bh=B6pbq+SdWGKEWs9j64b5Ix2OZMiU43oUY4O3sUEhJn0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZAMIBdye/ApEcMa91TT0FwWXoXMt8ebn29BhLqJRe0gjJzH8fshThMNL8wpxTJ8NMmkZJ+cjttwk+Ed+GrRj/VfuVcIP+yOgQtv+lV+wl78aRh1dwmJX1HY2dQ1BdeLjFQYfgUOlFMw8RhF14v8xYcAQIJe0A9c5R2gdD6afhCM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=LO1Z/PYH; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=XgAqNSIz; arc=none smtp.client-ip=202.12.124.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="LO1Z/PYH"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="XgAqNSIz" Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id 10F55254018B; Fri, 27 Dec 2024 09:00:06 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Fri, 27 Dec 2024 09:00:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1735308005; x=1735394405; bh=8nAzg8w6XZ7KmHa7Y60LEgqORzKvOh0P29yEvSX3ues=; b= LO1Z/PYHOmytSinyfg4AVAlFwuSS2kAn+BlilXyqVRdJJJM1r+hFNaS01PyM4Hki 0vdxQZnborJXsWPOBPiP9EosBjR/UEV5QrW30Yf+XKxEG6ui2xaFxR396pisgqtZ WWHQBxq6OlT3EJmRGmZOcTUvVWi75NZZ37Z28kIBrURWRQnEJzKrL2W/A7FJI6sx J6zWY4S6q+IOUImSXQDvPsopVMjuYUVa/JJZJ+Vfiz9kFDC+iu+Re9IJ0YkjEeBM CndFhgfoBNlFIFunvwlhs8V6gHr3wdiIWSVO2evxVYFbCQn7/HwoZLOwlDGRYgnv w/dw10DgMbErTQWB4AXffQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735308005; x= 1735394405; bh=8nAzg8w6XZ7KmHa7Y60LEgqORzKvOh0P29yEvSX3ues=; b=X gAqNSIz8oTLn/BRdzFWRT7HIhkb8j+si51F7idT2ZQRcudgzUCq6u78H15dtROGF +ozfVuw2KUAIqrhxROgubsCMim83Ss1W3aT7QCInKtfgK+2VIw0gMSHNNtql3kKS fSZAcERC0vOYPRysywl793cKyQ5yGqaF5s5KXYyUJtGWTYUBYOmXYaTcGJnp/0dp 0B8sJEy3U/FKkRM9xPTCvqwKsJdCE8bvg4pxH4QbHzHxEXgBTnCI9iw/tkfYgqTm CB2Ev+XaOXg66opB3cDvB5ppmx2rGdgpmLN2KH2RtaU0Xqb8pJYpDqG//YbYp50q ssb+a/A2ulFIx5I+1oRMg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvtddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdej necuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrih hmqeenucggtffrrghtthgvrhhnpeffueeiudejvdekheeuvdekfeffiedvueelteekudeh jeetkeegvddugfdtgfeileenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpshesphhkshdrihhmpdhnsggprhgtphhtthhopedvpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpd hrtghpthhtohepthhoohhnsehiohhttghlrdgtohhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Dec 2024 09:00:04 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 99bd7bd5 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 27 Dec 2024 13:57:58 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 27 Dec 2024 14:59:32 +0100 Subject: [PATCH v2 04/12] meson: generate HTML pages for all man page categories Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241227-b4-pks-meson-docs-v2-4-f61e63edbfa1@pks.im> References: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> In-Reply-To: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> To: git@vger.kernel.org Cc: Toon Claes X-Mailer: b4 0.14.2 When generating HTML pages for our man pages we only generate them for category 1 in Meson, which are the pages corresponding to our built-in commands. I cannot tell why I added this filter though: our Makefile installs all man pages, so a Meson-based build misses out on many of them. Fix this by removing the filter. Signed-off-by: Patrick Steinhardt --- Documentation/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/meson.build b/Documentation/meson.build index c2512328ca9b76a5dd512453ddbb776faea7967f..48583e9a7f4b037de218358f16f59ce08141cbe8 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -366,7 +366,7 @@ foreach manpage, category : manpages ) endif - if get_option('docs').contains('html') and category == 1 + if get_option('docs').contains('html') custom_target( command: asciidoc_common_options + [ '--backend=' + asciidoc_html, From patchwork Fri Dec 27 13:59:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13921919 Received: from fhigh-b8-smtp.messagingengine.com (fhigh-b8-smtp.messagingengine.com [202.12.124.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FDB41F5419 for ; Fri, 27 Dec 2024 14:00:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.159 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308010; cv=none; b=oG2yHFUotwaBDloFXJlAtsG4uFDu0E5oK7VCLEmpZYxtYk0WkdsZWhu2iM7Lv0oRD7tCCwpVrXVp5Rx72EpvCFETMuGj8y8RD2ob2CbLl4K50uD7jnccD6vvI8+zSuJiVVmkefZs85AbRTqWrOQ/3lm7fIE1BD56Gh3Um9Cbm3g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308010; c=relaxed/simple; bh=7gBQCBv008kwYM83VG+gFkqyx7q78+iAKeArTl7qc4U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qxICSMQ+oQUUyE6S6T6IYkpEsdOgjcjiMADzC6ntnIiS91F7FtNqnj/cMaznyFR0d8QStGsy+VbUppRaEa+hle25t9BMhnT6u/5sdz1Z73H2JYusgBp7O5Z9GNHY+QfALylvk2s6jMMSCsKFE+nJjblbpnTMS4/kSBzcAd5BJeM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=H4T2NUAV; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=odxUvPUl; arc=none smtp.client-ip=202.12.124.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="H4T2NUAV"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="odxUvPUl" Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id 5A04A2540182; Fri, 27 Dec 2024 09:00:07 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Fri, 27 Dec 2024 09:00:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1735308007; x=1735394407; bh=U1eTPbO0VAmOFhF2VsbNrch9g3GOXw0Jzyj3BdfyZhI=; b= H4T2NUAVtZlGGr9EDGzQg2JWd0EADpif/UhA0g2j45jq0vQ5Ji/EF1k3zH4/ZnEj bBcK5Rb+Ze/QnvaVG8oVPIMV8LhszlxKLvdh14LSI6nzNnjsPzfPtm8qrIMwFe4s 9odC+9CR/c4ctuujy6y/wNmWyNPkWI4ZPu+hi60KM+OBAiu+kkKaOJypmQrE2Fi/ AhYMzV8btBkHigPxP/zh8jjdbvMSLGd1NxOvaz7WHS+xY+Zkls37fI9uStr6rllQ 5XRg95uraLyc9gGP9JttmTwaeaDU2nSzLbtfUCoPcnx4Q/m/ZT1cveUkZpRGP/HW Xm4PyBt35shue/LF6hrPRg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735308007; x= 1735394407; bh=U1eTPbO0VAmOFhF2VsbNrch9g3GOXw0Jzyj3BdfyZhI=; b=o dxUvPUl/rHmmtFNKXZNlo1Azq17Bt/6ncUOMjvP0XeGEjhNeDRvlFQ3+Yr3RgLAA q9MiQsZn+63mwPlCVeamVbHalHUorud0GkX8xtfL3kVlXgg7PnegwxIRDweVGOZj mA9bQ/+CnGfHka3LIyxon0AMxVZyv97d5Jnk5QydhZf1q3eig+Gc6/7Hy43Bouhk QdcMwme+KTlPsgBERZrVb5uUyz3lSY1WueazDOKkElm8reo+i2nGbtHRK6CS/k1M e0ge32Q0uAdv0pdxSKz+o1uVpImnuvhFLp/bh0weSVlmkpgAmh6uuaok57hBi0me Ai2HQgG252Q16UEcY/nFQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvtddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdej necuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrih hmqeenucggtffrrghtthgvrhhnpedtuddvfefftdevleehgeethefhleejtddtueduudel keekueejhfffhfduffethfenucffohhmrghinheptghonhhfrdhinhenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhkshdrihhmpdhn sggprhgtphhtthhopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehgihhtse hvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepthhoohhnsehiohhttghlrdgt ohhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Dec 2024 09:00:06 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id d3bb9f49 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 27 Dec 2024 13:57:59 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 27 Dec 2024 14:59:33 +0100 Subject: [PATCH v2 05/12] Documentation: inline user-manual.conf Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241227-b4-pks-meson-docs-v2-5-f61e63edbfa1@pks.im> References: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> In-Reply-To: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> To: git@vger.kernel.org Cc: Toon Claes X-Mailer: b4 0.14.2 When generating our user manual we set up a bit of extra configuration compared to our normal configuration. This is done by having an extra "user-manual.conf" file that Asciidoc seems to pull in automatically due to matching filenames with "user-manual.txt". This dependency is quite hidden though and thus easy to miss. Furthermore, it seems that Asciidoc does not know to pull it in for out-of-tree builds where we use relative paths. The setup in AsciiDoctor is somewhat different: instead of having two sets of configuration, we condition the use of manual-specific configs based on whether the document type is "book". And as we only build our user manual with that type this is sufficient. Use the same trick for our user manual by inlining the configuration into "asciidoc.conf.in" and making it conditional on whether or not "doctype-book" is defined. Signed-off-by: Patrick Steinhardt --- Documentation/Makefile | 2 +- Documentation/asciidoc.conf.in | 10 ++++++++++ Documentation/user-manual.conf | 11 ----------- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index a89823e1d1ee5042367bdcca6ed426196d49ce89..4f152077dded75bedd59abd56db5f6f0693908de 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -362,7 +362,7 @@ manpage-cmd = $(QUIET_XMLTO)$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $< %.xml : %.txt $(ASCIIDOC_DEPS) $(QUIET_ASCIIDOC)$(TXT_TO_XML) -d manpage -o $@ $< -user-manual.xml: user-manual.txt user-manual.conf $(ASCIIDOC_DEPS) +user-manual.xml: user-manual.txt $(ASCIIDOC_DEPS) $(QUIET_ASCIIDOC)$(TXT_TO_XML) -d book -o $@ $< technical/api-index.txt: technical/api-index-skel.txt \ diff --git a/Documentation/asciidoc.conf.in b/Documentation/asciidoc.conf.in index b89bccf2309d782ba29ea716a132b888c1421669..f2aef6cb79f47cf132b97d88a7e74fb40da8ac8d 100644 --- a/Documentation/asciidoc.conf.in +++ b/Documentation/asciidoc.conf.in @@ -25,12 +25,22 @@ manmanual=Git Manual mansource=Git @GIT_VERSION@ revdate=@GIT_DATE@ +ifdef::doctype-book[] +[titles] + underlines="__","==","--","~~","^^" +endif::doctype-book[] + ifdef::backend-docbook[] [linkgit-inlinemacro] +ifndef::doctype-book[] {0%{target}} {0#} {0#{target}{0}} {0#} +endif::doctype-book[] +ifdef::doctype-book[] +{target}{0?({0})} +endif::doctype-book[] [literal-inlinemacro] {eval:re.sub(r'(<[-a-zA-Z0-9.]+>)', r'\1', re.sub(r'([\[\s|()>]|^|\]|>)(\.?([-a-zA-Z0-9:+=~@,\/_^\$]+\.?)+)',r'\1\2', re.sub(r'(\.\.\.?)([^\]$.])', r'\1\2', macros.passthroughs[int(attrs['passtext'][1:-1])] if attrs['passtext'][1:-1].isnumeric() else attrs['passtext'][1:-1])))} diff --git a/Documentation/user-manual.conf b/Documentation/user-manual.conf deleted file mode 100644 index 0148f126dcdf6aca15a5560fb5b122b85b022461..0000000000000000000000000000000000000000 --- a/Documentation/user-manual.conf +++ /dev/null @@ -1,11 +0,0 @@ -[titles] - underlines="__","==","--","~~","^^" - -[attributes] -caret=^ -startsb=[ -endsb=] -tilde=~ - -[linkgit-inlinemacro] -{target}{0?({0})} From patchwork Fri Dec 27 13:59:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13921920 Received: from fhigh-b8-smtp.messagingengine.com (fhigh-b8-smtp.messagingengine.com [202.12.124.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AA301F4E33 for ; Fri, 27 Dec 2024 14:00:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.159 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308010; cv=none; b=Qo8A86QUNj1OIVnvYdBpmR6bii94IuqYx+xIYxEWcGyYyx79So1h7TeQHtoOgqc2Z/arpwATcayzfUg5os6xajffZzAY+KW34geU1IpgDMFvxRdb5XAzWSOYB+MglfkIMwbh/IfMv+uvwgFYrhVmw3gbd0ITXMcN5E/NPgIoYVw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308010; c=relaxed/simple; bh=zOd5jXNRzQ19wQYT18g6HeoYGZDffEfQA2JtOamqBFQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tqVebu7DpY5qlAyrGui3Alb79+zjVKLLM4yg0Gbcy3v5E9w+DggiE5+TFYDXM4nOFPBJUk7+RDVvljvDl7WMd4ImFgZDNCBzwrho0xJNesOnVDtLx2pD6OxbCvhbhxO1kbNBaPLcwbfkdUhcPWR7soum9xMVg3GI8eGA17KIf4o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=ogcLW9Xp; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=cURVMxsk; arc=none smtp.client-ip=202.12.124.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="ogcLW9Xp"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="cURVMxsk" Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id 952362540181; Fri, 27 Dec 2024 09:00:08 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Fri, 27 Dec 2024 09:00:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1735308008; x=1735394408; bh=lAOOcmSFvyccUhlaF6nhWCaRod8ZSqSjvKYAMi68YcI=; b= ogcLW9XpVfjTZ/r54QtcsVAXLEwZLffSIghgCfVp3/tEkcHo0ozvegHbHDyjLOiL 1HBqtJ3vEUu+0FaMcRcePOoA0waR/wFp91wTiftyNkVfmm/EjZ638Ur//1MnNBL0 yq4zE0tDrUwip68e7Okr5XHBFakc9k59SAng+C6QnM4unuiQNBJMDF8tOpKwaBWw svf58pM/DRn6n7GsRKdN0eapOB8BcdehyOIDstgsTw5yOJQs26YcN8e2ZkgWkoxU 6VjXlhUK7rqUrtfzOtsrggkAZwfyXbiCzK6AU6fMmhQT0utU8PwpOTZdRAwsHEjD /fx6JbgHnYw4Z8xKmShsXA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735308008; x= 1735394408; bh=lAOOcmSFvyccUhlaF6nhWCaRod8ZSqSjvKYAMi68YcI=; b=c URVMxsknbOJrdAsZ04OkX4tdCOTwYnc4w03t1/Uk+lZ1RyLOsUrUpKEO+uskXa+G cuYA0mVbk/puA8hri7AQLZLRjf5QeIfFuB4VHofBgM/bwB5kS8sQ9u6VhzK/RSBd zjMsu9B4NDTiQc0hTe9pSxbVYf6Y4o+nehOjRrX+m40A0Q/QEcoKevWp0RG0IA+C OjW7GH5VDbxpqx1BdXS4aWUviyjfOMdrXnvpPMZrz6msjYutv1kEe91zQgwpFip4 gam3V6VFKdZoN7FYTg/XK/rH05nLSQgBKvQN/KhtW4SupljApotBUrnI7VD5Y/u8 3CJZxs0NoiATfS1w1vOLg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvtddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdej necuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrih hmqeenucggtffrrghtthgvrhhnpeffueeiudejvdekheeuvdekfeffiedvueelteekudeh jeetkeegvddugfdtgfeileenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpshesphhkshdrihhmpdhnsggprhgtphhtthhopedvpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehtohhonhesihhothgtlhdrtghomhdprhgtphhtth hopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Dec 2024 09:00:07 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 70a0140b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 27 Dec 2024 13:57:59 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 27 Dec 2024 14:59:34 +0100 Subject: [PATCH v2 06/12] meson: generate user manual Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241227-b4-pks-meson-docs-v2-6-f61e63edbfa1@pks.im> References: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> In-Reply-To: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> To: git@vger.kernel.org Cc: Toon Claes X-Mailer: b4 0.14.2 Our documentation contains a user manual that gives people a short introduction to Git. Our Makefile knows to generate the manual into three different formats: an HTML page, a PDF and an info page. The Meson build instructions don't yet generate any of these. While wiring up all these formats I hit a couple of road blocks with how we generate our info pages. Even though I eventually resolved these, it made me question whether anybody actually uses info pages in the first place. Checking through a couple of downstream consumers I couldn't find a single user of either the info pages nor of our PDF manual in Arch Linux, Debian, Fedora, Ubuntu, FreeBSD or OpenBSDFedora. So it's rather safe to assume that there aren't really any users out there, and thus the added complexity does not seem worth it. Wire up support for building the user manual in HTML format and conciously skip over the other two formats. This is basically a form of silent deprecation: if people out there use the other two formats they will eventually complain about them missing in Meson, which means we can wire them up at a later point. If they don't we can phase out these formats eventually. Signed-off-by: Patrick Steinhardt --- Documentation/meson.build | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Documentation/meson.build b/Documentation/meson.build index 48583e9a7f4b037de218358f16f59ce08141cbe8..404cb20d10a2fbbe4e014bd8a7df74c49dad40a7 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -382,3 +382,35 @@ foreach manpage, category : manpages ) endif endforeach + +if get_option('docs').contains('html') + xsltproc = find_program('xsltproc') + + user_manual_xml = custom_target( + command: asciidoc_common_options + [ + '--backend=' + asciidoc_docbook, + '--doctype=book', + '--out-file=@OUTPUT@', + '@INPUT@', + ], + input: 'user-manual.txt', + output: 'user-manual.xml', + depends: documentation_deps, + ) + + custom_target( + command: [ + xsltproc, + '--xinclude', + '--stringparam', 'html.stylesheet', 'docbook-xsl.css', + '--param', 'generate.consistent.ids', '1', + '--output', '@OUTPUT@', + '@INPUT@', + user_manual_xml, + ], + input: 'docbook.xsl', + output: 'user-manual.html', + install: true, + install_dir: get_option('datadir') / 'doc/git-doc', + ) +endif From patchwork Fri Dec 27 13:59:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13921921 Received: from fout-b7-smtp.messagingengine.com (fout-b7-smtp.messagingengine.com [202.12.124.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D511F1F542B for ; Fri, 27 Dec 2024 14:00:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308012; cv=none; b=gwgn6d9zdBQwymx1PbRa6QyAcRSC45XLOtrNXJgSEo3Cw3U0UsK+tpa5Xy8SjHrfu/7Od45L1MLg27MU3UNeEKZeXXjU2W4IDQFfsSyzijc0I/TzAVOaQaa0V7jm6Ue2MyDkva9p5uF3AGqAgdLEhVbLfHmjg/rgb9cTxLUW1wE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308012; c=relaxed/simple; bh=PfS8PUapD8hRKzjsI5m0gpW0HxEB81tdMJ91gQvoWcE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jCjyA6ndw6TOFUFc99s3GfeEiB2XZuYR3XCISK9GVRQrK4sdBQELMmysyRe8tP0jC80mtqHq9zpLlnxZWBGeS1T5ss260gURpNDsqlGRi4+eYEuIjV7ZdJsdRw0Jih1ywL+SOaI5tirhQCAioNDjBaaiJ+sH72hMBwsBZ5DdjYI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=gqQDPyP2; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=m/Uuo0AD; arc=none smtp.client-ip=202.12.124.150 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="gqQDPyP2"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="m/Uuo0AD" Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id E2401114012F; Fri, 27 Dec 2024 09:00:09 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Fri, 27 Dec 2024 09:00:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1735308009; x=1735394409; bh=z1gHdqMScTaw/2M3LtgZdVKtiz6Q2s1s5EBHuaRRK/U=; b= gqQDPyP2ef+MlcCbZWy4EY8fYFOY2DfHsvrgOuE+f97c7wY+tOOBYtlKg6rpW6tO GihrxcwZ9OYTkJwJOvjzcett7aMp+3qgzFN/OZrTZoDOs4U3lJt/r9fH5m4zRrst PQeHMPz2q5xWMrTQZiKMJ9tiQjw1eVxsj3QekOlEqxMkcixJowpzQhx2Xz8GmvMT MQo9rnXGLfJ6ChyNFfITxD0EGcOhi70FaYnxAinznYFJ1bE8g6FwmRl3uT1ikg/z 4Dm0VF8NY2ye1KtZfFFoDTfigtwIXtgLagw+OGy9W0hZm6WH9+ds9CxzcQ6qBMbH 15E6wovEvhfVUnkf4yQUiA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735308009; x= 1735394409; bh=z1gHdqMScTaw/2M3LtgZdVKtiz6Q2s1s5EBHuaRRK/U=; b=m /Uuo0ADCke9oVLb7PY2jlNhQoEC73NPvjFaliSbEddP2iuATKffnWNRWLU40/ghY MOlPlagWDX7+8wyGvN0JPePGN3NoP3mOzUWGfgcnT3vhICin1m7ZkzF33VmBgqsd /JJwG8BXoMMjiLlLnW4HS3VFMoqnu0s0EHUJ4Iw4GSAHfJI2Ypge4h/yUL5jsTyN bVsV/Gbf36fP70ddAm26Ev1LkkWRUEgaJX22APSCR7HJzJppPiBP2FozNr9OJkgJ MAbl8MMObwOvHOYYL/xPT/gi+PD7cUl0e3HBXKvPeW6p6j0QBXef6JS8qIgfyB7T xsh8EvX65GHjLsfFQF0pA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvtddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdej necuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrih hmqeenucggtffrrghtthgvrhhnpeffueeiudejvdekheeuvdekfeffiedvueelteekudeh jeetkeegvddugfdtgfeileenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpshesphhkshdrihhmpdhnsggprhgtphhtthhopedvpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpd hrtghpthhtohepthhoohhnsehiohhttghlrdgtohhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Dec 2024 09:00:08 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 54d7a279 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 27 Dec 2024 13:58:00 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 27 Dec 2024 14:59:35 +0100 Subject: [PATCH v2 07/12] Documentation: refactor "api-index.sh" for out-of-tree builds Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241227-b4-pks-meson-docs-v2-7-f61e63edbfa1@pks.im> References: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> In-Reply-To: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> To: git@vger.kernel.org Cc: Toon Claes X-Mailer: b4 0.14.2 The "api-index.sh" script generates an index of API-related documentation. The script does not handle out-of-tree builds and thus cannot be used easily by Meson. Refactor it to be independent of locations by both accepting a source directory where the API docs live as well as a path to an output file. Signed-off-by: Patrick Steinhardt --- Documentation/Makefile | 2 +- Documentation/technical/api-index.sh | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index 4f152077dded75bedd59abd56db5f6f0693908de..b2d146c44f4ded750b5e0766eb66b25cb5ec08e3 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -367,7 +367,7 @@ user-manual.xml: user-manual.txt $(ASCIIDOC_DEPS) technical/api-index.txt: technical/api-index-skel.txt \ technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS)) - $(QUIET_GEN)cd technical && '$(SHELL_PATH_SQ)' ./api-index.sh + $(QUIET_GEN)'$(SHELL_PATH_SQ)' technical/api-index.sh ./technical ./technical/api-index.txt technical/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../ $(patsubst %,%.html,$(API_DOCS) technical/api-index $(TECH_DOCS)): %.html : %.txt \ diff --git a/Documentation/technical/api-index.sh b/Documentation/technical/api-index.sh index 9c3f4131b8586408acd81d1e60912b51688575ed..296488557434b7fff60ab25f4246a4dc270729c0 100755 --- a/Documentation/technical/api-index.sh +++ b/Documentation/technical/api-index.sh @@ -1,6 +1,17 @@ #!/bin/sh +if test $# -ne 2 +then + echo >&2 "USAGE: $0 " + exit 1 +fi + +SOURCE_DIR="$1" +OUTPUT="$2" + ( + cd "$SOURCE_DIR" + c=//////////////////////////////////////////////////////////////// skel=api-index-skel.txt sed -e '/^\/\/ table of contents begin/q' "$skel" @@ -18,11 +29,11 @@ done echo "$c" sed -n -e '/^\/\/ table of contents end/,$p' "$skel" -) >api-index.txt+ +) >"$OUTPUT"+ -if test -f api-index.txt && cmp api-index.txt api-index.txt+ >/dev/null +if test -f "$OUTPUT" && cmp "$OUTPUT" "$OUTPUT"+ >/dev/null then - rm -f api-index.txt+ + rm -f "$OUTPUT"+ else - mv api-index.txt+ api-index.txt + mv "$OUTPUT"+ "$OUTPUT" fi From patchwork Fri Dec 27 13:59:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13921922 Received: from fhigh-b8-smtp.messagingengine.com (fhigh-b8-smtp.messagingengine.com [202.12.124.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F10191F5435 for ; Fri, 27 Dec 2024 14:00:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.159 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308013; cv=none; b=aQj6FxIvkDKFGLAiA0xIjAn9WRBExi0JEg0g2n4vPHX448B6YUnR7WBipj58YUIQOqn+VWor60FGRRUM8Pxcg9X7zvzBwCeJMsCa7cW+PsJPNg49K215Pb7KXHZJhd6KxWJ9+UJGSMDW60UZdfpc+OiWDONp1tETHzstA1xIevk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308013; c=relaxed/simple; bh=66ot4C1x3RabNf60gNM5oySNumzXHbfrikqLXJNLdUU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TeI0iVrnC8HA2NMDsPjxdh5ppukijSh69Q1RYuwSUJuaXtkhhbViGjHGi3m/m3x+RQ6vXR7tfIvh7aajd6HzgDwWLmkzTWrgcNtmiMNwodpSsbvzJbmzL9XdqZx3qnrGaUncTIjcd+W/pHA+7bFjCbQhz5VgHT3LgTMm8Uf3PHE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=uZy4frEc; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=RNe0iPA1; arc=none smtp.client-ip=202.12.124.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="uZy4frEc"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="RNe0iPA1" Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id 058362540181; Fri, 27 Dec 2024 09:00:10 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Fri, 27 Dec 2024 09:00:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1735308010; x=1735394410; bh=HcGJznM7C5LtKOyr0BQFdZKRDlGgHHCopkTUWV8bK1o=; b= uZy4frEcKmIYx7Jm33RD+XDi5oa57AXCgP0ZnjvdC5bZ2ZBxoDm7kjCfsqjhO083 BE3kGf/DIt1c2GkyrQiq8Sl5sCaENlECdfgn3SM4OcffMbM+DLt/5k0mYwg8Um2r NLNzMtbaIrCbtewy0MPT1GDJmv0D9uub8+AEN+PVQc8eQ8AyyNqsdTkMzPzeZVok C9AxVX8BmdTwbp1Cj7XbLi+8Hw0wZIUw80LveOMy24lD9YHkqFPhJiN/vZQvSnN0 WKh8Oms8boNtX0TklRa45fyfg/wGoMvgoQZn31xxFFKNJPQ3PKjIUUtwrwxUUrPO Djkjnwkeqcqrd7Zaq4fBYg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735308010; x= 1735394410; bh=HcGJznM7C5LtKOyr0BQFdZKRDlGgHHCopkTUWV8bK1o=; b=R Ne0iPA1U/Wcq/zRnLFkeZ0Hcv2HlZZsTAxLO8Hy+Ns3zz3Nsdo8mqW+QN9+FBFDM tH9Vx7UGk8NJ8gBoekL4ZBQYNIXU1q/f1bgdmql/yhjZV+GfeLz1VIR5PUSGhTsN 5/uQsAHbuHC/MzY8s3UALtlU+o31I8MKm/0GW+7P+1/wF+90it1+si+mf114IDf8 bMOW2+g6DweNFnuN7M6vfsS6pDh4VvYqujsMAMCMxYjFqrrkTrtCLZtufgg1jl2j byVeY8LEHDSmaKySr6By7xWgMesFPP79ocjq+nveVL41aErM6TFKWHaxvhDyzctD hc15kZj65q2rCMKD4U4NQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvtddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdej necuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrih hmqeenucggtffrrghtthgvrhhnpeffueeiudejvdekheeuvdekfeffiedvueelteekudeh jeetkeegvddugfdtgfeileenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpshesphhkshdrihhmpdhnsggprhgtphhtthhopedvpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehtohhonhesihhothgtlhdrtghomhdprhgtphhtth hopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Dec 2024 09:00:09 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 1084b22e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 27 Dec 2024 13:58:01 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 27 Dec 2024 14:59:36 +0100 Subject: [PATCH v2 08/12] Documentation: refactor "howto-index.sh" for out-of-tree builds Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241227-b4-pks-meson-docs-v2-8-f61e63edbfa1@pks.im> References: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> In-Reply-To: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> To: git@vger.kernel.org Cc: Toon Claes X-Mailer: b4 0.14.2 The "howto-index.sh" is used to generate an index of our how-to docs. It receives as input the paths to these documents, which would typically be relative to the "Documentation/" directory in Makefile-based builds. In an out-of-tree build though it will get relative that may be rooted somewhere else entirely. The file paths do end up in the generated index, and the expectation is that they should always start with "howto/". But for out-of-tree builds we would populate it with the paths relative to the build directory, which is wrong. Fix the issue by using `$(basename "$file")` to generate the path. While at it, move the script into "howto/" to align it with the location of the comparable "api-index.sh" script. Signed-off-by: Patrick Steinhardt --- Documentation/Makefile | 4 ++-- Documentation/{ => howto}/howto-index.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/Makefile b/Documentation/Makefile index b2d146c44f4ded750b5e0766eb66b25cb5ec08e3..e284ec8b98d6187ecb73011f6e490610dd3e7370 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -411,8 +411,8 @@ gitman.info: gitman.texi $(patsubst %.txt,%.texi,$(MAN_TXT)): %.texi : %.xml $(QUIET_DB2TEXI)$(DOCBOOK2X_TEXI) --to-stdout $*.xml >$@ -howto-index.txt: howto-index.sh $(HOWTO_TXT) - $(QUIET_GEN)'$(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(HOWTO_TXT)) >$@ +howto-index.txt: howto/howto-index.sh $(HOWTO_TXT) + $(QUIET_GEN)'$(SHELL_PATH_SQ)' ./howto/howto-index.sh $(sort $(HOWTO_TXT)) >$@ $(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt $(ASCIIDOC_DEPS) $(QUIET_ASCIIDOC)$(TXT_TO_HTML) $*.txt diff --git a/Documentation/howto-index.sh b/Documentation/howto/howto-index.sh similarity index 92% rename from Documentation/howto-index.sh rename to Documentation/howto/howto-index.sh index 167b363668b8b53d752d5971798d3ca26c8f7f1f..eecd123a93607998e8b4eb8511f4165973f9d93e 100755 --- a/Documentation/howto-index.sh +++ b/Documentation/howto/howto-index.sh @@ -48,7 +48,7 @@ do file="$txt" fi - echo "* link:$file[$title] $from + echo "* link:howto/$(basename "$file")[$title] $from $abstract " From patchwork Fri Dec 27 13:59:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13921925 Received: from fout-b7-smtp.messagingengine.com (fout-b7-smtp.messagingengine.com [202.12.124.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26DD01F543E for ; Fri, 27 Dec 2024 14:00:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308014; cv=none; b=opEpkKOc/YaN7BOgwKLL3eTbyfd5/3ClznDohWx/vb8VUDJDiZAy1F2o3XvIIgp8Lc/K55JS6SZtQWTsNyPaywijMh7xRK9Ahxtz3i3axc6Ot64BrAUptTz70xp3vx1U1A2tl9krbbrTXZLFYQq97NMhHqhh/IB7JVhSXOfniQ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308014; c=relaxed/simple; bh=MgtouUHWLAFkTaTypVMONKA+Lu+uiCIFeD1BbIZUuRA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=s+3qlTRLpJEk7yf4d9G9P1X3aa+i7rsKkTCwps/bJihQU+ftpi4o3Sx/rZ0ogGGkdHBg5d4UNthrAnT2M23sB0GWe73lTfDMEOcwVYtCUS0fbgdTM3ogW322/K86iMkAcP82klS0X5bL6SjHmtW0XptBpIGRFk4XIr2Q9QTIjbY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=i6kRY7yV; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=wXDDYV/1; arc=none smtp.client-ip=202.12.124.150 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="i6kRY7yV"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="wXDDYV/1" Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.stl.internal (Postfix) with ESMTP id 4796511400D9; Fri, 27 Dec 2024 09:00:11 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Fri, 27 Dec 2024 09:00:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1735308011; x=1735394411; bh=pA/tEZouwzeFS8H31m6JiPrx/NMCJV+f3clzQrznJ84=; b= i6kRY7yVU3z6IZUwBTGxt0ah7bqQ8Nmxhjl7y+/OcJP9nn194vadR+TxsWq+9isS 1sycC6fZSSI9S3H9GDpwhbpwRIJgVBe58iOrEYVMn50b0/H4K+M6AzoeFzXv3yMO 33KQng/r3EskL0SoHQqxMpaCL42wWUgoRYUyfvTEvxH0zhagRyAKz0a+I2s7OedJ kOokQH5d3IqFkLaUOURj/hihw8UQcSmzNKVCQAzTq2YYHybpDxlRTSbwUtnUXkOt 42qbQu1RDxYhe63d6nOCovaguXEa1YS2qz1OZsvwxTJ5J4fEHPIhcLsliwWYsFA/ PIpwRKLfQsWFnQQTr8ik1A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735308011; x= 1735394411; bh=pA/tEZouwzeFS8H31m6JiPrx/NMCJV+f3clzQrznJ84=; b=w XDDYV/1zfClCN1wGWYYUvVS7YnyGiIqVfLSkP+diGwVMhz6zHdbOwsLGt9KxJphc vkXzUZbmSuzxb0O+tfyczIuhEBTLBrEEQEhAakP6OmoCaN9sJe/z9Wy3lcOEy1wp v3ga7L5AqU7+upuF6WKfVuT17aqG2l1Fna2OWnki5vodKm26CFi91HppvKEqQhDH g0ANho2KbRKsNOz2HtFef3cbHG68PeAgqXsQnuNGNyRhvr9bDB5+YJwCMNwssDa9 /As0IP7ouuMLF8CWZn5vymB/yqBVufVQ/1mO6TDuj/2cV2iTLtQ5Lz+rb48PBrPR xydAETqCzAf/b8TIYFNuQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvtddgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdej necuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrih hmqeenucggtffrrghtthgvrhhnpeffueeiudejvdekheeuvdekfeffiedvueelteekudeh jeetkeegvddugfdtgfeileenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpshesphhkshdrihhmpdhnsggprhgtphhtthhopedvpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehtohhonhesihhothgtlhdrtghomhdprhgtphhtth hopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Dec 2024 09:00:10 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 04fc0262 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 27 Dec 2024 13:58:02 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 27 Dec 2024 14:59:37 +0100 Subject: [PATCH v2 09/12] meson: generate articles Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241227-b4-pks-meson-docs-v2-9-f61e63edbfa1@pks.im> References: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> In-Reply-To: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> To: git@vger.kernel.org Cc: Toon Claes X-Mailer: b4 0.14.2 While the Meson build system already knows to generate man pages and our user manual, it does not yet generate the random assortment of articles that we have. Plug this gap. Signed-off-by: Patrick Steinhardt --- Documentation/howto/meson.build | 62 ++++++++++++++++++++++++++++++++++ Documentation/meson.build | 36 ++++++++++++++++++++ Documentation/technical/meson.build | 66 +++++++++++++++++++++++++++++++++++++ 3 files changed, 164 insertions(+) diff --git a/Documentation/howto/meson.build b/Documentation/howto/meson.build new file mode 100644 index 0000000000000000000000000000000000000000..c023c104161e61ca0399b5390d59e20343746621 --- /dev/null +++ b/Documentation/howto/meson.build @@ -0,0 +1,62 @@ +howto_sources = [ + 'coordinate-embargoed-releases.txt', + 'keep-canonical-history-correct.txt', + 'maintain-git.txt', + 'new-command.txt', + 'rebase-from-internal-branch.txt', + 'rebuild-from-update-hook.txt', + 'recover-corrupted-blob-object.txt', + 'recover-corrupted-object-harder.txt', + 'revert-a-faulty-merge.txt', + 'revert-branch-rebase.txt', + 'separating-topic-branches.txt', + 'setup-git-server-over-http.txt', + 'update-hook-example.txt', + 'use-git-daemon.txt', + 'using-merge-subtree.txt', + 'using-signed-tag-in-pull-request.txt', +] + +howto_index = custom_target( + command: [ + shell, + meson.current_source_dir() / 'howto-index.sh', + '@INPUT@', + ], + env: script_environment, + capture: true, + input: howto_sources, + output: 'howto-index.txt', +) + +custom_target( + command: asciidoc_html_options, + input: howto_index, + output: 'howto-index.html', + depends: documentation_deps, + install: true, + install_dir: get_option('datadir') / 'doc/git-doc', +) + +foreach howto : howto_sources + howto_stripped = custom_target( + command: [ + find_program('sed'), + '-e', + '1,/^$/d', + '@INPUT@', + ], + input: howto, + output: fs.stem(howto) + '.stripped', + capture: true, + ) + + custom_target( + command: asciidoc_html_options, + input: howto_stripped, + output: fs.stem(howto_stripped.full_path()) + '.html', + depends: documentation_deps, + install: true, + install_dir: get_option('datadir') / 'doc/git-doc/howto', + ) +endforeach diff --git a/Documentation/meson.build b/Documentation/meson.build index 404cb20d10a2fbbe4e014bd8a7df74c49dad40a7..8c6ff0bce1206d988cc0d3b7997fa0f338d01194 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -413,4 +413,40 @@ if get_option('docs').contains('html') install: true, install_dir: get_option('datadir') / 'doc/git-doc', ) + + articles = [ + 'DecisionMaking.txt', + 'MyFirstContribution.txt', + 'MyFirstObjectWalk.txt', + 'ReviewingGuidelines.txt', + 'SubmittingPatches', + 'ToolsForGit.txt', + 'git-bisect-lk2009.txt', + 'git-tools.txt', + ] + + foreach article : articles + custom_target( + command: asciidoc_common_options + [ + '--backend=' + asciidoc_html, + '--out-file=@OUTPUT@', + '@INPUT@', + ], + input: article, + output: fs.stem(article) + '.html', + depends: documentation_deps, + install: true, + install_dir: get_option('datadir') / 'doc/git-doc', + ) + endforeach + + asciidoc_html_options = asciidoc_common_options + [ + '--backend=' + asciidoc_html, + '--out-file=@OUTPUT@', + '--attribute', 'git-relative-html-prefix=../', + '@INPUT@', + ] + + subdir('howto') + subdir('technical') endif diff --git a/Documentation/technical/meson.build b/Documentation/technical/meson.build new file mode 100644 index 0000000000000000000000000000000000000000..21dfb8b5c9d93490f16c24bab1d49631e0395571 --- /dev/null +++ b/Documentation/technical/meson.build @@ -0,0 +1,66 @@ +api_docs = [ + 'api-error-handling.txt', + 'api-merge.txt', + 'api-parse-options.txt', + 'api-simple-ipc.txt', + 'api-trace2.txt', +] + +articles = [ + 'bitmap-format.txt', + 'build-systems.txt', + 'bundle-uri.txt', + 'commit-graph.txt', + 'directory-rename-detection.txt', + 'hash-function-transition.txt', + 'long-running-process-protocol.txt', + 'multi-pack-index.txt', + 'packfile-uri.txt', + 'pack-heuristics.txt', + 'parallel-checkout.txt', + 'partial-clone.txt', + 'platform-support.txt', + 'racy-git.txt', + 'reftable.txt', + 'remembering-renames.txt', + 'repository-version.txt', + 'rerere.txt', + 'scalar.txt', + 'send-pack-pipeline.txt', + 'shallow.txt', + 'sparse-checkout.txt', + 'sparse-index.txt', + 'trivial-merge.txt', + 'unit-tests.txt', +] + +api_index = custom_target( + command: [ + shell, + meson.current_source_dir() / 'api-index.sh', + meson.current_source_dir(), + '@OUTPUT@', + ], + env: script_environment, + input: api_docs, + output: 'api-index.txt', +) + +custom_target( + command: asciidoc_html_options, + input: api_index, + output: 'api-index.html', + depends: documentation_deps, + install: true, + install_dir: get_option('datadir') / 'doc/git-doc/technical', +) + +foreach article : api_docs + articles + custom_target( + command: asciidoc_html_options, + input: article, + output: fs.stem(article) + '.html', + install: true, + install_dir: get_option('datadir') / 'doc/git-doc/technical', + ) +endforeach From patchwork Fri Dec 27 13:59:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13921923 Received: from fout-b7-smtp.messagingengine.com (fout-b7-smtp.messagingengine.com [202.12.124.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9B631F4E4A for ; Fri, 27 Dec 2024 14:00:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308014; cv=none; b=uE/TnzmU6TILpSzpaYQ3ZtoqDrJZIswchIMmKUyqbVqanuJIBNfhHuQHo7IzVGuuZXv/ffTYYUtNzB7eo/P7wAtwJwnWLHAAbSjYH3J3srXd1nRpQjhJF3zvKjDWuLCa/2ohd4lITvNlmGNjMDeHvizs+Ed700xd9k0BrPsdLvw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308014; c=relaxed/simple; bh=ohiBOzeXKpW+cfOTzdqlsXyEnGk3FvsY6EwWX25Jd8o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ASdQ3tRun/52vctOmnHXO0qb6HXorszqg8SlvsfwfwwlzDAjpcq6TnoWI4QWHWIrT+egtVplwR91KDoSfiXDy048yJzNFwyJr7jvh6uNl+uxPMATR9X/xIn2csDoSbh49/pSbB/mW95oij4YzrBLW9xPjjflixU7omGk8tvL3+4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=NkwPlCWw; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=XYfs7wWX; arc=none smtp.client-ip=202.12.124.150 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="NkwPlCWw"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="XYfs7wWX" Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id 3D8F71140120; Fri, 27 Dec 2024 09:00:12 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Fri, 27 Dec 2024 09:00:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1735308012; x=1735394412; bh=nVZKHcl3vOOo8D+Pm//ROfAqnUHV8+oRlkQiH+yUnFE=; b= NkwPlCWw/qhaE2etki4zGGiG/+ZuA3XUv2zKE1lQsNmFJ8zUsHhlO84i38aDRbJ6 w6eWDifr8jlty9KIl8mifvW84Fj9vy+LkVBfY2mpB5G68truqzBnrLQFBv5ced9B oAjy33mP5AKAaj2BabbVN4NuUnf8RPSG3gLffgev1Q1/IUc9r1QZbLs55Z5jxhp4 mBBN7ISUtgS/EkAuKjbPBDBgWAs+k/kuXC1bbLAc77OyRI9yHhkl+DkIYo7VdgtW rDtpOuIW7IJsdJ/D3yc3Ka2hXHhXexB4MuBVPOyNcfyw9tFS1O3eW+Phl1+u638Y 39W/P3eiREpsjD/wgg+gvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735308012; x= 1735394412; bh=nVZKHcl3vOOo8D+Pm//ROfAqnUHV8+oRlkQiH+yUnFE=; b=X Yfs7wWXN2xPbkXrakVPP/l4zAtOZma66tI0bIvVdylMfzkDJfa0zgh8KiGINIzIc bq1sffZjKQEvFRw4cthjyiQ5iwA+Kx1KkQaXY2+rciO5n1AnghR5Q+C6WWwDJdLM wxYuFCP5VZQ1J5koc3UngUuIU0FMXAgbBM4kR0Cyg1Wq56LP3bCXxCFynrkTWo49 by7gc7YYlJG0Zqm8K/Y+J9d1xGLQu2CPPzrStiyHeB4eh/SlRe7ViaEL78CSl2+g UkKcNHcv22AeRKOuzRR1oRQ4s1C6WI0aOv/et++sBzqdtGvbf8YMHDknqeTU0p5i lWSSrF7yJRSnhb6Bc5SMw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvtddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdej necuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrih hmqeenucggtffrrghtthgvrhhnpeffueeiudejvdekheeuvdekfeffiedvueelteekudeh jeetkeegvddugfdtgfeileenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpshesphhkshdrihhmpdhnsggprhgtphhtthhopedvpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpd hrtghpthhtohepthhoohhnsehiohhttghlrdgtohhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Dec 2024 09:00:11 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 55269fdb (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 27 Dec 2024 13:58:03 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 27 Dec 2024 14:59:38 +0100 Subject: [PATCH v2 10/12] meson: install static files for HTML documentation Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241227-b4-pks-meson-docs-v2-10-f61e63edbfa1@pks.im> References: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> In-Reply-To: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> To: git@vger.kernel.org Cc: Toon Claes X-Mailer: b4 0.14.2 Now that we generate man pages, articles and user manual with Meson the only thing that is still missing in an installation of HTML documents is a couple of static files. Wire these up to finalize Meson's support for generating HTML documentation. Diffing an installation that uses our Makefile with an installation that uses Meson only surfaces a couple of discepancies now: - Meson doesn't install "everyday.html" and "git-remote-helpers.html". These files are marked as obsolete and don't contain any useful information anymore: they simply point to their modern equivalents. - Meson doesn't install "*.txt" files when asking for HTML docs. I'm not sure why our Makefiles do this in the first place, and it does seem like the resulting installation is fully functional even without those files. Other than that, both layout and file contents are the exact same. Signed-off-by: Patrick Steinhardt --- Documentation/meson.build | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Documentation/meson.build b/Documentation/meson.build index 8c6ff0bce1206d988cc0d3b7997fa0f338d01194..4d9511156502653292144fe6962bd3411558d96a 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -384,6 +384,27 @@ foreach manpage, category : manpages endforeach if get_option('docs').contains('html') + configure_file( + input: 'docinfo-html.in', + output: 'docinfo.html', + copy: true, + install: true, + install_dir: get_option('datadir') / 'doc/git-doc', + ) + + configure_file( + input: 'docbook-xsl.css', + output: 'docbook-xsl.css', + copy: true, + install: true, + install_dir: get_option('datadir') / 'doc/git-doc', + ) + + install_symlink('index.html', + install_dir: get_option('datadir') / 'doc/git-doc', + pointing_to: 'git.html', + ) + xsltproc = find_program('xsltproc') user_manual_xml = custom_target( From patchwork Fri Dec 27 13:59:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13921924 Received: from fhigh-b8-smtp.messagingengine.com (fhigh-b8-smtp.messagingengine.com [202.12.124.159]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D3B81F5429 for ; Fri, 27 Dec 2024 14:00:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.159 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308014; cv=none; b=T7MMWecdWg1jsPQijrAx6/AU5jIv6HehQiohEHuIfy1WE2MsasP6JTjcnlhCWIkUG27vlRlij5Wuuv02yQcBXQ7PY8ov8UooNwMBkhT5m0QBjGfbHRddWNVTMUBojwyvv9vTgPTfi+EMeudue5YCtNdwq5y/bmqq5i/afUGX4rw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308014; c=relaxed/simple; bh=kcWJoB+mH+NTIBwTFkgj//ZNL6SKm26TCU+ANqcAYIE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Z9r2UQ9Iyyyeo6htBW60MakWKQJjU27z171+acGL/6EfMQcpKTr2JxTT1zRnCMOIRFvHAQEhSjuHwbiCRdJvh8ZX8O3J7RUrcsONDnrwQNd5+hkjBfmE/nzBwFafzfPtBsC/am1fuElgWvYMlJXolaW1qO9P9E1zWljy9ztK0iQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=CDogzYpl; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Nplv+FD0; arc=none smtp.client-ip=202.12.124.159 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="CDogzYpl"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Nplv+FD0" Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.stl.internal (Postfix) with ESMTP id 73FE62540188; Fri, 27 Dec 2024 09:00:12 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Fri, 27 Dec 2024 09:00:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1735308012; x=1735394412; bh=DdKe+LntkSfX+gAdlfK1Q5JLQEPe0Ku5zdRD3fh3RLA=; b= CDogzYpl05YptRP1dz7+4Rl6uWDf4/IaSjxdIJvEz2+7gf3lV1el6KFaF67kOray XLQTBuie2AnaZgHAqxJqkaQ4OUj737zrtv/SGGOcDn2hMV9CDl+wlkDKQkW+iBuR QYvVBtkT2TnuczphNvSlgCPqRT+pvpQDbjSe9yiGagDX50lYnwBV+mRWKopoAtgH BT86IUdvuSu0K7C6lGtedUt8maYJ4cwiCAnuAAetFb4/4hv4srYoLR6fOZee1MWy NB+iPoHCQ/STny+R6Qg9HbhYxyiUKzpTnTTiZyvr8lHxh8VlVluKGId7lBIUsf42 kJmH418p1Uq+era6KQIfaw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735308012; x= 1735394412; bh=DdKe+LntkSfX+gAdlfK1Q5JLQEPe0Ku5zdRD3fh3RLA=; b=N plv+FD0SrDN1x2MkC4987DJfyvBtitxNHk8ssSS3+ZexqfpWZQXJ20FYPQIHXMRy e100hsUGXg1YGke1UnHnp1PhrxVsktU/BRkMl/epJO683YxC4oS4Y3nh6OFnvqMX z2jWY3B9UYBF/ZOf0RgyCIjL+/3bYvguzwD3XZnDHtcjoaUYKLB07oFDEfeZnUhv SeqS+bjpi0VB7SSDC927AJ7bxUOVr/Fl4xIhz98TdZ4pycdmpm0zMfhzNswNY1EE pQqDjT2xTUmmTh/EhwGcvjByxLN+/nRhUO7qiGuHZ8u99L8n4Lgqj1zQlgcc8Pdw ugVlYOW6gzBLwsQgq4ybQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvtddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdej necuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrih hmqeenucggtffrrghtthgvrhhnpeffueeiudejvdekheeuvdekfeffiedvueelteekudeh jeetkeegvddugfdtgfeileenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpshesphhkshdrihhmpdhnsggprhgtphhtthhopedvpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehtohhonhesihhothgtlhdrtghomhdprhgtphhtth hopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Dec 2024 09:00:11 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id cc8555c5 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 27 Dec 2024 13:58:04 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 27 Dec 2024 14:59:39 +0100 Subject: [PATCH v2 11/12] t/Makefile: make "check-meson" work with Dash Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241227-b4-pks-meson-docs-v2-11-f61e63edbfa1@pks.im> References: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> In-Reply-To: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> To: git@vger.kernel.org Cc: Toon Claes X-Mailer: b4 0.14.2 The "check-meson" target uses process substitution to check whether extracted contents from "meson.build" match expected contents. Process substitution is unportable though and thus the target will fail when using for example Dash. Fix this by writing data into a temporary directory. Signed-off-by: Patrick Steinhardt --- t/.gitignore | 1 + t/Makefile | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/t/.gitignore b/t/.gitignore index 91cf5772fe5643dbe075da98ed5166e1899b9a54..3e6b0f2cc57ffed0394d1cd2efc1e374f1c2169b 100644 --- a/t/.gitignore +++ b/t/.gitignore @@ -2,4 +2,5 @@ /test-results /.prove /chainlinttmp +/mesontmp /out/ diff --git a/t/Makefile b/t/Makefile index 290fb03ff011d39c31c5073c796aa6f4dc966283..daa5fcae86f3480079b8c9743dd28e3fd304c27b 100644 --- a/t/Makefile +++ b/t/Makefile @@ -103,6 +103,7 @@ clean-except-prove-cache: clean-chainlint clean: clean-except-prove-cache $(RM) -r '$(TEST_RESULTS_DIRECTORY_SQ)' + $(RM) -r mesontmp $(RM) .prove clean-chainlint: @@ -116,16 +117,17 @@ check-chainlint: check-meson: @# awk acts up when trying to match single quotes, so we use \047 instead. - @printf "%s\n" \ + @mkdir -p mesontmp && \ + printf "%s\n" \ "integration_tests t[0-9][0-9][0-9][0-9]-*.sh" \ "unit_test_programs unit-tests/t-*.c" \ "clar_test_suites unit-tests/u-*.c" | \ while read -r variable pattern; do \ - meson_tests=$$(awk "/^$$variable = \[\$$/ {flag=1 ; next } /^]$$/ { flag=0 } flag { gsub(/^ \047/, \"\"); gsub(/\047,\$$/, \"\"); print }" meson.build) && \ - actual_tests=$$(ls $$pattern) && \ - if test "$$meson_tests" != "$$actual_tests"; then \ + awk "/^$$variable = \[\$$/ {flag=1 ; next } /^]$$/ { flag=0 } flag { gsub(/^ \047/, \"\"); gsub(/\047,\$$/, \"\"); print }" meson.build >mesontmp/meson.txt && \ + ls $$pattern >mesontmp/actual.txt && \ + if ! cmp mesontmp/meson.txt mesontmp/actual.txt; then \ echo "Meson tests differ from actual tests:"; \ - diff -u <(echo "$$meson_tests") <(echo "$$actual_tests"); \ + diff -u mesontmp/meson.txt mesontmp/actual.txt; \ exit 1; \ fi; \ done From patchwork Fri Dec 27 13:59:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13921926 Received: from fout-b7-smtp.messagingengine.com (fout-b7-smtp.messagingengine.com [202.12.124.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3D4B1F63C8 for ; Fri, 27 Dec 2024 14:00:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308015; cv=none; b=IpSgEzLhoNNWCNovYUeFfocbRIqcej/LpWbO3c8nltSBUJ9txjg20g0hUPV4EZrGHd+CfSaIfyRBrcedtbFH0NIeMGYXC+mNdNCADgWfXihtLAk/Kso3AoTuYLHCxu3iThYvWSHynmMGVV4kdKJImAJYnjitjui2u2XGEZZS26E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735308015; c=relaxed/simple; bh=VLERwtbXArgwWaDZpV7C1qPIn9xcGXzuP7GfxvZ7Fgs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=NFp9sMs58/seKzMFAfWNxmwpqvaEuCzMULiq45VDXHSQ8ko0FCJRViDKUd12M+rrTOcxGMv48W/HpwRbjbrL7EjY19k7gAgK9KrPPJJ6zgAEqPWXTW1LEK1pl9fYSMduU/lvGR0+s6rscLCyeaVlF3dZfJp7KcRgQ+RhrP7N7cc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=TjI7WD1H; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=nku66FKP; arc=none smtp.client-ip=202.12.124.150 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="TjI7WD1H"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="nku66FKP" Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id E1B0D114011B; Fri, 27 Dec 2024 09:00:12 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Fri, 27 Dec 2024 09:00:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1735308012; x=1735394412; bh=p4Eynlh7t1I9srpHERlknVz7ycPAwPscDAzTjmVxmi0=; b= TjI7WD1HC5L4Pf1pNM7r2ZcoeIzyUtLLz8slxJFCrJniDW2TG3VMh1OlnOkJ327A XYSe8wiic/EZn47S7Q6QQC5j5E95c8evfhtMq66qldf1Uu55TNEQzGr8oSePMl7+ 6IszttN5FqKMpJMgbgSX8q0xz+GMUWNRnQLWyp52yQ8hrf/7qvLFjd5QStsLKGLM eJPJe0s6mShi4TflnuklgzQQF6VdfR/+bgQiEeymjL7Mu6INObJq8qsfthCC2/7r eRqa/74ZGTPdZL0QV22Ac1KqwycsNVZ618GtzwUfr7zz7JecsJQF8oew7VTTTjLp 26wPcEql6BSmZPm5jaLZTQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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-sender:x-me-sender:x-sasl-enc; s=fm2; t=1735308012; x= 1735394412; bh=p4Eynlh7t1I9srpHERlknVz7ycPAwPscDAzTjmVxmi0=; b=n ku66FKPd6rGz8L8fKLNW0eb3OjTMsX9A9rGsAL/RfiDRPefy79xue1uD6sNPt/oz xphiIE2SmlynJ5E26z7i5SHztYBc5S0ItJ8Fdx2t3p58ToDVwkm61khYISWm1Xek s9dsjCsdePDNYZwopZMg2jvYdO2P0QyUkENwytTC55wH/GK4fcNVk6Uf8cI3Rqi9 JX7ynNwYmTirkonHtoOCnLgx4xwmeCrHrV8mDex5ydt/VLRPhOI3OTMKmBMBHdIf 0O7srVcua6OLw4atxXk4mIqe4vL7RlgIDA6+udl6lh45+Db1lGD7O7e8dhdCPMYG CxllWZJFlBIBErBjK9Q6w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvtddgheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeertdertdej necuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrih hmqeenucggtffrrghtthgvrhhnpeffueeiudejvdekheeuvdekfeffiedvueelteekudeh jeetkeegvddugfdtgfeileenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpshesphhkshdrihhmpdhnsggprhgtphhtthhopedvpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpd hrtghpthhtohepthhoohhnsehiohhttghlrdgtohhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 27 Dec 2024 09:00:11 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id ac73772f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 27 Dec 2024 13:58:04 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 27 Dec 2024 14:59:40 +0100 Subject: [PATCH v2 12/12] Documentation: wire up sanity checks for Meson Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241227-b4-pks-meson-docs-v2-12-f61e63edbfa1@pks.im> References: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> In-Reply-To: <20241227-b4-pks-meson-docs-v2-0-f61e63edbfa1@pks.im> To: git@vger.kernel.org Cc: Toon Claes X-Mailer: b4 0.14.2 Wire up sanity checks for Meson to verify that no man pages are missing. This check is similar to the same check we already have for our tests. Signed-off-by: Patrick Steinhardt --- Documentation/.gitignore | 1 + Documentation/Makefile | 16 ++++++++++++++++ Documentation/meson.build | 31 +++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/Documentation/.gitignore b/Documentation/.gitignore index 649df89474d357ccc91109b5c35fe2d0910f968a..9f4bb3c4bf9e9e84f740b3210c570ec25e15e4fe 100644 --- a/Documentation/.gitignore +++ b/Documentation/.gitignore @@ -12,6 +12,7 @@ cmds-*.txt mergetools-*.txt SubmittingPatches.txt tmp-doc-diff/ +tmp-meson-diff/ GIT-ASCIIDOCFLAGS /.build/ /GIT-EXCLUDED-PROGRAMS diff --git a/Documentation/Makefile b/Documentation/Makefile index e284ec8b98d6187ecb73011f6e490610dd3e7370..aedfe99d1d35889aa24ed6b9085e614dbc240096 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -339,6 +339,7 @@ clean: $(RM) $(cmds_txt) $(mergetools_txt) *.made $(RM) GIT-ASCIIDOCFLAGS $(RM) asciidoc.conf asciidoctor-extensions.rb + $(RM) -rf tmp-meson-diff docinfo.html: docinfo-html.in $(QUIET_GEN)$(RM) $@ && cat $< >$@ @@ -494,6 +495,20 @@ lint-docs-fsck-msgids: $(LINT_DOCS_FSCK_MSGIDS) lint-docs-manpages: $(QUIET_GEN)./lint-manpages.sh +.PHONY: lint-docs-meson +lint-docs-meson: + @# awk acts up when trying to match single quotes, so we use \047 instead. + @mkdir -p tmp-meson-diff && \ + awk "/^manpages = {$$/ {flag=1 ; next } /^}$$/ { flag=0 } flag { gsub(/^ \047/, \"\"); gsub(/\047 : [157],\$$/, \"\"); print }" meson.build | \ + grep -v -e '#' -e '^$$' | \ + sort >tmp-meson-diff/meson.txt && \ + ls git*.txt scalar.txt | grep -v -e git-bisect-lk2009.txt -e git-tools.txt >tmp-meson-diff/actual.txt && \ + if ! cmp tmp-meson-diff/meson.txt tmp-meson-diff/actual.txt; then \ + echo "Meson man pages differ from actual man pages:"; \ + diff -u tmp-meson-diff/meson.txt tmp-meson-diff/actual.txt; \ + exit 1; \ + fi + ## Lint: list of targets above .PHONY: lint-docs lint-docs: lint-docs-fsck-msgids @@ -501,6 +516,7 @@ lint-docs: lint-docs-gitlink lint-docs: lint-docs-man-end-blurb lint-docs: lint-docs-man-section-order lint-docs: lint-docs-manpages +lint-docs: lint-docs-meson ifeq ($(wildcard po/Makefile),po/Makefile) doc-l10n install-l10n:: diff --git a/Documentation/meson.build b/Documentation/meson.build index 4d9511156502653292144fe6962bd3411558d96a..2a26fa8a5fedc0f46a82fcc31bf1d6457f6d082c 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -471,3 +471,34 @@ if get_option('docs').contains('html') subdir('howto') subdir('technical') endif + +# Sanity check that we are not missing any tests present in 't/'. This check +# only runs once at configure time and is thus best-effort, only. Furthermore, +# it only verifies man pages for the sake of simplicity. +configured_manpages = manpages.keys() + [ 'git-bisect-lk2009.txt', 'git-tools.txt' ] +actual_manpages = run_command(shell, '-c', 'ls git*.txt scalar.txt', + check: true, + env: script_environment, +).stdout().strip().split('\n') + +if configured_manpages != actual_manpages + missing_manpage = [ ] + foreach actual_manpage : actual_manpages + if actual_manpage not in configured_manpages + missing_manpage += actual_manpage + endif + endforeach + if missing_manpage.length() > 0 + error('Man page found, but not configured:\n\n - ' + '\n - '.join(missing_manpage)) + endif + + superfluous_manpage = [ ] + foreach configured_manpage : configured_manpages + if configured_manpage not in actual_manpages + superfluous_manpage += configured_manpage + endif + endforeach + if superfluous_manpage.length() > 0 + error('Man page configured, but not found:\n\n - ' + '\n - '.join(superfluous_manpage)) + endif +endif