For gnuplot5, the docs/Makefile.am file says that to generate the info file, one needs "make info". But I get the following error (under Debian):
/bin/bash /home/vlefevre/software/gnuplot5-5.0.0+dfsg1/missing makeinfo -I../../../docs ../../../docs/gnuplot.texi --no-split --output=gnuplot.info could not open ../../../docs/gnuplot.texi: No such file or directory Makefile:1095: recipe for target 'gnuplot.info' failed
The docs/README file says that gnuplot.info is generated from the gnuplot.doc file. So, there seems to be something incorrect in the rules.
Indeed, the rule seems to take gnuplot.texi from the source directory instead of the build directory.
I think you may be mis-reading something.
FYI to help figure out what might be going wrong,
Note that
1) emacs is needed to convert gnuplot.doc to gnuplot.texi
2) makeinfo is needed to convert gnuplot.texi to gnuplot.info
I think the message you show is telling you that one or both of these tools is missing.
No, I have both of these tools (gnuplot.texi has successfully been created and I have makeinfo). And modifying the Makefile rule solves the problem:
needs to be changed to:
Modifying the rule that way solves this problem. Unfortunately it creates a new one. Now the info file is built, but the .texi file in the source tree fails to be updated.
Pretty sure that is not the underlying cause of your problem. For one thing the unmodified Makefile works fine for me, For another the $(srcdir) is not referring to ../src, it's referring to the location of your gnuplot source tree as opposed to your build tree. At least that's my understanding. This is what lets you custom build/install into a different directory than the source.
So I'm glad you got it working for your machine, but I don't think that your modification is a correct fix for the upstream source. I think it's more likely that the definition of $srcdir itself got messed up somewhere.
Actually, neither. $(srcdir) is the location of no directory called 'src', nor of the source tree as such (that would be $(top_srcdir)). It's the location of the source tree's directory corresponding to the one make is currently being run in. E.g. if you build like I usually do (and Vincent, too):
then seen from build_sub/docs, $(srcdir)==../../docs, which is equivalent to /some/where/gnuplot/docs.
This is working for you only because you use the same build dir as srcdir. Try to build in a different directory, and you'll see. Note that gnuplot.texi is generated, so that it must not be taken from $(srcdir) but from the build directory, which is the same as the current directory. Hence my suggested change (which I tested in the case of a build directory different from the source tree and which works here).
Both automake and texinfo are beyond my meager powers of understanding. While what you say is logical, note the following caveat in the automake documentation:
I'm currently fighting automake configuration on another front and losing badly. This one almost makes sense, by comparison.
The rule was already written by a gnuplot developer in docs/Makefile.am. You just need to change it as I've said above.
Currently on http://gnuplot.cvs.sourceforge.net/viewvc/gnuplot/gnuplot/docs/Makefile.am?view=markup it is line 337.
Note: this will fix the build of the gnuplot.info file. I have not tried "make install" yet, but according to lines 339 and 341 (install-info rule), it seems to be OK since gnuplot.info is taken from the current directory.
Also, note the full rule about gnuplot.info currently in docs/Makefile.am:
Having gnuplot.texi in the prerequisites and $(srcdir)/gnuplot.texi in the command is an obvious inconsistency. The gnuplot.texi is the correct one.