glib-tap: Add missing mkdir for .test generation rule

We can’t guarantee that the builddir we’re generating in actually exists
— if doing a clean build with builddir ≠ srcdir, and there are no other
rules which generate build products in builddir, the .test generation
rule can fail. This happens for flatpak-builder.git for me.

Try to avoid that by explicitly creating the builddir.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=790785
This commit is contained in:
Philip Withnall 2017-11-24 12:24:31 +00:00
parent 87122cae38
commit b97e5cb21b

View File

@ -125,7 +125,8 @@ installed_testcases = $(test_programs) $(installed_test_programs) \
installed_test_meta_DATA = $(installed_testcases:=.test)
%.test: %$(EXEEXT) Makefile
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
$(AM_V_GEN) ($(MKDIR_P) $(@D); \
echo '[Test]' > $@.tmp; \
echo 'Type=session' >> $@.tmp; \
echo 'Exec=$(installed_testdir)/$(notdir $<) --tap' >> $@.tmp; \
echo 'Output=TAP' >> $@.tmp; \