summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-03-29 21:28:49 +1100
committerAndrew Tridgell <tridge@samba.org>2010-04-06 20:27:16 +1000
commit989eb9dbdc43387502a0e0f4fc8f6e0f157eeb3c (patch)
tree9518bd686382848b7a765a4ab5c61a75d1643266 /pidl
parent8692ad4950dd946bc9bb095848b6bdf5cf530ef7 (diff)
downloadsamba-989eb9dbdc43387502a0e0f4fc8f6e0f157eeb3c.tar.gz
samba-989eb9dbdc43387502a0e0f4fc8f6e0f157eeb3c.tar.bz2
samba-989eb9dbdc43387502a0e0f4fc8f6e0f157eeb3c.zip
s4-waf: added rules for rebuilding the yapp parser in pidl
Diffstat (limited to 'pidl')
-rw-r--r--pidl/wscript11
1 files changed, 11 insertions, 0 deletions
diff --git a/pidl/wscript b/pidl/wscript
index 733a455059..4d7e468a97 100644
--- a/pidl/wscript
+++ b/pidl/wscript
@@ -13,6 +13,10 @@ def configure(conf):
conf.env.PERLMAN3EXT = conf.CHECK_PERL_MANPAGE(section='3')
conf.DEFINE('HAVE_PERL_MAKEMAKER', 1)
+ # yapp is used for building the parser
+ conf.find_program('yapp', var='YAPP')
+
+
def build(bld):
bld.INSTALL_FILES('${BINDIR}', 'pidl', chmod=0755)
@@ -35,6 +39,13 @@ 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,