summaryrefslogtreecommitdiff
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
parent73634d6ff337f3a23bb950a430569f5b3946ed9a (diff)
downloadsamba-5393e6c9d24cd66aab57274665be1774beb4e732.tar.gz
samba-5393e6c9d24cd66aab57274665be1774beb4e732.tar.bz2
samba-5393e6c9d24cd66aab57274665be1774beb4e732.zip
build: recognise manpages keyword
-rwxr-xr-xbuildtools/mktowscript/mktowscript.pl13
-rwxr-xr-xbuildtools/mktowscript/rebuild_all.sh2
-rw-r--r--lib/replace/wafsamba.py3
3 files changed, 15 insertions, 3 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
diff --git a/lib/replace/wafsamba.py b/lib/replace/wafsamba.py
index 0077c7a294..34a3a93846 100644
--- a/lib/replace/wafsamba.py
+++ b/lib/replace/wafsamba.py
@@ -198,7 +198,8 @@ def SAMBA_BINARY(bld, binname, source_list,
installdir=None,
ldflags=None,
cflags=None,
- autoproto=None):
+ autoproto=None,
+ manpages=None):
ilist = '. ' + os.environ.get('PWD') + '/bin/default ' + bld.SAMBA_LIBRARY_INCLUDE_LIST(deps) + ' ' + include_list
ilist = bld.NORMPATH(ilist)
ccflags = ''