From patchwork Fri Dec 13 08:48: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: 13906678 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (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 E04EE19992D for ; Fri, 13 Dec 2024 08:49:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.148 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079748; cv=none; b=MSsyaof32z+321ZgLk+lWBXjz+KKlS0exbuez+/i3fSFIFZGWye3tw7dCHt+YnOR7raMGnkbJQjAdMji9mc5nHzkNlHwL41oNAxE44V74dTqRq1hlsOWAkCCNK0R+aZA40PMa7xr4t4OHAz3CeqoUPOcBW14tOmk6qxa9y4Ln+g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079748; c=relaxed/simple; bh=mTXQNuyCoaoYsu+I/kFkOYn3x5LXLQZOO//xcwGTb2Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cmCogqB1zrF/L5lT0zj0XSswY8iwxP3hynK5SbbHXxlS8kJmyCZEM7FxPRCy76uhRXEKJWruweUp2E3pkEVc+azIYW7dlyzJyOR3a/SpfoVBXfGW5J3z/EEN9QKSGoXdAaJYcwyG8H5I08DtSJtE4vCxtRIl7DBstlEdIG0dQUA= 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=GfWOlAMg; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=slTFBJqK; arc=none smtp.client-ip=202.12.124.148 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="GfWOlAMg"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="slTFBJqK" Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfout.stl.internal (Postfix) with ESMTP id 9D82A1140202 for ; Fri, 13 Dec 2024 03:49:05 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Fri, 13 Dec 2024 03:49:05 -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=fm1; t=1734079745; x=1734166145; bh=TxknLB0VlFXLKmia6MGrj/PX6qVQiPOAhyCvN6KSlUA=; b= GfWOlAMgLV6vYB66StqJQEgJt3ifmaCD5gYD5WclkQHDEyLj1wJC2HOnqAwdEqx6 GY1cLi/QDHEcS+Qme3WIO0xp0EPiOdVdyOOXsfl/xdu6zGnPusEpxho3RSuPi2eY HlUzCGswy/RvWFEMQPqM3S+JbRppH+7rYfMdZZ/ztHsoslXbyLliYAMscVg6mjwZ MmQL1S1BZqfaIg4wMVsGKFkPMXyTA8/t40bOCJnqPi0tpNeqW+YVE6JrmiJzhqk8 S1DZ8zdIdFgfZeboaDSI0Fn6n+aVq/M6kiLDPj1gTXY0Ao6FaJUzt60OMVW6u5C6 x7k46H1x5l/60zJHNaY7IA== 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=fm1; t=1734079745; x= 1734166145; bh=TxknLB0VlFXLKmia6MGrj/PX6qVQiPOAhyCvN6KSlUA=; b=s lTFBJqKipxXjPhyyjvWRF+fiFunRt6LLoAvAJSp4m0dYGrImwI9bcCWjePVYzHq8 q6m/+mWkJFCX+OXt7pEA23SKVs+MFyFwDJ62wHHv/7oVrImG7Lry1QK3/jqIJYae N/6kC0CJk+z+PfH2bYAQS2ceW+l+caAA3sH48EFPreCvuYNZka8zur6UulPcVsps /hIf56ZAos5sh4NDmQO0SYJK6hNW+FoDNXE+MrPCceNbNkq0jhXeXbblzhqi9jO+ w8DYrvl8+6HSkk1ha7Xe84CGJTFnYDXpipUw0I6yORgKguhUDd/Uekj8yHYiIcoM eZOSDO+791glxVXduEKng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeeigdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucgovfgvgihtqfhnlhihqd dqteefjeefqddtgeculdehtddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeer tdertdejnecuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesph hkshdrihhmqeenucggtffrrghtthgvrhhnpeeffeeliedvteehgfduheeuffehieehheej vdehkeelgefftdffveeileduieetkeenucffohhmrghinheptghonhhfrdhinhdprhgsrd hinhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehp shesphhkshdrihhmpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprh gtphhtthhopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 13 Dec 2024 03:49:04 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id a89201e1 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 13 Dec 2024 08:47:22 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 13 Dec 2024 09:48:30 +0100 Subject: [PATCH 01/10] 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: <20241213-b4-pks-meson-docs-v1-1-0c7895952cd3@pks.im> References: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> In-Reply-To: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> To: git@vger.kernel.org Cc: 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 | 107 ++++++++++++++++++++++++++++++++++------------ meson_options.txt | 2 + 2 files changed, 82 insertions(+), 27 deletions(-) diff --git a/Documentation/meson.build b/Documentation/meson.build index f2426ccaa30c29bd60b850eb0a9a4ab77c66a629..d62b0846d3f8ebc412f5fa9f775f037a3656093a 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -204,28 +204,85 @@ 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], -) +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], + ) + + 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], + ) + + 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', @@ -242,10 +299,6 @@ cmd_lists = [ 'cmds-foreignscminterface.txt', ] -documentation_deps = [ - asciidoc_conf, -] - documentation_deps += custom_target( command: [ perl, @@ -277,7 +330,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, @@ -300,7 +353,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(), @@ -310,7 +363,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 32a72139bae870745d9131cc9086a4594826be91..0d8ba28de6da7d0ed2ac4bdef7efa967509ec898 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -73,6 +73,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 13 08:48: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: 13906680 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (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 5AC7319B5B8 for ; Fri, 13 Dec 2024 08:49:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079749; cv=none; b=AfI2kCxFe6Pxg0PSyhf41XqCXvKjp9k22h+juGfW5Qg93SosjxW8+XDKabZAA4hvMExVaJ8v/CQ3W7LB4VXvVzF+qUM7M+v1ecx/g+4ywOVhg2VnN38uioFu5TPIxX49R+qDY+sJLWPFez0FMy7ezqLOSmd1RDTn+84Om8GOwRQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079749; c=relaxed/simple; bh=9PzGLP6uVL1zyQmJ8OpwzkJ1WdYuGzEux+zgt+eUKzo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qCgN/GTLRHbXV462fZpeeRwlFPOxD8bUTZhLGGxAq2mS6kLvDjUz9vmFWrR6PyP0UIXB62Vfz+27gAjU5jDuphHiDRNLExff33+M9acOpDT4OS5Hdcamy5fpdsEHFW7G0Y0rxGOuS0k2gg2HylcCFuFusxUusYIpCh5XzzVSDOU= 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=BiVJ/HFf; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=NJap8FPn; arc=none smtp.client-ip=202.12.124.156 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="BiVJ/HFf"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="NJap8FPn" Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfhigh.stl.internal (Postfix) with ESMTP id CDA9B25401E2 for ; Fri, 13 Dec 2024 03:49:05 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Fri, 13 Dec 2024 03:49:05 -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=fm1; t=1734079745; x=1734166145; bh=Avww8VDu4sOZ9ILceCGje7QI9GWDpYMgEEsuhx6A2XY=; b= BiVJ/HFf/5cFX9MFAJI3ejF6Y1NPqZ7vmQRhmw5eG+skrEM5vCaunIYHjMmH4j1p hCzrj1W8hD43ze2yxEAlSDz/GJ9JG7moHQYruNx6xDQJDpvgK41HTjSobOrMdoZ4 zWA1ZlighIzcBamFloqverx+wFMuJNOlI9PHeXOx9B1vwAJSZbFlA+S18MAN85iR Ys4nwiSZ/xrONKvKxH04jWczDBjf6oDVQME2kCkWACqn6vQys2a5utSJhTiZEJy2 06yNIwfAADGjj2Z6IOdJ1eVMKVs4dhTSaLNlUN0FYgUOizj9QtX36PF0MIspRcnJ 3p69XbsJKhivXowF7d7paw== 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=fm1; t=1734079745; x= 1734166145; bh=Avww8VDu4sOZ9ILceCGje7QI9GWDpYMgEEsuhx6A2XY=; b=N Jap8FPnmL0SMYlcix/NS7zULR6OpLkzT1Ys+1i5LEa3eI0paVeRpeXRGP1ZTRuvu OpLCYHbxRZvLALgL/H3XW3F0bp8ev9ZW+YAV6OEyODQA+t1QAXUVLBezk3iys6yU K9GUmmdEP1vWS5PihlWRNHRGL2mHogivE5SxQsoNxvzi5GHPbdXC66rx2zFAanT9 H/YWW+C27uTOpvPp312DC5TcpEoy7r6rlxj2HH4/m/i5EZrBy9ha52dUhG+c9QUt 7Ezl+1oi1F46jczV1b94GhVWI1qNwR5rT+O3ui0nv6KZdsOm7M3aJCSL/eGVd6UB CGPR2t6arioowOYMW5L6A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeeigdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucgovfgvgihtqfhnlhihqd dqteefjeefqddtgeculdehtddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeer tdertdejnecuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesph hkshdrihhmqeenucggtffrrghtthgvrhhnpeeffeeliedvteehgfduheeuffehieehheej vdehkeelgefftdffveeileduieetkeenucffohhmrghinheptghonhhfrdhinhdprhgsrd hinhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehp shesphhkshdrihhmpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprh gtphhtthhopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 13 Dec 2024 03:49:04 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 81891169 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 13 Dec 2024 08:47:23 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 13 Dec 2024 09:48:31 +0100 Subject: [PATCH 02/10] 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: <20241213-b4-pks-meson-docs-v1-2-0c7895952cd3@pks.im> References: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> In-Reply-To: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> To: git@vger.kernel.org Cc: 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 d62b0846d3f8ebc412f5fa9f775f037a3656093a..d23ed82795026e511379ff1e77355d2ec33ec499 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], ) @@ -260,7 +260,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], ) @@ -302,10 +302,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 ) @@ -313,7 +314,7 @@ foreach mode : [ 'diff', 'merge' ] documentation_deps += custom_target( command: [ shell, - meson.current_source_dir() / 'generate-mergetool-list.sh', + '@INPUT@', '..', 'diff', '@OUTPUT@' @@ -322,6 +323,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 @@ -333,9 +335,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', ) @@ -343,10 +346,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', @@ -354,6 +355,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(), @@ -366,9 +371,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 13 08:48: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: 13906679 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (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 81E571A0AF7 for ; Fri, 13 Dec 2024 08:49:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.148 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079749; cv=none; b=Sd/0qP9pg3nNEsoq95Vzb5BjU9wCrXoW0xPtPHh0RKPVcQ3PzDZhETrC09jJPo1SAGv+OsNkvA00/vRDD9KiBB6YI6YQlNK5VcOKtIo0Xjk3y+AjJzMati6X1jDJObaxRtXKY2gAOhYP9UiVzquhk0B674+EXRJGyI3kE8dDZk8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079749; c=relaxed/simple; bh=/nO8gh5c2FtG9cLdwUKkZ3ViI8ZkP/ikJ0rOEdnfhf4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pA3qEdYCj+ijwOoNzTvLoNv584YqP+zvsevIZC6b66sG1tU+nKL5+A62DzOkccAAzYB5Mnqd4aIvun+bV7qVlYLnEC+1vxknK5g3dbT59Ez4s8C00ko2z5TmCq2/L5FJdndV/Fy+J0mH8+HclF76ywiHNT45sgcYe3PbmL+ue6E= 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=RwLD0WNr; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=lkBznEBr; arc=none smtp.client-ip=202.12.124.148 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="RwLD0WNr"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="lkBznEBr" Received: from phl-compute-12.internal (phl-compute-12.phl.internal [10.202.2.52]) by mailfout.stl.internal (Postfix) with ESMTP id A59B411401FF for ; Fri, 13 Dec 2024 03:49:06 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Fri, 13 Dec 2024 03:49: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=fm1; t=1734079746; x=1734166146; bh=QL5h1/IWmpyT3u2Z5dFHBbts4QXWIECKh0IijlRDPO4=; b= RwLD0WNrietmK+uUZDZRRnWe8M84s061qog9jMacevjLbu00Cr34Ayrz86nsVlqi 8h+H1X3PewD2fu6BRCUBTS4i2yPQ5h2sOQk0oTJWzX3STuHGwvVTdPO5VdHeeD8W 2m3HQG+y05qMFOx1Mr9bixxa/h61hggYfi5N/fbB3smNVZulNzlftPOpIU0IMiiv sjIHqrGn90vTLXSts5s3e+v5q7KX+X/aXKNxGLseBJZ6UP2NnR7oy8EgNsX8b9Fy /BLiltyM8rEfMOrebpmeBxRLSYhelMpfe70rQ40YFixFLSgVcrcdFxonAGDbXCbw 4FSTUXGtfA9t7V1O5+nL6g== 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=fm1; t=1734079746; x= 1734166146; bh=QL5h1/IWmpyT3u2Z5dFHBbts4QXWIECKh0IijlRDPO4=; b=l kBznEBrs6QfAFo3JQH4/pq3GCsCJFVz1ngg0m6SUKD38+PY7DnLr1f1pNHTW2ZF2 GTZmfk78RLon7uRN2g3ulrg6KyRsvNyBBWzWPe7HJUZr7L3gQWK1GY1Dgf1C9078 jIBT3gPCWYmlUYX2Bm4a2tqyIJVxu/Mju+pQpaDLdjQ5+K6iOXzWaOZX7aCPqF+F MdoEUlyEG1dYhD+Q0wZAayiQw+MEBu5pMIfu9rMw6qJfEGYsBiCFfwzOs+X/3Iss qB9z2wnBps2YHcT1qr2HIHRULPMg63hcGXb9EJ7Glyy3KI6JQS03d+MpczEeojtr mYWkkjG9i5n1nXjDThJTA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeeigdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhfffugg gtgffkfhgjvfevofesthejredtredtjeenucfhrhhomheprfgrthhrihgtkhcuufhtvghi nhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvghrnhepffeuieduje dvkeehuedvkeefffeivdeuleetkeduheejteekgedvudfgtdfgieelnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnh gspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepghhithes vhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 13 Dec 2024 03:49:05 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 51b049f5 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 13 Dec 2024 08:47:24 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 13 Dec 2024 09:48:32 +0100 Subject: [PATCH 03/10] 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: <20241213-b4-pks-meson-docs-v1-3-0c7895952cd3@pks.im> References: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> In-Reply-To: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> To: git@vger.kernel.org Cc: 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 d23ed82795026e511379ff1e77355d2ec33ec499..0d8b58145274c7854fe3fd91de469fe9d1e0bb6f 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -316,12 +316,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 13 08:48: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: 13906683 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (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 8B24C1ABEC7 for ; Fri, 13 Dec 2024 08:49:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079750; cv=none; b=LXEKNB7GuH9ks/qWLiGUZQsa25kxnnrFbJBQ/Rig8fOgr68wUBmd95U2kZZhTmpWxopHsjFi0FKnaFyrNaxjE61s5G/bLmkjFLUsAp2uv8Y2W29FnbB0KP1S0nGmaIvP19ZlpFQ15eGvdNCI75SpWbitjtu4/xhYYa1yx97qrcQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079750; c=relaxed/simple; bh=le+fhBAx1tWECWjcQuEK9SpiF/7LjOULWCjYs126iLg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=KY6rSj/d1xqWHtH6cNyCbnwK9rFszqSXie7T91rR2xRWU+zPiTgFr6enHKHYy/cQGC1VwPmXkofifuvZefYi5roCrL7KNYdmJ+tVzszyeJlTWk0hjuBxTon399HzBz/sYr7TJ4qmcZNIbQVJ1D1fJg1ypZu2+So3w42tF/1JGXg= 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=HLC1lVE3; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=IoF/TAdO; arc=none smtp.client-ip=202.12.124.156 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="HLC1lVE3"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="IoF/TAdO" Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id E7CDA25401EB for ; Fri, 13 Dec 2024 03:49:06 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Fri, 13 Dec 2024 03:49: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=fm1; t=1734079746; x=1734166146; bh=RvZITFce2NJHk+0Nqa/fqBxKDEP4PcHL7d4p44sPRmI=; b= HLC1lVE3jdxj+/BY3wtp3Wo2JdVcFY4E8/iNvCGUhXgyA8kYuyOAsPvbHiPeNtnh hy5wamCcBHK7I5kjh5CDRRo/jIRq6XjuIVldLR2H5i34SCDaM2I2QR+Fh2URYFIs oa9JqfgqeF+k4c+9ich5i7bx5FlkWkZf+6ll+r/CcLxggHHQvlpb/FXKpHtSlgw/ z40HiwsCgUUe/nTDTzNKIa1TE1k52QhtBM/RQp6mSDBKxMoWzGsV2rhOSTPSgIMB vzNqcAQUKFM7HfbwlbWaUC8X34T6Cp7sbib5XpKnDRGAwfMOhpgyXqiLRJhBMyn2 bMsAQkntyTHMOzPMm82wAw== 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=fm1; t=1734079746; x= 1734166146; bh=RvZITFce2NJHk+0Nqa/fqBxKDEP4PcHL7d4p44sPRmI=; b=I oF/TAdO9GfPcCCodaaPW4Bk3J4CxHHAHFtX5fSqoDn4RatQPyeQD0JpD0E+eng0d uQCzNpc3/EAfK28bafwnlFRiEeV+WNU4LRbIxVQ8k82b1eJ1vtVRGhSXHlTHupNN dJ+s+tAqKB8sNUVya5mW7NDssUg/EQ6BI/SD0+BW/JAhTflTYao53+/euuWvnNwx nfJAmCnCAr6QCD2UQ51FptpM5JJgHVDBdepoe5da22x8laY+DDmj3POeM5WekCOE 8WP4enP8BBaeOdVU9+oX6nyu0tZd+46vz/ZdiRa59oVa9u5s8fqxk+HSmBcrqhxx JkLCFHqHDMgTDHTkMXTYA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeeigdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhfffugg gtgffkfhgjvfevofesthejredtredtjeenucfhrhhomheprfgrthhrihgtkhcuufhtvghi nhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvghrnhepffeuieduje dvkeehuedvkeefffeivdeuleetkeduheejteekgedvudfgtdfgieelnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnh gspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepghhithes vhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 13 Dec 2024 03:49:06 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 27137d98 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 13 Dec 2024 08:47:25 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 13 Dec 2024 09:48:33 +0100 Subject: [PATCH 04/10] 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: <20241213-b4-pks-meson-docs-v1-4-0c7895952cd3@pks.im> References: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> In-Reply-To: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> To: git@vger.kernel.org Cc: 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 0d8b58145274c7854fe3fd91de469fe9d1e0bb6f..d36b2b0d8e7795d0520976c1e54a2f90b332cacb 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -364,7 +364,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 13 08:48: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: 13906682 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (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 88C6C1AB6FF for ; Fri, 13 Dec 2024 08:49:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079750; cv=none; b=jhecHROJ0D0Vu9vIKVBsWjvqZIvDNDyxLnXzx07lRAnSe/0eFGtKOKRNUU1LFgcUt477V3Vg1ecaEa8HPF7DTSTM3l0x5I3xV6g56Pzv/xQozlp1Chj8IW9xz+Dg5cje2pJK7DmPzrY7vEm78GkMT9r1eZDtkCxuQg3YXJgNiow= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079750; c=relaxed/simple; bh=/PdkcsFWIQARpiHUpgs/ZkdJ9HFqVD7AAkLGY0Qa8Is=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MxadULW9yWFWLRf734+v+Oo8UQhPOVVOjaEtU14FTy2Jkw6Plf4zj2gyQdwNVONgSXvi3v2D+0QiFSJgrvXcd5uzPmnOr83bfIBj425hYCE/fz4ghXBGvD9UbizaMwd1sVnWbRKMuXDzbuZk+qMveVLNTKhZ5SebBUeoFftcZe4= 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=tW635vq/; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=nYHilIv4; arc=none smtp.client-ip=202.12.124.156 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="tW635vq/"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="nYHilIv4" Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.stl.internal (Postfix) with ESMTP id D0AD125401F4 for ; Fri, 13 Dec 2024 03:49:07 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Fri, 13 Dec 2024 03:49: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=fm1; t=1734079747; x=1734166147; bh=j0wT+/kY998aNlD5W1+lt3IGG0XErfdsTcYxxvb4T88=; b= tW635vq/7AXH9Hm7y5Y0feQDqclbBw1utaDpATwiWn7H7g2njbI1Eem4Z8pCZXaj XR2JBYKSjGmPFZSSV84PRnGQzjSPad9KkIoP04KYkDy6oiMWvY4/eLTMXWmXEgql Mr0YBoZrW4gV4dkZeEd7LI7WuZVO3rdl3C1YukRwfHdXr3aMXVYRdTgjfAqcDjeY O1XRlUQef42Hfm0d75drzsh18VW0IbBFiGuM1B3L+12R9J+ieQbvmXeiX/WbKRa4 ND6JT4I0nm5clzV0yEJcu+lGeiO0E/g6dtZaEW1hmN0PiPOpudPa4a8kb/HBaihO j/PEka1+WIHsIac/+UHLEQ== 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=fm1; t=1734079747; x= 1734166147; bh=j0wT+/kY998aNlD5W1+lt3IGG0XErfdsTcYxxvb4T88=; b=n YHilIv4QrLUr8i39s5pCdKOtxPBQ0GWNUR59N1UoXlntFcxgtJbrRLYCzLmarRlr c6LHpmmDo9sJ6ehlfqosRAQX5XwDBwvtISEVItSginw4+GbBfQt6CeYA3osYgkHI eAocyjFG2p9NLseTj5fhOYNjD6Y2lJp0haPRd8ItukISjDMGppXc/LnF8OIVKcyX 5f6ns5Qwb70pSOJe2aL+5OW73mkXPsuyvO4BB7dZMjipojEks/AmpeQyZc3vAZ4x c0/oLDFnnicbKqUzrd0vH4IsNRMUAC9wdDefb7e9tg36Ahrf8xUqL7tGtoWdkbzx adNVGO8gTwF6LHbrYTLZw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeeigdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucgovfgvgihtqfhnlhihqd dqteefjeefqddtgeculdehtddmnecujfgurhephfffufggtgfgkfhfjgfvvefosehtjeer tdertdejnecuhfhrohhmpefrrghtrhhitghkucfuthgvihhnhhgrrhguthcuoehpshesph hkshdrihhmqeenucggtffrrghtthgvrhhnpedtuddvfefftdevleehgeethefhleejtddt ueduudelkeekueejhfffhfduffethfenucffohhmrghinheptghonhhfrdhinhenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhkshdr ihhmpdhnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhope hgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 13 Dec 2024 03:49:06 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 3e221e68 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 13 Dec 2024 08:47:25 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 13 Dec 2024 09:48:34 +0100 Subject: [PATCH 05/10] 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: <20241213-b4-pks-meson-docs-v1-5-0c7895952cd3@pks.im> References: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> In-Reply-To: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> To: git@vger.kernel.org Cc: 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 3392e1ce7ebc540784912476847380d9c1775ac8..31c17f7d655e1dcbdde315115609b798363e7328 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -367,7 +367,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 dbe36a52eabfabef59e31d3be6518549e4f90206..83ddbb76f65d7a041e4e787a81e19ff1db1d9d55 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 13 08:48: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: 13906681 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (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 88C151AB6D8 for ; Fri, 13 Dec 2024 08:49:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079750; cv=none; b=q6k2Z4+biN5P3RLaO6oZyPo/uo15yhEWEKMyMpNgw0IVnSGC68A5EwusUu5RCnHpYOQ8sTine/NzEwyP1yRmgZn5LhmluegOqHvUeFGdIidCbQFBpPlS14VIR9yNIznpBZvg74EwTen49T4ArtPzj2/BoL0qhy5Te8JNNuWLQ2g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079750; c=relaxed/simple; bh=3NGtl8R6O6gFPXNZtJqlF6s7FBZos9neAs66x4AX4QU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=P0xhfu0fo9CczLC/SGCXNpKU0TXDlIlLco2quP6crhQznHgu5oXsV9DFY07S6fv/CDFOfzWQUONT6swmOV8uLXMMMor6Ti2pB4Lrb1+wJ/Q+aSzhbLQVQKQfAwFoBV8rmdi8PF3OG7LACufu3eWdFj4xRVKV6hdJF7QRN8tt0AI= 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=S6saTI2G; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=rI3V1u7J; arc=none smtp.client-ip=202.12.124.156 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="S6saTI2G"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="rI3V1u7J" Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id BCA6A25401ED for ; Fri, 13 Dec 2024 03:49:07 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Fri, 13 Dec 2024 03:49: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=fm1; t=1734079747; x=1734166147; bh=VHcX43gy6B/92m960XFhf/XTULYWldE1tKBsqsTux6k=; b= S6saTI2GG9iRBJiUcT/Vq363r74nMqgsje8+MU9zStPwq3eQPy2ONfL+tJ9t7ZOn GawoyiXBIyj0cbQDlOV50kEhSzztsbcB2+l482ZLOptLKalqqMfsvvym5knrCB5o P5VQaZ34/g8H3S/E3p5KlUZSCBxMcAYb3F2op8Uy3YReT7rJGssxE6rdkR9purAx MM4Wu7AA4HhJBL8tv3VLyz9TQB8HKy7yBMC//SHm4YFOB0vRJ52m9k9qicOAS22I 1/FXd4JiFAfDXyDGdbvr3Xqxh3JneMMQjMNekH4ja57ENyO9eoGu3/otDpR/TLKN aYB+KYcLHynmiEL8aFpBGA== 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=fm1; t=1734079747; x= 1734166147; bh=VHcX43gy6B/92m960XFhf/XTULYWldE1tKBsqsTux6k=; b=r I3V1u7J8yh3V5rnpHu44nUIcVQw7AsiUVUdA3oTfkLZVkefodJSB3PrBe8/EvdGh 3DVJWuYxxmvFJOxqiUIo5mXjP/GreRSjcWhkOxyhYgtKkWpRV3o1X6FPZHChfnnY XxY6uMluJpLFTrBsXHArz0ZP5MVaCplfmK8aN0giQMw8cpl9ZXPgEDqfnPyfJzyN 2imIJDd8Jq9ydnJbRafeudK5Zya3VPVdVh4o3fQ1i3ZExKFDBv1EbwHhGomgGs61 ITd9MlLB1aIB97t2TRvuFobJZsp2T28N3ak4M6UxTZLp4ATBsjHyun/genHmVCGS f/uISzJgNJu4iUgwpim5w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeeigdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhfffugg gtgffkfhgjvfevofesthejredtredtjeenucfhrhhomheprfgrthhrihgtkhcuufhtvghi nhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvghrnhepffeuieduje dvkeehuedvkeefffeivdeuleetkeduheejteekgedvudfgtdfgieelnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnh gspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepghhithes vhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 13 Dec 2024 03:49:06 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id dc8d1fe8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 13 Dec 2024 08:47:26 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 13 Dec 2024 09:48:35 +0100 Subject: [PATCH 06/10] 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: <20241213-b4-pks-meson-docs-v1-6-0c7895952cd3@pks.im> References: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> In-Reply-To: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> To: git@vger.kernel.org Cc: 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 d36b2b0d8e7795d0520976c1e54a2f90b332cacb..1fdc6a61eb04707d7c4b7aabb412b32ddc517dc7 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -380,3 +380,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 13 08:48: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: 13906684 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (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 C79AD1AC43A for ; Fri, 13 Dec 2024 08:49:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.148 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079750; cv=none; b=B6U8W2tYa9X/m0cCiUG6/omEIhzd8YA32nosDbBw9Yo7eGd3pFOApiKm9dhwcLHXtcrR3+PperB1y+SGRd4iztzOaWGCdb8UBD8GMYxWRMqeacjDRVZIxlaytP+n1MAQ/ukwNjCkqaEONw9iJZfJg1peHv7ZvS9Oa/TTS2+NZgQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079750; c=relaxed/simple; bh=1/KnOb5YzzedQzkWemHvhRjFUFijL1cT4r2FtXBNCOA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MdAAAsZCIetStrEWw4qjaHpxFiRtSDkp6V9bk6QHFk5/IsZxTca+qnL57WQ7ukRSJftLDPZ1C3AyZEs7dahsRv627rkT84JTm42wZPf4rOV/FC3595JAsb/CE1Sk3vivSsAfOmsVryWubbz4070AeS0xVrFfojzSjOh5TeD2qGo= 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=FvIyjw7+; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=OKV1IVWg; arc=none smtp.client-ip=202.12.124.148 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="FvIyjw7+"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="OKV1IVWg" Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 0B3171140203 for ; Fri, 13 Dec 2024 03:49:08 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Fri, 13 Dec 2024 03:49: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=fm1; t=1734079747; x=1734166147; bh=rjKltvnOK71IJhzU4YvGb9kMyVBHEFi/dJ6PKbGj2yg=; b= FvIyjw7+a3vz7TSjBq8xtDhi2upqNuNxkiAEBQt8pdjvwGCLKitJg9+88rTUaIs+ SjWREOJApfoqc9PweUL3b7qtGE3zT/SaDjE+j6kLyF/pVQ3LRla85yQ8a3OlrW+a FdjStW81j8I8ItoWyfVGX/in20JruMpXvBGlgcySLrFY904Rdw6+iXvDMk9RIE7d jeNnGqbokPw+M2CTHrouAf5QnjYDwDF6BbmYUvLv/N6KIGuEhGnXXEFDvxWmpneX VmyKsreUQsxzjUB7C4pliWDz2wujkpZEGtQ7r0sF4x3mvKR+/roSvQJb5xbEfq4U +iHH4lRX9aQ1UPM2RAc9sQ== 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=fm1; t=1734079747; x= 1734166147; bh=rjKltvnOK71IJhzU4YvGb9kMyVBHEFi/dJ6PKbGj2yg=; b=O KV1IVWgMP4yHOYUJwYauSHmjzd6pBvLJLyGx4zim07wS+KGRPcMR25Gz/jfzdL9B aq6Xc4t0NR2buYKX313FdPByTtDiO21SvM8hUJks96iwz7O6nFjOfl78yv4tIlDX LbAbJxbzlw82tk+3/TD/RaP8XosQ1ZL+o3Ne220Y3W6NzlpByboeBnBLwxFTNC9H D5C+4250gx02fT811uXg9YjWC3/CsYn1jaHaiVZeVpCdSB//brLvK7w1Tqw1pAPz 0JjQ1DvnpwSZgaK9Ux55UGc0XAVad6ZTwO7COPk55FCofL0YzofrbmEZF36yCzP4 q7nvTAEoA1XD6uhA6khpA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeeigdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhfffugg gtgffkfhgjvfevofesthejredtredtjeenucfhrhhomheprfgrthhrihgtkhcuufhtvghi nhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvghrnhepffeuieduje dvkeehuedvkeefffeivdeuleetkeduheejteekgedvudfgtdfgieelnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnh gspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepghhithes vhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 13 Dec 2024 03:49:07 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 55aa45d8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 13 Dec 2024 08:47:27 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 13 Dec 2024 09:48:36 +0100 Subject: [PATCH 07/10] 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: <20241213-b4-pks-meson-docs-v1-7-0c7895952cd3@pks.im> References: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> In-Reply-To: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> To: git@vger.kernel.org Cc: 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 31c17f7d655e1dcbdde315115609b798363e7328..44f68e7a53843dc5ea24085d5f48b592d34aec41 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -372,7 +372,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 13 08:48: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: 13906686 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (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 A4EDD1ADFE0 for ; Fri, 13 Dec 2024 08:49:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.148 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079751; cv=none; b=eeE62z1lc+kVBaXeyimJB/xQzTfps8aYoYV3Kwd3zSbB0n0KYGm83FA9RWSUz6IW7581b4xZ6J/VZBIKE0oJV+8JeYPsQvIAC0hsx1bSLWDTWk3/PAU62IkIhcuWNsXgXFj08F9Js0cu1QsV/wGX+1E6jabO+9Tf3L77q/JfQUs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079751; c=relaxed/simple; bh=wp54G6SaFXxkfMFeBttPsCjTKjxmIqisv35avsAv4Xo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QgX3N86jMIBjJBpKjdO0z1QN9Z4FB41t+3RTHO9BbkfIPX3lFcMZg7RH8cHQ7xzqM4JtOMEf4PWtJKT7bZooXiB9KdxfIq65IKS+2d/eDU98v4MABpBXOHhrNbAoXEUC1Lhz/9k1jL7mg9Xq6isXPfxHXdWO5/Z53UaZPBFmaoE= 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=wFxcG+fN; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=P/QdmxYL; arc=none smtp.client-ip=202.12.124.148 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="wFxcG+fN"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="P/QdmxYL" Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id CE8FA1140201 for ; Fri, 13 Dec 2024 03:49:08 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Fri, 13 Dec 2024 03:49: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=fm1; t=1734079748; x=1734166148; bh=Q3OzV71y9vvRYT9EGb6/D14nQ+vKTLUng/VQr70AXzg=; b= wFxcG+fNQ1Ozx/8l8JzmWEdynEcEpfHcguSTZoPrzN97cFxWryk+y6kDRJp6BojS CqxxLptjby/G4bcfO+2ubbHRZpfoLGh9eoKH21+oPCi1ykgjI2R/qY8yMR6tip4w THpWRo5lxhRLK1Iii749JLmzdsyqpbIMOxcWg9GwkRp/ifjpb2300U9dHwm07VoH ReHqTCyPc/5YmJeyRDnA+P2GCJymsuL3YaYj5xlKVQ26N3FbYyLyVr5EWMnmUSrY v26DBS1XnI2RuFDuxbX2TZLfcNFPAR9TYpwDJqjaj/2xm0O20CULjbk4pgUl5Pw5 6m9OiuygA70KM57j54CMxQ== 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=fm1; t=1734079748; x= 1734166148; bh=Q3OzV71y9vvRYT9EGb6/D14nQ+vKTLUng/VQr70AXzg=; b=P /QdmxYL0s4Q9/6ECzULbk51fwArcoVKzI5DRlArePtAUP5Ljf8XJYlMNkgpHx2gf Qx3W1udOyLqsO/9NoPE0Dc/CcxcF23IsVGEOC9n8XgQ2DtxNrLvJ6D594Gj/hjQZ s4mup09LHZyA1yTeNk4Evn//pUVGagnEgwvh+bGxNQwNUCH3oQvEjdaMW85d7oPE /37XHPoazgxAF/57sLTCk99PqsCuWGLHdDWzdNiStEF6AMxEsHG3udfsJmoLqruP E1qNXaPZTLsFA5uD+ENHi2uLBH2EV5dkh8ZowZ98NjSw8ECB2oZR5aLtHymFNEMV ZLfa3cwGEzgeVPDeB9OMg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeeigdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhfffugg gtgffkfhgjvfevofesthejredtredtjeenucfhrhhomheprfgrthhrihgtkhcuufhtvghi nhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvghrnhepffeuieduje dvkeehuedvkeefffeivdeuleetkeduheejteekgedvudfgtdfgieelnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnh gspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepghhithes vhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 13 Dec 2024 03:49:07 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 5813eb25 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 13 Dec 2024 08:47:28 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 13 Dec 2024 09:48:37 +0100 Subject: [PATCH 08/10] 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: <20241213-b4-pks-meson-docs-v1-8-0c7895952cd3@pks.im> References: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> In-Reply-To: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> To: git@vger.kernel.org Cc: 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 44f68e7a53843dc5ea24085d5f48b592d34aec41..388b5ffef99f696948042ad2bed87d573fbd4e95 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -416,8 +416,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 13 08:48: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: 13906685 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (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 A368C1AD418 for ; Fri, 13 Dec 2024 08:49:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.148 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079751; cv=none; b=EHihAoRKlhAMJaUtQh2CF8SqXbKprWTR7WvorbBtJ5uffSpGN5y0KdI7ytbff7IeaoGVWPUQ7w2sMAzoZ9pejTAgoUetTBS74/2H0/ZRQDO/mp/3yxVNWcpFpSrb2B7Iq2RYMm0jHF0kWPWyykzPEdkxJJh9AilMqWkjSi2mB3U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079751; c=relaxed/simple; bh=kljqeo9XEakZTcKHOKRWAGP6o9UvT/+aaWeLYq3PT6A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=c+NR5bKmW5gEvZO1sZ7EIG72pXPV5Jg0Bo0RtCzlcVkQwYEFDtQqx75B38NZBduKbth1ZbU708DhMNX/fSz70dko0MNRuGW6qhapr7rE3am5Zvz0LiVRonf+WsofeT1Ff15QzNDuJ7V+9HNZ9zp4sD7W/o0QF6/k8CcCWMQ2gPs= 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=GTD2Jtr9; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=hyI8LbGy; arc=none smtp.client-ip=202.12.124.148 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="GTD2Jtr9"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="hyI8LbGy" Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfout.stl.internal (Postfix) with ESMTP id E355A1140204 for ; Fri, 13 Dec 2024 03:49:08 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-09.internal (MEProxy); Fri, 13 Dec 2024 03:49: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=fm1; t=1734079748; x=1734166148; bh=C+MFSgyYVTzqW9X2yjt3mi3mjP07aeMuxcok1Qur+HY=; b= GTD2Jtr9ueCpFmk9g58FB0NCwBsV9BfgO8jIRNcVcPiNqkTZISHexAzD2ZbPLEtq v+GCMikRA6GU2djoVIX3/rOT2iwd1n9IivWBe2FYT3McbTpfqwp+CideJQl7Aay2 YZ1YWNf7EZb8fCTCh1kojCrWyDCMocEiUTOhS+AQuMZUF27cg5adWzM9vv1JuQww 0aaYbNaxGazRP40lngB/DFawLm2bSGOM1+d/rqX62uShPtsbnQYPMXIs3UtpUrGo UPItqLhi6cN+hTaR/WoZdl6Yo5IBZxClgd2v/tBtoHlieJUulZytdwZ5CiqLTETp qSE8RXOybBOBzgRTdxeedg== 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=fm1; t=1734079748; x= 1734166148; bh=C+MFSgyYVTzqW9X2yjt3mi3mjP07aeMuxcok1Qur+HY=; b=h yI8LbGy1ebijq+2DDbx/QZmttpypo8iypR39/e9qD8jzs2mTkSUeMQAKfFzl/21Q +5lVtdbcrmu/c4AWQ1F7hxANdqoiF0mhlcSbuvUlnxf3b1xjaFWUEejdeUhREvoR jYWi3puVyhsIaqFAwKZ3UyQ6hNN1D8oe+drIoUTfHhiL7mibtO4uA4ErIwcQYnOZ 8Orhpia586eliAiU6Zk68vEhcH3vp7JCMnrD3Qfvdik5wopNAdoyTsPsDB3vfahV DkMoJwINGWmE6BvLdY6ysZFSSRvnZen1xEyLwRHbyZ8KR3D2QPxbUvCa5MHOK0cm nlzof7VkuHY78ocuX/h5Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeeigdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhfffugg gtgffkfhgjvfevofesthejredtredtjeenucfhrhhomheprfgrthhrihgtkhcuufhtvghi nhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvghrnhepffeuieduje dvkeehuedvkeefffeivdeuleetkeduheejteekgedvudfgtdfgieelnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnh gspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepghhithes vhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 13 Dec 2024 03:49:08 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id c89256ac (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 13 Dec 2024 08:47:29 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 13 Dec 2024 09:48:38 +0100 Subject: [PATCH 09/10] meson: generate articles Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241213-b4-pks-meson-docs-v1-9-0c7895952cd3@pks.im> References: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> In-Reply-To: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> To: git@vger.kernel.org Cc: 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 1fdc6a61eb04707d7c4b7aabb412b32ddc517dc7..1dd84af2d6bcf3214cfa1ec78c00359f64040fca 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -411,4 +411,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 13 08:48: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: 13906687 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (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 13F8C1ADFFE for ; Fri, 13 Dec 2024 08:49:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.148 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079751; cv=none; b=gXWQi9hcVbBqE7qO3p/e8WpTPPQ9xg1uTWsFXyMgdNnjHTAwkPsjKDk4FiDohcY/3PmF2O3xUzf/xxU5o/ZmregGWGDQkzz5w+kNxDAUL0i/b5ta6yfIbdoSuelRBV1/grFp9/jHIFbKafk6MmsVKVRlnSh+d7bQieYtnBYec6M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734079751; c=relaxed/simple; bh=jj76hJcYN2Q0VZSYaalBq9S8XZGjzwPt4WMXSEwjDZY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DWTo2cxgNXoWJVpq3FOx4pdxdKguiUSGt3ZWUHk8he8N4KGcgOOe/xsoY9SwpNk3woA0iqrqodwB+wuXGdtp7BGmHN9U+QemtV5osRhzuC9KTTEcTFl+0lIktVfvBRac+s/IaPxqaTxwmTyzKC/Uy8MAk7iIG1KYxGK5NE6UvR8= 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=KnY5WifX; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Lqs6JqVL; arc=none smtp.client-ip=202.12.124.148 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="KnY5WifX"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Lqs6JqVL" Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.stl.internal (Postfix) with ESMTP id 26DD31140202 for ; Fri, 13 Dec 2024 03:49:09 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Fri, 13 Dec 2024 03:49: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=fm1; t=1734079749; x=1734166149; bh=zWz19JP8BJXOLM2QYKE1v5mQ++dbiu6ZlJ7gTrPUmRk=; b= KnY5WifXRb7vP11JdgoJiSA8pCtAfqNxwW/1rJXqKbCwnKVMMHjWdYRyO0qYyeOV 94AXz8wyXZggV8ArfkqJghUJ1d0aDakEc/VlLEyuhRAfJfv+QP0ChXoNYOdOlEM1 3R0n42V5He4XhikObvjHLHRWU9VbRtvydWi0uYDf8mPD01977KMXHK3GOG02AyMq rUgFFdKgYNR/re+dspeEkjo1347UXvnSA4bVbDuA2RONMdDTxkEe52DouPb+iQch UthN4yPemEXZrFrncPHwpapm2CjUnSdLBWaGcF0XIzPDrVZeeYAxSC3OVrT0xUiY AQo8116zuhagoOYxY66u0A== 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=fm1; t=1734079749; x= 1734166149; bh=zWz19JP8BJXOLM2QYKE1v5mQ++dbiu6ZlJ7gTrPUmRk=; b=L qs6JqVLPPkMPEng5k4kLDfPkniOwr0+SXMtQizCszb9Q2XIdQc1fGpnlwtVk4AB3 MeKMXLKfGFD6L2ox9v8UXdyP86TpgGb0p2NU1UdCmnV4YsSIBLRMnBo4BAbOI5Gz PbL8pi6HLCkEiQdfprcFUxEicN55zh7UVfU1a4sV5a54IlNt0IRl7jodFKcDC4QW nN7HfJWrO5Kpz9BEdWM7WsdLFNZrS6DqWejJtHENkpztit8IlAM9iQCz6ce3cfnw NQjcYRVdH3eH2jTaXq7ae/nBbdXkvqyAJwHEMly9ambXwVRYpRY8koUi78pBpYcb ggn+r9ElTAxws40ae5bbA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkeeigdduvdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhfffugg gtgffkfhgjvfevofesthejredtredtjeenucfhrhhomheprfgrthhrihgtkhcuufhtvghi nhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvghrnhepffeuieduje dvkeehuedvkeefffeivdeuleetkeduheejteekgedvudfgtdfgieelnecuvehluhhsthgv rhfuihiivgepvdenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnh gspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepghhithes vhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 13 Dec 2024 03:49:08 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 3b27359f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 13 Dec 2024 08:47:29 +0000 (UTC) From: Patrick Steinhardt Date: Fri, 13 Dec 2024 09:48:39 +0100 Subject: [PATCH 10/10] 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: <20241213-b4-pks-meson-docs-v1-10-0c7895952cd3@pks.im> References: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> In-Reply-To: <20241213-b4-pks-meson-docs-v1-0-0c7895952cd3@pks.im> To: git@vger.kernel.org Cc: 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 1dd84af2d6bcf3214cfa1ec78c00359f64040fca..751d32c4847289da5dbbe63efbce309d36719f4f 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -382,6 +382,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(