summaryrefslogtreecommitdiff
path: root/buildtools/mktowscript
diff options
context:
space:
mode:
Diffstat (limited to 'buildtools/mktowscript')
-rwxr-xr-xbuildtools/mktowscript/mktowscript.pl13
-rwxr-xr-xbuildtools/mktowscript/rebuild_all.sh2
2 files changed, 13 insertions, 2 deletions
diff --git a/buildtools/mktowscript/mktowscript.pl b/buildtools/mktowscript/mktowscript.pl
index 2ebf2d92c2..86ff65bd2e 100755
--- a/buildtools/mktowscript/mktowscript.pl
+++ b/buildtools/mktowscript/mktowscript.pl
@@ -70,6 +70,13 @@ sub find_files($)
my $list = shift;
my $ret = '';
foreach my $f (split(/\s+/, $list)) {
+ if ($f =~ /\.[0-9]$/) {
+ # a man page
+ my $m = find_file($f . ".xml");
+ die("Unable to find man page $f\n") if ($m eq "");
+ $m =~ s/\.xml$//;
+ return $m;
+ }
$f = find_file($f);
$f =~ s/^[.]\///;
$ret .= ' ' . $f;
@@ -204,7 +211,6 @@ foreach my $s (sort {$result->{$a}->{SECNUMBER} <=> $result->{$b}->{SECNUMBER}}
$k eq "GCOV" ||
$k eq "PC_FILES" ||
$k eq "PUBLIC_HEADERS" ||
- $k eq "MANPAGES" ||
$k eq "CONFIG4FILE" ||
$k eq "LMHOSTSFILE4") {
$trailer .= sprintf(",\n\t# %s='%s'", $k, trim($sec->{$k}));
@@ -267,6 +273,11 @@ foreach my $s (sort {$result->{$a}->{SECNUMBER} <=> $result->{$b}->{SECNUMBER}}
$trailer .= sprintf(",\n\tautoproto='%s'", $list);
next;
}
+ if ($k eq "MANPAGES") {
+ my $list = trim(find_files(strlist($sec->{$k})));
+ $trailer .= sprintf(",\n\tmanpages='%s'", $list);
+ next;
+ }
if ($k eq "$s" . "_OBJ_FILES") {
my $list = trim(strlist($sec->{$k}));
$list =~ s/\.o/.c/g;
diff --git a/buildtools/mktowscript/rebuild_all.sh b/buildtools/mktowscript/rebuild_all.sh
index d13eb93a4b..5209eee50b 100755
--- a/buildtools/mktowscript/rebuild_all.sh
+++ b/buildtools/mktowscript/rebuild_all.sh
@@ -20,7 +20,7 @@ while read f; do
rm -f wscript_build.$$
exit 1
}
- if cmp wscript_build.$$ $ws 2> /dev/null; then
+ if cmp wscript_build.$$ $ws > /dev/null 2>&1; then
rm -f wscript_build.$$
else
mv wscript_build.$$ $ws || exit 1