on fce2d49 help sign in
searx/utils/makefile.lxc
29 lines 752 B history raw
1# -*- coding: utf-8; mode: makefile-gmake -*-
2#
3# LXC environment
4# ===============
5#
6# To activate/deactivate LXC makefile environment in a container, set/unset link
7# from root '/.lxcenv.mk' to *this* file::
8#
9# sudo make ./utils/makefile.lxc lxc-activate
10# sudo make ./utils/makefile.lxc lxc-deactivate
12LXC_ENV_FOLDER=lxc/$(shell hostname)/
14lxc-help::
15 @echo 'LXC: running in container LXC_ENV_FOLDER=$(LXC_ENV_FOLDER)'
17# If not activated, serve target 'lxc-activate' ..
18ifeq (,$(wildcard /.lxcenv.mk))
19PHONY += lxc-activate
20lxc-activate:
21 ln -s "$(abspath $(lastword $(MAKEFILE_LIST)))" "/.lxcenv.mk"
22else
23# .. and if activated, serve target 'lxc-deactivate'.
24PHONY += lxc-deactivate
25lxc-deactivate:
26 rm /.lxcenv.mk
27endif
29.PHONY: $(PHONY)