summaryrefslogtreecommitdiff
path: root/pidl/wscript
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-02 20:55:37 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:23 +1000
commita799f5995ec0c216eb85d578db4dacdf2cb9eefe (patch)
treef969a014b63b329ed6d09731afdf829d7f58a1fd /pidl/wscript
parent3385b1e2e9f81bde322a83317ecb394b1f676724 (diff)
downloadsamba-a799f5995ec0c216eb85d578db4dacdf2cb9eefe.tar.gz
samba-a799f5995ec0c216eb85d578db4dacdf2cb9eefe.tar.bz2
samba-a799f5995ec0c216eb85d578db4dacdf2cb9eefe.zip
pidl-waf: better handling of the man page generation
we now avoid leaving build files in the source tree
Diffstat (limited to 'pidl/wscript')
-rw-r--r--pidl/wscript22
1 files changed, 14 insertions, 8 deletions
diff --git a/pidl/wscript b/pidl/wscript
index 4db7ca54d9..2a0a434964 100644
--- a/pidl/wscript
+++ b/pidl/wscript
@@ -39,10 +39,15 @@ def build(bld):
# use perl to build the manpages
bld.env.pidl_srcdir = os.path.join(bld.srcnode.abspath(), 'pidl')
- bld.SAMBA_GENERATOR('pidl_manpages',
- source=pidl_src,
- target=pidl_manpages,
- rule='cd ${pidl_srcdir} && ${PERL} Makefile.PL && make manifypods && rm -f Makefile Makefile.old')
+ 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
# 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
@@ -51,10 +56,11 @@ def build(bld):
bld.IS_NEWER('expr.yp', 'lib/Parse/Pidl/Expr.pm')))
if need_yapp_build:
- bld.SAMBA_GENERATOR('pidl_parser',
- source='idl.yp expr.yp',
- target='lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm Makefile.PL',
- rule='cd ${pidl_srcdir} && ${PERL} Makefile.PL && make lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm && rm -f Makefile Makefile.old')
+ t = bld.SAMBA_GENERATOR('pidl_parser',
+ source='idl.yp expr.yp',
+ 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:]