Fix make check fail when srcdir != builddir.
This commit is contained in:
parent
58f52853d5
commit
2cf2e79cb6
|
@ -8,19 +8,19 @@ AM_TESTS_ENVIRONMENT= \
|
||||||
EXEEXT=${EXEEXT}; export EXEEXT; \
|
EXEEXT=${EXEEXT}; export EXEEXT; \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
BUILT_SOURCES = out.expected
|
BUILT_SOURCES = $(builddir)/out.expected
|
||||||
|
|
||||||
SH_LOG_COMPILER = sh
|
SH_LOG_COMPILER = sh
|
||||||
TESTS=run-test.sh
|
TESTS=run-test.sh
|
||||||
|
|
||||||
TESTDATA=4x6.pcf 8x16.pcf out.expected fonts.conf.in
|
TESTDATA=4x6.pcf 8x16.pcf fonts.conf.in
|
||||||
|
|
||||||
if FREETYPE_PCF_LONG_FAMILY_NAMES
|
if FREETYPE_PCF_LONG_FAMILY_NAMES
|
||||||
$(srcdir)/out.expected: $(srcdir)/out.expected-long-family-names
|
$(builddir)/out.expected: $(srcdir)/out.expected-long-family-names Makefile
|
||||||
cp $(srcdir)/out.expected-long-family-names $(srcdir)/out.expected
|
cp $(srcdir)/out.expected-long-family-names $(builddir)/out.expected
|
||||||
else
|
else
|
||||||
$(srcdir)/out.expected: $(srcdir)/out.expected-no-long-family-names
|
$(builddir)/out.expected: $(srcdir)/out.expected-no-long-family-names Makefile
|
||||||
cp $(srcdir)/out.expected-no-long-family-names $(srcdir)/out.expected
|
cp $(srcdir)/out.expected-no-long-family-names $(builddir)/out.expected
|
||||||
endif
|
endif
|
||||||
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)
|
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)
|
||||||
|
@ -61,8 +61,6 @@ TESTS += test-name-parse
|
||||||
|
|
||||||
EXTRA_DIST=run-test.sh $(TESTDATA) out.expected-long-family-names out.expected-no-long-family-names
|
EXTRA_DIST=run-test.sh $(TESTDATA) out.expected-long-family-names out.expected-no-long-family-names
|
||||||
|
|
||||||
CLEANFILES=out fonts.conf
|
CLEANFILES=out fonts.conf out.expected
|
||||||
|
|
||||||
MAINTAINERCLEANFILES=out.expected
|
|
||||||
|
|
||||||
-include $(top_srcdir)/git.mk
|
-include $(top_srcdir)/git.mk
|
||||||
|
|
|
@ -26,6 +26,7 @@ case "$OSTYPE" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
TESTDIR=${srcdir-"$MyPWD"}
|
TESTDIR=${srcdir-"$MyPWD"}
|
||||||
|
BUILDTESTDIR=${builddir-"$MyPWD"}
|
||||||
|
|
||||||
FONTDIR="$MyPWD"/fonts
|
FONTDIR="$MyPWD"/fonts
|
||||||
CACHEDIR="$MyPWD"/cache.dir
|
CACHEDIR="$MyPWD"/cache.dir
|
||||||
|
@ -51,7 +52,7 @@ check () {
|
||||||
echo "=" >> out
|
echo "=" >> out
|
||||||
$FCLIST - family pixelsize | sort >> out
|
$FCLIST - family pixelsize | sort >> out
|
||||||
tr -d '\015' <out >out.tmp; mv out.tmp out
|
tr -d '\015' <out >out.tmp; mv out.tmp out
|
||||||
if cmp out $TESTDIR/$EXPECTED > /dev/null ; then : ; else
|
if cmp out $BUILDTESTDIR/$EXPECTED > /dev/null ; then : ; else
|
||||||
echo "*** Test failed: $TEST"
|
echo "*** Test failed: $TEST"
|
||||||
echo "*** output is in 'out', expected output in '$EXPECTED'"
|
echo "*** output is in 'out', expected output in '$EXPECTED'"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue