make: Fix GTKDOC_CHECK for Automake 1.13
The parallel test driver that is the default in Automake 1.13 and above
creates log files with .log and .trs extensions. It creates the
filenames based on the test name, which in the case of GTKDOC_CHECK is
the absolute path to the gtkdoc-check binary. This is generally
$(prefix)/bin and not writable by the user, which leads to a build
failure.
Avoid this situation by generating a shell script in builddir, which in
turn calls the gtkdoc-check binary. In this way, the log and result file
are created in builddir and the build can proceed as normal.
https://bugzilla.gnome.org/show_bug.cgi?id=701638