On 27/02/15 17:42, Matt Turner wrote: > On Fri, Feb 27, 2015 at 7:27 AM, Samuel Iglesias Gonsalvez > <sigles...@igalia.com> wrote: >> This could be the case of trying to compile a Mesa tarball (from 'make dist' >> command) in a machine without Python interpreter installed. The autogenerated >> files from mako templates were already created during tarball >> generation. >> >> In case of building from git without Python it is going to fail anyway >> because >> Python is not present when trying to autogenerate the files from mako >> templates. >> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89328 >> >> Signed-off-by: Samuel Iglesias Gonsalvez <sigles...@igalia.com> >> --- >> configure.ac | 7 ++++++- >> 1 file changed, 6 insertions(+), 1 deletion(-) >> >> diff --git a/configure.ac b/configure.ac >> index 22dc023..a4e6338 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -114,7 +114,12 @@ if test "x$INDENT" != "xcat"; then >> fi >> fi >> >> -AX_CHECK_PYTHON_MAKO_MODULE(0.3.4) >> +if test -n "$PYTHON2"; then >> + AX_CHECK_PYTHON_MAKO_MODULE(0.3.4) >> +else >> + AC_MSG_WARN([python not found - unable to check for python mako module]) >> +fi >> + > > For flex and bison, we check if a generated source file exists, which > is probably a good idea. That way configure will fail in a git > checkout if you don't have python. > Checking for the presence of one auto-generated file does not sound like a great idea imho. What happens if any of the other files is not present - should we keep the whole list in configure.ac ? Keeping the list in sync seems quite error prone.
A hacky alternative is to set the variable (BISON/LEX/PYTHON2) to something like `echo "Missing XXX dependency" && return 1` when empty. Yet that looks quite nasty, plus it shows rather late in the build process :\ > I have in my todo list to add some remaining source files generated by > python to the autotools distribution. After we commit some version of > this patch, Emil or I should make sure that all the python-generated > code is included in the tarball. > I was under the impression that we already do, but I will double-check. On a mildly related note: For anyone that missed it Ken voiced concerns over shipping the lex/bison generated files. Main idea is that as(if) security bugs are found and fixed in those products, mesa has been released with such vulnerable files. I can see his point, and I tend to agree with him. How do others feel on the topic ? Thanks Emil _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev