On Thu, Apr 16, 2015 at 11:34 PM, Peter Maydell <[email protected]>
wrote:

>
> You don't need to, because the makefile sets PYTHON.
> (It's possible Makefile guesses wrongly; you could argue for
> making it make a more sophisticated guess, like "python2 unless
> there's no such executable in which case try plain python".)
>

In fact, I tried the Makefile way after reading t/README :

The easiest way to run tests is to say "make -C t"

but that didn't work :

make: Entering directory 'stgit/t'
test.py
make: test.py: Command not found
Makefile:10: recipe for target 'all' failed
make: *** [all] Error 127
make: Leaving directory 'stgit/t'

That's where I'm coming from...

The explanation why that didn't work is that make -C t
is doing the same as "cd t && make" manually (i.e. outside
from any other Makefile) which does not get the exported
PYTHON from the top-level Makefile, as it would if run as a
recursive make invokation.


> > I debated with myself adding:
> >
> > PYTHON ?= python2
> >
> > to the makefile.
>
> That line is already in Makefile (and since commit e22723c
> we correctly pass it down and honour it in all the sub-makefiles).
>

Yes, it does when running "make test" from top level directory, but not
in case you do it manually. I'd rather it work in all cases.

That's why I came with that patch.

So we alternatively could fix the t/README...

What do you think ?

-- 
Vincent Legoll
_______________________________________________
stgit-users mailing list
[email protected]
https://mail.gna.org/listinfo/stgit-users

Reply via email to