When building gnuplot with buiddir different from srcdir, I get an error:
gnuplot executable not found - cannot regenerate manual figures
The reason is that docs/Makefile.am expects to find the gnuplot executable in $(top_srcdir)/src while it is in $(top_builddir)/src since it is generated.
I've attached a patch fixing all the instances of "src/gnuplot" in the docs/Makefile.am file.
That patch comes a bit late. I fixed this in CVS 4 weeks ago. The patches were not pushed into the 5.0 branch, though, because they run afoul of a problem with automake.
Yes, I later saw that there were other problems than just the paths. If you say that http://gnuplot.cvs.sourceforge.net/viewvc/gnuplot/gnuplot/docs/Makefile.am?r1=1.25&r2=1.26 cannot work in the 5.0 branch, then I won't even try...
It's not that 1.26 cannot work in the 5.0 branch. Strictly speaking it cannot work at all. I.e. it has some serious problems that render it just barely acceptable in the development trunk, but didn't seem appropriate for the supposedly stable branch, particularly given the shortness of time between doc/Makefile.in 1.26 and the release of Version 5.0.1. That's really not a good time to knowingly break "make distclean".
Either way, this had been totally broken for about 3 years on end at the least, so there didn't seem to be any big hurry to fix it now. ;-)
It would be possible to add the non-broken changes from version 1.26 into the 5.0 branch, though. I'll think about this a bit.