[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>
commitc89df6739f4ce7f5afd2baaaf727abdedc22c33b
authorMarkus Heiser <markus.heiser@darmarit.de>
dateFri 18 Dec 2020, 17:10 (6 years ago)
parent14c7cc0
utils/lxc.sh+1−1
@@ -20,7 +20,7 @@ lxc_set_suite_env
2020
2121LXC_HOST_PREFIX="${LXC_HOST_PREFIX:-test}"
2222
23−# where all folders from HOST are mounted
23+# Location in the container where all folders from HOST are mounted
2424LXC_SHARE_FOLDER="/share"
2525LXC_REPO_ROOT="${LXC_SHARE_FOLDER}/$(basename "${REPO_ROOT}")"
2626
utils/makefile.include+1−1
@@ -3,7 +3,7 @@
33ifeq (,$(wildcard /.lxcenv.mk))
44PHONY += lxc-activate lxc-purge
55lxc-activate:
6− @$(MAKE) -s -f /share/searx/utils/makefile.lxc lxc-activate
6+ @$(MAKE) -s -f "$$(dirname $(abspath $(lastword $(MAKEFILE_LIST))))/makefile.lxc" lxc-activate
77lxc-purge:
88 $(Q)rm -rf ./lxc
99else