The current source in the repository does not build out of the box. The documentation build definition is out of date, and the build looks for cgi.trm, which has been removed a long time ago. The attached patch removes all remaining references to this 'cgi' terminal
OK. But your repository must contain spurious files. .../docs/Makefile.in is an autogenerated file that should not exist outside of the build process. If I read the ChangeLog correctly, the copy your patch applies to was replaced by Makefile.am in June 2012.
The file .../docs/old/makefile.r is also long gone.
Do you have a "purge" command of some sort to clean old files out of your repository?
I sent this reply over email earlier, but I don't see it here. Sourceforge has odd ways. Copying it here.
Ah. Ethan, I apologize. I was using the git mirror
https://github.com/gnuplot/gnuplot[1]
and the issue lies there (that repo carries files it shouldn't). I'll let the maintainer know. Sorry.
dima