From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Todd Zullinger <tmz@pobox.com>, Patrick Steinhardt <ps@pks.im>,
"brian m. carlson" <sandals@crustytoothpaste.net>
Subject: [PATCH v2 4/3] doc: fix build-docdep.perl
Date: Sat, 01 Mar 2025 10:25:10 -0800 [thread overview]
Message-ID: <xmqqcyf0zjzt.fsf_-_@gitster.g> (raw)
In-Reply-To: <xmqqh64czk7o.fsf@gitster.g> (Junio C. Hamano's message of "Sat, 01 Mar 2025 10:20:27 -0800")
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";
}
}
next prev parent reply other threads:[~2025-03-01 18:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 3:47 [PATCH 0/3] doc: txt -> adoc fixes Todd Zullinger
2025-02-28 3:47 ` [PATCH 1/3] doc: update howto-index.sh for .adoc extensions Todd Zullinger
2025-02-28 13:55 ` Junio C Hamano
2025-02-28 3:47 ` [PATCH 2/3] contrib/contacts: rename .txt to .adoc Todd Zullinger
2025-02-28 8:13 ` Patrick Steinhardt
2025-02-28 13:57 ` Todd Zullinger
2025-02-28 18:47 ` Junio C Hamano
2025-03-01 15:34 ` Todd Zullinger
2025-02-28 3:47 ` [PATCH 3/3] contrib/subtree: " Todd Zullinger
2025-02-28 8:13 ` Patrick Steinhardt
2025-02-28 13:50 ` Todd Zullinger
2025-02-28 14:09 ` Patrick Steinhardt
2025-02-28 18:34 ` Junio C Hamano
2025-02-28 13:45 ` [PATCH 0/3] doc: txt -> adoc fixes Junio C Hamano
2025-03-01 15:36 ` [PATCH v2 " Todd Zullinger
2025-03-01 15:36 ` [PATCH v2 1/3] doc: update howto-index.sh for .adoc extensions Todd Zullinger
2025-03-01 15:36 ` [PATCH v2 2/3] contrib/contacts: rename .txt to .adoc Todd Zullinger
2025-03-01 15:36 ` [PATCH v2 3/3] contrib/subtree: " Todd Zullinger
2025-03-01 18:02 ` [PATCH v2 0/3] doc: txt -> adoc fixes Junio C Hamano
2025-03-01 18:20 ` Junio C Hamano
2025-03-01 18:25 ` Junio C Hamano [this message]
2025-03-01 19:41 ` [PATCH v2 4/3] doc: fix build-docdep.perl Todd Zullinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqcyf0zjzt.fsf_-_@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
--cc=sandals@crustytoothpaste.net \
--cc=tmz@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.