diff options
-rw-r--r-- | bitbake/lib/bb/pysh/pyshyacc.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/pysh/pyshyacc.py b/bitbake/lib/bb/pysh/pyshyacc.py index 3d9510c0c..6b2bf466d 100644 --- a/bitbake/lib/bb/pysh/pyshyacc.py +++ b/bitbake/lib/bb/pysh/pyshyacc.py @@ -648,7 +648,10 @@ def p_error(p): try: import pyshtables except ImportError: - yacc.yacc(tabmodule = 'pyshtables') + outputdir = os.path.dirname(__file__) + if not os.access(outputdir, os.W_OK): + outputdir = '' + yacc.yacc(tabmodule = 'pyshtables', outputdir = outputdir, debug = 0) else: yacc.yacc(tabmodule = 'pysh.pyshtables', write_tables = 0, debug = 0) |