# HG changeset patch # User J. Ali Harlow # Date 1467139560 -3600 # Node ID 2740f1329ddc06656dfc23f36a3c37075a3bb0b7 # Parent ac72889393d1833387ba4155ff9fa77fc7eb9eb8 Fix make distcheck build diff -r ac72889393d1 -r 2740f1329ddc tests/plover/Makefile.am --- a/tests/plover/Makefile.am Tue Jun 28 19:14:22 2016 +0100 +++ b/tests/plover/Makefile.am Tue Jun 28 19:46:00 2016 +0100 @@ -29,15 +29,24 @@ --sourcedir=../yum-repo-test-dir --manual-register \ test-uri-handler.gresource.xml -test-uri-handler.gresource.xml: - $(AM_V_GEN)(cd ../yum-repo-test-dir; \ - echo ''; \ - echo ''; \ - echo ''; \ - find . -type f -print | sed -e 's/^\.\/\(.*\)$$/\1<\/file>/'; \ - echo ''; \ +# Because this is needed for BUILT_SOURCES, we need to produce a syntactically +# correct file in all cases. In particular "make dist" on a clean tree won't +# have a ../yum-repo-test-dir directory, but in that case +# test-uri-handler-gresource won't be used either. + +test-uri-handler.gresource.xml: FORCE + $(AM_V_GEN)(echo '' && \ + echo '' && \ + echo '' && \ + if test -d ../yum-repo-test-dir; then \ + find ../yum-repo-test-dir -type f -print | \ + sed -e 's/^\.\.\/yum-repo-test-dir\/\(.*\)$$/\1<\/file>/'; \ + fi && \ + echo '' && \ echo '') > $@ +FORCE: + endif @VALGRIND_CHECK_RULES@