codegen: avoid generating more than one thing in the same command
codegen: avoid generating more than one thing in the same command

As with telepathy-glib commit 36c2a545c9, a rule like this:

    _gen/x.c _gen/x.h: prerequisites
        $(AM_V_GEN)x-generator

doesn't consider x.c and x.h together. Instead, it expands to two rules,
one to generate x.c and one to generate x.h, which happen to run the
same commands.

This means that in the worst case, you can end up running x-generator
twice in parallel, and they'll race with each other and overwrite or
delete each other's output.

Updated version of a patch from Ross Burton, taking into account that
we now generate a separate header for the gtk-doc. I use the gtk-doc
header as the one that "matters", because it's the last to be generated.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69446
Reviewed-by: Guillaume Desmottes <f16649c7afcd84e3350287183c4ed23cb1aea57c@collabora.co.uk>

freedesktop-unofficial-mirror/telepathy__telepathy-mission-control,freedesktop-unofficial-mirror/telepathy__telepathy-mission-control,freedesktop-unofficial-mirror/telepathy__telepathy-mission-control,freedesktop-unofficial-mirror/telepathy__telepathy-mission-control