git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 4/3] doc: fix build-docdep.perl

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 1, 2025, 18:25 UTC
Message-ID
<xmqqcyf0zjzt.fsf_-_@gitster.g>
In-Reply-To
<xmqqh64czk7o.fsf@gitster.g>

We renamed from .txt to .adoc all the asciidoc source files and necessary includes. We also need to adjust the build-docdep tool to work on files whose suffix is .adoc when computing the documentation dependencies.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/build-docdep.perl | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
diff --git c/Documentation/build-docdep.perl w/Documentation/build-docdep.perl
index 315efaa2fa..781da12b2e 100755
--- c/Documentation/build-docdep.perl
+++ w/Documentation/build-docdep.perl
@@ -4,15 +4,15 @@
 my %include = ();
 my %included = ();
 
-for my $text (<*.txt>) {
-    open I, '<', $text || die "cannot read: $text";
+for my $adoc (<*.adoc>) {
+    open I, '<', $adoc || die "cannot read: $adoc";
     while (<I>) {
 	if (/^include::/) {
 	    chomp;
 	    s/^include::\s*//;
 	    s/\[\]//;
 	    s/{build_dir}/${build_dir}/;
-	    $include{$text}{$_} = 1;
+	    $include{$adoc}{$_} = 1;
 	    $included{$_} = 1;
 	}
     }
@@ -23,14 +23,14 @@
 my $changed = 1;
 while ($changed) {
     $changed = 0;
-    while (my ($text, $included) = each %include) {
+    while (my ($adoc, $included) = each %include) {
 	for my $i (keys %$included) {
-	    # $text has include::$i; if $i includes $j
-	    # $text indirectly includes $j.
+	    # $adoc has include::$i; if $i includes $j
+	    # $adoc indirectly includes $j.
 	    if (exists $include{$i}) {
 		for my $j (keys %{$include{$i}}) {
-		    if (!exists $include{$text}{$j}) {
-			$include{$text}{$j} = 1;
+		    if (!exists $include{$adoc}{$j}) {
+			$include{$adoc}{$j} = 1;
 			$included{$j} = 1;
 			$changed = 1;
 		    }
@@ -40,10 +40,10 @@
     }
 }
 
-foreach my $text (sort keys %include) {
-    my $included = $include{$text};
-    if (! exists $included{$text} &&
-	(my $base = $text) =~ s/\.txt$//) {
+foreach my $adoc (sort keys %include) {
+    my $included = $include{$adoc};
+    if (! exists $included{$adoc} &&
+	(my $base = $adoc) =~ s/\.adoc$//) {
 	print "$base.html $base.xml : ", join(" ", sort keys %$included), "\n";
     }
 }
Previous: Junio C HamanoNext: Todd Zullinger
Message 21 of 22 in “doc: txt -> adoc fixes”
  1. 0/3 doc: txt -> adoc fixesTodd Zullinger, Feb 28, 2025
  2. 1/3 doc: update howto-index.sh for .adoc extensionsTodd Zullinger, Feb 28, 2025
  3. Junio C HamanoFeb 28, 2025
  4. 2/3 contrib/contacts: rename .txt to .adocTodd Zullinger, Feb 28, 2025
  5. Patrick SteinhardtFeb 28, 2025
  6. Todd ZullingerFeb 28, 2025
  7. Junio C HamanoFeb 28, 2025
  8. Todd ZullingerMar 1, 2025
  9. 3/3 contrib/subtree: rename .txt to .adocTodd Zullinger, Feb 28, 2025
  10. Patrick SteinhardtFeb 28, 2025
  11. Todd ZullingerFeb 28, 2025
  12. Patrick SteinhardtFeb 28, 2025
  13. Junio C HamanoFeb 28, 2025
  14. Junio C HamanoFeb 28, 2025
  15. 0/3 doc: txt -> adoc fixesTodd Zullinger, Mar 1, 2025
  16. 1/3 doc: update howto-index.sh for .adoc extensionsTodd Zullinger, Mar 1, 2025
  17. 2/3 contrib/contacts: rename .txt to .adocTodd Zullinger, Mar 1, 2025
  18. 3/3 contrib/subtree: rename .txt to .adocTodd Zullinger, Mar 1, 2025
  19. Junio C HamanoMar 1, 2025
  20. Junio C HamanoMar 1, 2025
  21. 4/3 doc: fix build-docdep.perlJunio C Hamano, Mar 1, 2025
  22. Todd ZullingerMar 1, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.