Build system, doesn't work when building out-of-sourcedir

Hi all,

I allways build in a subdir of the sourcedir.
svn checkout
cd trunk
mkdir build
cd build

Usually this works well, but I found out that this doesn’t work if you
change something in the generate*.py scripts.


Is the script run by the makefile in build/gnuradio-core/src/lib/filter
to generate build/gnuradio-core/src/lib/filter/makefile.gen (amongst
other things)
But the makefile.gen which is included is in
gnuradio-core/src/lib/filter (note this is in the sourcedir, not the

So the old makefile.gen is included.

I am not an automake wizard but I wondered if this is solvable.

The only workaround I have is.
first configure and build in the sourcedir. Do a make distclean and then
configure and build in the builddir.

cd trunk
make clean
make distclean
cd build (this is my builddir)

Here follows a snippet from gnuradio-core/src/lib/filter/
where some of this magic happens.

include $(srcdir)/Makefile.gen

include Makefile.gen

PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir)
$(PYTHON) $(srcdir)/