build: recognise manpages keyword
authorAndrew Tridgell <tridge@samba.org>
Mon, 22 Feb 2010 22:04:44 +0000 (09:04 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:35 +0000 (20:26 +1000)
buildtools/mktowscript/mktowscript.pl
buildtools/mktowscript/rebuild_all.sh
lib/replace/wafsamba.py

index 2ebf2d92c2a1c9d1fa48b88a184f6ca70438e35b..86ff65bd2e90fc85a5c3ef7006c376b7e5e7ab12 100755 (executable)
@@ -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;
index d13eb93a4b87d92886a5f814326d535cdfeafdae..5209eee50bdf4921c72e1a860193147068476d6f 100755 (executable)
@@ -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
index 0077c7a2948640839c48cf158f1821f5a509cc78..34a3a93846b475b432f6a24e4e0df3a7d5e785ba 100644 (file)
@@ -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 = ''