diff options
| author | Noémi Ványi <kvch@users.noreply.github.com> | 2020-06-28 20:28:12 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-28 20:28:12 +0200 |
| commit | 93cbd85b8a5becdf69e6d70dd7c60f7122531262 (patch) | |
| tree | 90d202af89e02fc3e83d5bdf4a924b05ff197261 /utils/makefile.lxc | |
| parent | 385e9b5c9e2d1caa73f99dac0bf1be1c46505121 (diff) | |
| parent | f9f5974968ce767c24eea8c8a651d0e3945fc01b (diff) | |
Merge branch 'master' into duckduckgo_correction
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) |