1.1 --- a/tests/plover/Makefile.am Tue Jun 28 19:14:22 2016 +0100
1.2 +++ b/tests/plover/Makefile.am Tue Jun 28 19:46:00 2016 +0100
1.3 @@ -29,15 +29,24 @@
1.4 --sourcedir=../yum-repo-test-dir --manual-register \
1.5 test-uri-handler.gresource.xml
1.6
1.7 -test-uri-handler.gresource.xml:
1.8 - $(AM_V_GEN)(cd ../yum-repo-test-dir; \
1.9 - echo '<?xml version="1.0" encoding="UTF-8"?>'; \
1.10 - echo '<gresources>'; \
1.11 - echo '<gresource prefix="/uk/co/juiblex/project/plover">'; \
1.12 - find . -type f -print | sed -e 's/^\.\/\(.*\)$$/<file>\1<\/file>/'; \
1.13 - echo '</gresource>'; \
1.14 +# Because this is needed for BUILT_SOURCES, we need to produce a syntactically
1.15 +# correct file in all cases. In particular "make dist" on a clean tree won't
1.16 +# have a ../yum-repo-test-dir directory, but in that case
1.17 +# test-uri-handler-gresource won't be used either.
1.18 +
1.19 +test-uri-handler.gresource.xml: FORCE
1.20 + $(AM_V_GEN)(echo '<?xml version="1.0" encoding="UTF-8"?>' && \
1.21 + echo '<gresources>' && \
1.22 + echo '<gresource prefix="/uk/co/juiblex/project/plover">' && \
1.23 + if test -d ../yum-repo-test-dir; then \
1.24 + find ../yum-repo-test-dir -type f -print | \
1.25 + sed -e 's/^\.\.\/yum-repo-test-dir\/\(.*\)$$/<file>\1<\/file>/'; \
1.26 + fi && \
1.27 + echo '</gresource>' && \
1.28 echo '</gresources>') > $@
1.29
1.30 +FORCE:
1.31 +
1.32 endif
1.33
1.34 @VALGRIND_CHECK_RULES@