blob: 6b5a09b66c776cc32582a694f04b8b10b9b75e31 [file] [log] [blame]
From b39bb84dfb5f16c8b2977105bd5876b7b8d58a11 Mon Sep 17 00:00:00 2001
From: Vincent Untz <vuntz@gnome.org>
Date: Tue, 22 Dec 2009 11:54:31 +0000
Subject: fixxref: make it work again without --module argument, Fixes #605211
This restores a compatible behavior with previous versions of gtk-doc,
which is required by many tarballs.
---
diff --git a/gtkdoc-fixxref.in b/gtkdoc-fixxref.in
index 8f166ef..5a703ad 100755
--- a/gtkdoc-fixxref.in
+++ b/gtkdoc-fixxref.in
@@ -168,36 +168,38 @@ foreach my $dir (@EXTRA_DIRS) {
}
}
-open (INPUT, "$MODULE-sections.txt")
- || die "Can't open $MODULE-sections.txt: $!";
-my $subsection = "";
-while (<INPUT>) {
- if (m/^#/) {
- next;
-
- } elsif (m/^<SECTION>/) {
- $subsection = "";
- } elsif (m/^<SUBSECTION\s*(.*)>/i) {
- $subsection = $1;
- } elsif (m/^<SUBSECTION>/) {
- next;
- } elsif (m/^<TITLE>(.*)<\/TITLE>/) {
- next;
- } elsif (m/^<FILE>(.*)<\/FILE>/) {
- next;
- } elsif (m/^<INCLUDE>(.*)<\/INCLUDE>/) {
- next;
- } elsif (m/^<\/SECTION>/) {
- next;
- } elsif (m/^(\S+)/) {
- my $symbol=CreateValidSGMLID($1);
-
- if ($subsection eq "Standard" || $subsection eq "Private") {
- $NoLinks{$symbol} = 1;
+if (defined($MODULE)) {
+ open (INPUT, "$MODULE-sections.txt")
+ || die "Can't open $MODULE-sections.txt: $!";
+ my $subsection = "";
+ while (<INPUT>) {
+ if (m/^#/) {
+ next;
+
+ } elsif (m/^<SECTION>/) {
+ $subsection = "";
+ } elsif (m/^<SUBSECTION\s*(.*)>/i) {
+ $subsection = $1;
+ } elsif (m/^<SUBSECTION>/) {
+ next;
+ } elsif (m/^<TITLE>(.*)<\/TITLE>/) {
+ next;
+ } elsif (m/^<FILE>(.*)<\/FILE>/) {
+ next;
+ } elsif (m/^<INCLUDE>(.*)<\/INCLUDE>/) {
+ next;
+ } elsif (m/^<\/SECTION>/) {
+ next;
+ } elsif (m/^(\S+)/) {
+ my $symbol=CreateValidSGMLID($1);
+
+ if ($subsection eq "Standard" || $subsection eq "Private") {
+ $NoLinks{$symbol} = 1;
+ }
}
}
+ close (INPUT);
}
-close (INPUT);
&FixCrossReferences ($MODULE_DIR);
--
cgit v0.8.3.1