summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-06-24 07:58:05 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-06-24 07:58:05 -0700
commit382504fc032fc813863190ae0d5afddf8c7001f3 (patch)
treeb4549c92e6d622964deca8f3b77ef52b36032ec8
parent9ec5e89c859b70b03a65ff773f8f85eddc277f71 (diff)
downloadtxr-382504fc032fc813863190ae0d5afddf8c7001f3.tar.gz
txr-382504fc032fc813863190ae0d5afddf8c7001f3.tar.bz2
txr-382504fc032fc813863190ae0d5afddf8c7001f3.zip
install-tests: use relative path in run.sh.
* Makefile (install-tests): In the generated run.sh, let's allow flexibility in the installation location of the tests by avoiding a cd to an absolute path where the tests are assumed to be installed. Let's assume that they are installed relative to where the run.sh script is, and cd there.
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2f09af0f..65d6711a 100644
--- a/Makefile
+++ b/Makefile
@@ -530,7 +530,7 @@ install-tests:
$(call SH, \
(echo "#!/bin/sh" ; \
echo "set -ex" ; \
- echo "cd $(datadir)" ; \
+ echo 'cd "$$(dirname "$$(dirname "$$0")")"' ; \
make -s -n tests VERBOSE=y TXR=$(bindir)/txr) \
> run.sh)
$(call INSTALL,0755,run.sh,$(DESTDIR)$(datadir)/tests)