summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-12-18 17:10:49 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2020-12-18 17:10:49 +0100
commitc89df6739f4ce7f5afd2baaaf727abdedc22c33b (patch)
tree62a2ff8b57f66843d4582d41fce57f8b5fd5eba6
parent14c7cc0e118f1d0873b32b34793cdec2c5c9c13e (diff)
downloadsearxng-c89df6739f4ce7f5afd2baaaf727abdedc22c33b.tar.gz
searxng-c89df6739f4ce7f5afd2baaaf727abdedc22c33b.zip
[fix] determine path to makefile.lxc in a LXC
The path to the makefile.lxc is not always static and '/share/searx/utils/makefile.lxc' can be wrong. When target 'lxc.activate' is called within the LXC container the path to makefile.lxc depends on LXC_SHARE_FOLDER and the basename of the folder where searx was cloned inital on the HOST system. This patch determines the path of 'makefile.lxc' next to 'makefile.include' itself. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
-rwxr-xr-xutils/lxc.sh2
-rw-r--r--utils/makefile.include2
2 files changed, 2 insertions, 2 deletions
diff --git a/utils/lxc.sh b/utils/lxc.sh
index 30534c6a2..11dbe578d 100755
--- a/utils/lxc.sh
+++ b/utils/lxc.sh
@@ -20,7 +20,7 @@ lxc_set_suite_env
LXC_HOST_PREFIX="${LXC_HOST_PREFIX:-test}"
-# where all folders from HOST are mounted
+# Location in the container where all folders from HOST are mounted
LXC_SHARE_FOLDER="/share"
LXC_REPO_ROOT="${LXC_SHARE_FOLDER}/$(basename "${REPO_ROOT}")"
diff --git a/utils/makefile.include b/utils/makefile.include
index 65aca70f0..35a5134d9 100644
--- a/utils/makefile.include
+++ b/utils/makefile.include
@@ -3,7 +3,7 @@
ifeq (,$(wildcard /.lxcenv.mk))
PHONY += lxc-activate lxc-purge
lxc-activate:
- @$(MAKE) -s -f /share/searx/utils/makefile.lxc lxc-activate
+ @$(MAKE) -s -f "$$(dirname $(abspath $(lastword $(MAKEFILE_LIST))))/makefile.lxc" lxc-activate
lxc-purge:
$(Q)rm -rf ./lxc
else