diff options
| author | Markus Heiser <markus.heiser@darmarIT.de> | 2020-06-19 04:51:02 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-19 04:51:02 +0000 |
| commit | ca1c3bd15d60faf235894cb4f6f3a15150e3a6c3 (patch) | |
| tree | f951cabe1e0140ee5476c33b7703746285fa5ea0 /utils/makefile.lxc | |
| parent | cc721b5d864bcc0bf58d29337aaa1ec774bd70b5 (diff) | |
| parent | c83007a6bcd2a7f765e7655b91cc6714fbc4ab01 (diff) | |
Merge branch 'master' into csp-oscar-theme
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) |