summaryrefslogtreecommitdiff
path: root/pidl/wscript
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-01-05 12:00:01 +0100
committerStefan Metzmacher <metze@samba.org>2011-01-05 12:30:24 +0100
commit5d8f916619b5324e33d4a1bc3c97d6cc784f4bb9 (patch)
treeea9ab69d0f754bde23f7320c432b5f7068871a70 /pidl/wscript
parente0a9b58de8bd86122d17c0330cb1f0330207c023 (diff)
downloadsamba-5d8f916619b5324e33d4a1bc3c97d6cc784f4bb9.tar.gz
samba-5d8f916619b5324e33d4a1bc3c97d6cc784f4bb9.tar.bz2
samba-5d8f916619b5324e33d4a1bc3c97d6cc784f4bb9.zip
pidl/wscript: let the developer use the standalone build with yapp
Waf isn't happy when files in the source directory are changed. metze
Diffstat (limited to 'pidl/wscript')
-rw-r--r--pidl/wscript32
1 files changed, 22 insertions, 10 deletions
diff --git a/pidl/wscript b/pidl/wscript
index 8cb0c6f5b3..150ef41a63 100644
--- a/pidl/wscript
+++ b/pidl/wscript
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-import os
+import os, sys, Logs
from samba_utils import MODE_755
def set_options(opt):
@@ -46,8 +46,6 @@ def build(bld):
blib_bld = os.path.join(bld.srcnode.abspath(bld.env), 'pidl/blib')
- link_command = 'rm -rf blib && ln -fs blib %s' % blib_bld
-
bld.SET_BUILD_GROUP('final')
if 'POD2MAN' in bld.env and bld.env['POD2MAN'] != '':
for src, manpage in pidl_manpages.iteritems():
@@ -57,15 +55,29 @@ def build(bld):
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
+ # 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
+ # But we force the developer to use the pidl standalone build
+ # to regenerate the files.
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:
- 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
+ Logs.error('''
+Pidl grammar files have changed. Please use the pidl standalone build
+to regenerate them with yapp.
+
+$ cd pidl
+$ perl Makefile.PL
+$ make lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm
+$ git add lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm
+$ git commit
+
+If your 100% sure you haven't changed idl.yp and expr.yp
+try this to avoid this message:
+
+$ touch lib/Parse/Pidl/IDL.pm lib/Parse/Pidl/Expr.pm
+''')
+ sys.exit(1)
+