summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-02 20:18:57 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:23 +1000
commit3385b1e2e9f81bde322a83317ecb394b1f676724 (patch)
tree0e179cac4798a28a48bcb593ddda0b9a09068a67
parent0c294655f61048581e72e0c089d2aada247be40d (diff)
downloadsamba-3385b1e2e9f81bde322a83317ecb394b1f676724.tar.gz
samba-3385b1e2e9f81bde322a83317ecb394b1f676724.tar.bz2
samba-3385b1e2e9f81bde322a83317ecb394b1f676724.zip
pidl-waf: build pidl man pages and parsers separately
this should prevent gratuitious builds
-rw-r--r--pidl/wscript23
1 files changed, 14 insertions, 9 deletions
diff --git a/pidl/wscript b/pidl/wscript
index 41d5b7431b..4db7ca54d9 100644
--- a/pidl/wscript
+++ b/pidl/wscript
@@ -11,7 +11,7 @@ def configure(conf):
if conf.CHECK_PERL_MANPAGE():
conf.env.PERLMAN1EXT = conf.CHECK_PERL_MANPAGE(section='1')
conf.env.PERLMAN3EXT = conf.CHECK_PERL_MANPAGE(section='3')
- #conf.DEFINE('HAVE_PERL_MAKEMAKER', 1)
+ conf.DEFINE('HAVE_PERL_MAKEMAKER', 1)
# yapp is used for building the parser
conf.find_program('yapp', var='YAPP')
@@ -39,17 +39,22 @@ def build(bld):
# use perl to build the manpages
bld.env.pidl_srcdir = os.path.join(bld.srcnode.abspath(), 'pidl')
- # we want to prefer the git version if we can. Only if the
- # source has changed do we want to re-run yapp
- if ('YAPP' in bld.env and (
- bld.IS_NEWER('idl.yp', 'lib/Parse/Pidl/IDL.pm') or
- bld.IS_NEWER('expr.yp', 'lib/Parse/Pidl/Expr.pm'))):
- pidl_src.extend(['idl.yp', 'expr.yp'])
-
bld.SAMBA_GENERATOR('pidl_manpages',
source=pidl_src,
target=pidl_manpages,
- rule='cd ${pidl_srcdir} && ${PERL} Makefile.PL && make && rm -f Makefile Makefile.old')
+ rule='cd ${pidl_srcdir} && ${PERL} Makefile.PL && make manifypods && rm -f Makefile Makefile.old')
+
+ # 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
+ need_yapp_build = ('YAPP' in bld.env and (
+ bld.IS_NEWER('idl.yp', 'lib/Parse/Pidl/IDL.pm') or
+ 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')
for m in pidl_manpages:
dname=os.path.dirname(m)[5:]