summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pidl/blib/man1/.dummy0
-rw-r--r--pidl/blib/man3/.dummy0
-rw-r--r--pidl/wscript37
3 files changed, 20 insertions, 17 deletions
diff --git a/pidl/blib/man1/.dummy b/pidl/blib/man1/.dummy
deleted file mode 100644
index e69de29bb2..0000000000
--- a/pidl/blib/man1/.dummy
+++ /dev/null
diff --git a/pidl/blib/man3/.dummy b/pidl/blib/man3/.dummy
deleted file mode 100644
index e69de29bb2..0000000000
--- a/pidl/blib/man3/.dummy
+++ /dev/null
diff --git a/pidl/wscript b/pidl/wscript
index 3137ad090e..0c3c4150b0 100644
--- a/pidl/wscript
+++ b/pidl/wscript
@@ -27,25 +27,32 @@ def build(bld):
pidl_src = ['pidl']
pidl_src.extend(bld.path.ant_glob('lib/**/*.pm').split())
- pidl_manpages = '''blib/man1/pidl.${PERLMAN1EXT} blib/man3/Parse::Pidl::NDR.${PERLMAN3EXT}
- blib/man3/Parse::Pidl::Wireshark::Conformance.${PERLMAN3EXT}
- blib/man3/Parse::Pidl::Dump.${PERLMAN3EXT}
- blib/man3/Parse::Pidl::Util.${PERLMAN3EXT}
- blib/man3/Parse::Pidl::Wireshark::NDR.${PERLMAN3EXT}'''.split()
-
- pidl_manpages = bld.EXPAND_VARIABLES(pidl_manpages)
+ pidl_manpages = {
+ 'pidl': 'man1/pidl.${PERLMAN1EXT}',
+ 'lib/Parse/Pidl/NDR.pm': 'man3/Parse::Pidl::NDR.${PERLMAN3EXT}',
+ 'lib/Parse/Pidl/Wireshark/Conformance.pm': 'man3/Parse::Pidl::Wireshark::Conformance.${PERLMAN3EXT}',
+ 'lib/Parse/Pidl/Dump.pm': 'man3/Parse::Pidl::Dump.${PERLMAN3EXT}',
+ 'lib/Parse/Pidl/Util.pm': 'man3/Parse::Pidl::Util.${PERLMAN3EXT}',
+ 'lib/Parse/Pidl/Wireshark/NDR.pm': 'man3/Parse::Pidl::Wireshark::NDR.${PERLMAN3EXT}'
+ }
+
+ for k, v in pidl_manpages.iteritems():
+ pidl_manpages[k] = bld.EXPAND_VARIABLES(v)
# use perl to build the manpages
bld.env.pidl_srcdir = os.path.join(bld.srcnode.abspath(), 'pidl')
blib_bld = os.path.join(bld.srcnode.abspath(bld.env), 'pidl/blib')
- link_command = 'rm -rf blib && ln -s %s' % blib_bld
-
- t = bld.SAMBA_GENERATOR('pidl_manpages',
- source=pidl_src, target=pidl_manpages,
- rule='cd ${pidl_srcdir} && ${LINK_COMMAND} && ${PERL} Makefile.PL && make manifypods && rm -f Makefile Makefile.old && rm -f blib')
- t.env.LINK_COMMAND = link_command
+ link_command = 'rm -rf blib && ln -fs blib %s' % blib_bld
+
+ bld.SET_BUILD_GROUP('main')
+ for src, manpage in pidl_manpages.iteritems():
+ bld(rule='pod2man -c "Samba Documentation" ${SRC} ${TGT}',
+ shell=True,
+ source=src,
+ install_path=os.path.dirname(bld.EXPAND_VARIABLES('${MANDIR}/'+manpage)),
+ target=os.path.basename(manpage))
# we want to prefer the git version of the parsers if we can. Only if the
# source has changed do we want to re-run yapp
@@ -59,7 +66,3 @@ def build(bld):
target='lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm Makefile.PL',
rule='cd ${pidl_srcdir} && ${LINK_COMMAND} && ${PERL} Makefile.PL && make lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm && rm -f Makefile Makefile.old && rm -f blib')
t.env.LINK_COMMAND = link_command
-
- for m in pidl_manpages:
- dname = os.path.dirname(m)[5:]
- bld.INSTALL_FILES('${MANDIR}/'+dname, m, flat=True)