diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2020-06-18 19:34:32 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-18 19:34:32 +0200 |
| commit | 4a8a16559af18ab38d796aad303a827c8c640fa2 (patch) | |
| tree | 3e056ebdc13610fa4e6a4f73ac9d0d044f10ba78 /utils/makefile.lxc | |
| parent | 0dc5bdb6ef602d00456eb1db96d45e2f42b2b7a4 (diff) | |
| parent | 0616684baa58b86cac5df6546432d4372f965fe2 (diff) | |
Merge pull request #1803 from return42/filtron
Tooling Box to setup & maintain searx instances and services.
Diffstat (limited to 'utils/makefile.lxc')
| -rw-r--r-- | utils/makefile.lxc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/utils/makefile.lxc b/utils/makefile.lxc new file mode 100644 index 000000000..fd999e40d --- /dev/null +++ b/utils/makefile.lxc @@ -0,0 +1,29 @@ +# -*- 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/$(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 +endif + +.PHONY: $(PHONY) |