s4-drsuapi: we store boolean in upppercase so we need to test them in uppercase
[mat/samba.git] / pidl / wscript
index 150ef41a637327db33ad677bb494ff4351af1ec5..e60ca202f501d965e3c00d0004ef50546b024712 100644 (file)
@@ -59,25 +59,27 @@ def build(bld):
     # 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 (
+    # TODO: only warn in developer mode and if 'git diff HEAD'
+    #       shows a difference
+    warn_about_grammar_changes = ('PIDL_BUILD_WARNINGS' 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:
-        Logs.error('''
+    if warn_about_grammar_changes:
+        Logs.warn('''
 Pidl grammar files have changed. Please use the pidl standalone build
 to regenerate them with yapp.
 
-$ cd pidl
+$ 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
+$ cd -
 
 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
+$ touch ../pidl/lib/Parse/Pidl/IDL.pm ../pidl/lib/Parse/Pidl/Expr.pm
 ''')
-        sys.exit(1)