diff --git a/utils/lib.sh b/utils/lib.sh index 50f15a690..dfa1e9cda 100755 --- a/utils/lib.sh +++ b/utils/lib.sh @@ -1077,6 +1077,11 @@ in_container() { [[ -f /.lxcenv ]] } +LXC_ENV_FOLDER= +if in_container; then + LXC_ENV_FOLDER="lxc/$(hostname)/" +fi + lxc_init_container() { # Create a /.lxcenv file in the root folder. Call this once after container diff --git a/utils/makefile.lxc b/utils/makefile.lxc index 8b79994ee..fd999e40d 100644 --- a/utils/makefile.lxc +++ b/utils/makefile.lxc @@ -9,7 +9,7 @@ # sudo make ./utils/makefile.lxc lxc-activate # sudo make ./utils/makefile.lxc lxc-deactivate -LXC_ENV_FOLDER=/lxc-$(shell hostname) +LXC_ENV_FOLDER=lxc/$(shell hostname)/ lxc-help:: @echo 'LXC: running in container LXC_ENV_FOLDER=$(LXC_ENV_FOLDER)' diff --git a/utils/makefile.python b/utils/makefile.python index bd7d0d14e..1660468f5 100644 --- a/utils/makefile.python +++ b/utils/makefile.python @@ -8,9 +8,9 @@ export PYTHONPATH := $(SITE_PYTHON):$$PYTHONPATH export PY_ENV PYDIST PYBUILD # folder where the python distribution takes place -PYDIST = ./dist$(LXC_ENV_FOLDER) +PYDIST = ./$(LXC_ENV_FOLDER)dist # folder where the python intermediate build files take place -PYBUILD = ./build$(LXC_ENV_FOLDER) +PYBUILD = ./$(LXC_ENV_FOLDER)build # python version to use PY ?=3 PYTHON ?= python$(PY) @@ -28,7 +28,7 @@ TEST_FOLDER ?= ./tests TEST ?= . VTENV_OPTS ?= -PY_ENV = ./local$(LXC_ENV_FOLDER)/py$(PY) +PY_ENV = ./$(LXC_ENV_FOLDER)local/py$(PY) PY_ENV_BIN = $(PY_ENV)/bin PY_ENV_ACT = . $(PY_ENV_BIN)/activate diff --git a/utils/makefile.sphinx b/utils/makefile.sphinx index 8a1f6b76b..fd4c3a6f1 100644 --- a/utils/makefile.sphinx +++ b/utils/makefile.sphinx @@ -7,13 +7,13 @@ SPHINXOPTS ?= SPHINXBUILD ?= $(PY_ENV_BIN)/sphinx-build SPHINX_CONF ?= conf.py -DOCS_FOLDER = docs$(LXC_ENV_FOLDER) -DOCS_BUILD = build/docs$(LXC_ENV_FOLDER) -DOCS_DIST = dist/docs$(LXC_ENV_FOLDER) +DOCS_FOLDER = ./$(LXC_ENV_FOLDER)docs +DOCS_BUILD = ./$(LXC_ENV_FOLDER)build/docs +DOCS_DIST = ./$(LXC_ENV_FOLDER)dist/docs GH_PAGES ?= gh-pages -BOOKS_FOLDER = docs$(LXC_ENV_FOLDER) -BOOKS_DIST = dist/books$(LXC_ENV_FOLDER) +BOOKS_FOLDER = ./$(LXC_ENV_FOLDER)docs +BOOKS_DIST = ./$(LXC_ENV_FOLDER)dist/books ifeq ($(KBUILD_VERBOSE),1) SPHINX_VERBOSE = "-v"