summaryrefslogtreecommitdiff
path: root/pidl/wscript
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-06-16 18:25:04 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-06-16 18:25:04 +0200
commit65ca3e4ee985689cdb038ae366f57d523cbeb964 (patch)
tree61b52a0c0c238f62b928949b15ba4ff453be12ee /pidl/wscript
parentbd8fcd869da5a99d9505ede6f5038f98b7951bb3 (diff)
downloadsamba-65ca3e4ee985689cdb038ae366f57d523cbeb964.tar.gz
samba-65ca3e4ee985689cdb038ae366f57d523cbeb964.tar.bz2
samba-65ca3e4ee985689cdb038ae366f57d523cbeb964.zip
pidl-waf: Avoid relying on MakeMaker when installing pidl manpages.
Diffstat (limited to 'pidl/wscript')
-rw-r--r--pidl/wscript37
1 files changed, 20 insertions, 17 deletions
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)