summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-23 09:04:44 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:26:35 +1000
commit5393e6c9d24cd66aab57274665be1774beb4e732 (patch)
tree126dc0d181710b5df7c5220094d95c74968252de /buildtools
parent73634d6ff337f3a23bb950a430569f5b3946ed9a (diff)
downloadsamba-5393e6c9d24cd66aab57274665be1774beb4e732.tar.gz
samba-5393e6c9d24cd66aab57274665be1774beb4e732.tar.bz2
samba-5393e6c9d24cd66aab57274665be1774beb4e732.zip
build: recognise manpages keyword
Diffstat (limited to 'buildtools')
-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