1
0
Fork 0
mirror of https://github.com/searxng/searxng.git synced 2024-12-16 14:26:29 +00:00
searxng/utils/makefile.lxc
Markus Heiser d175a0fb7b [mod] LXC_ENV_FOLDER moved from ./lxc to ./lxc-env
BTW:

- add target $(LXC_ENV_FOLDER)
- fix indentations

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-26 11:43:18 +01:00

32 lines
863 B
Text

# -*- coding: utf-8; mode: makefile-gmake -*-
#
# LXC environment
# ===============
#
# To activate/deactivate LXC makefile environment in a container, set/unset link
# from root '/.lxcenv.mk' to *this* file::
#
# sudo make ./utils/makefile.lxc lxc-activate
# sudo make ./utils/makefile.lxc lxc-deactivate
LXC_ENV_FOLDER=lxc-env/$(shell hostname)/
lxc-help::
@echo ' LXC: running in container LXC_ENV_FOLDER=$(LXC_ENV_FOLDER)'
# If not activated, serve target 'lxc-activate' ..
ifeq (,$(wildcard /.lxcenv.mk))
PHONY += lxc-activate
lxc-activate:
ln -s "$(abspath $(lastword $(MAKEFILE_LIST)))" "/.lxcenv.mk"
else
# .. and if activated, serve target 'lxc-deactivate'.
PHONY += lxc-deactivate
lxc-deactivate:
rm /.lxcenv.mk
$(LXC_ENV_FOLDER):
$(Q)mkdir -p $(LXC_ENV_FOLDER)
$(Q)echo placeholder > $(LXC_ENV_FOLDER).placeholder
endif
.PHONY: $(PHONY)