From f7b45776e95916672fc852dc8a98a73ddb51ac1d Mon Sep 17 00:00:00 2001 From: Carsten Hartenfels Date: Sat, 1 Jun 2019 13:45:19 +0200 Subject: [PATCH] Find post-build.sh even when not building in . You can make configure build in a different directory than the current one when you give it a `--prefix` option. When doing that, the current directy will be the build directory, not the source directory. This breaks running `./post-build.sh`. This commit fixes it by replacing the invocation with something that takes into account `$VPATH` which properly references the source directory. The `post-build.sh` still works properly because it references the current directory to do its thing, which will (correctly) be the build directory. --- makefile.am | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/makefile.am b/makefile.am index d6cdc70..4e49d4e 100644 --- a/makefile.am +++ b/makefile.am @@ -132,5 +132,11 @@ test_tests_SOURCES=\ test/src/test_affine.c \ test/src/test_bezier.c +# When running configure with --prefix, $VPATH references +# the source directory that post-build.sh is in. When not +# using a prefix, $VPATH will be unset, so we need to fall +# back to using . to run the script. +export VPATH + all-local: - sh ./post-build.sh + sh $${VPATH:-.}/post-build.sh