Fix parallel build of test sources.
When building with make -jX with X greater than 1 (parallel make), if the
dependency tree given in the Makefile is not perfect, the build will fail.
Since the prep-gtest.sh generates two files, both should be listed in the
Makefile, with the latter depending on the former (in order of creation);
since the header file is generated slightly earlier than the source file,
this is the correct order (wrong order would work on most filesystems but
will fail on tmpfs, xfs and ext4).
Additionally, make sure to tell automake about the generated sources, the
BUILT_SOURCES variable will ensure that the dependencies inside the
generated source files will be taken properly care of.
Symptoms of the previous brokenness would look like missing includes,
because the run-(auto|prompt)-test.h header would be used _after_ the file
started being written but _before_ it was completely written (race
condition).
Additionally, in egg tests, avoid using BUILT_SOURCES to set up UNIT_AUTO,
and also append to it after test.make has been included, so that they won't
overwrite one the other.
Signed-off-by: Stef Walter <stef@memberwebs.com>