From e9fb41f3224e9a1c228ac996c34c93c5692fdb7d Mon Sep 17 00:00:00 2001 From: Robert Winkler Date: Tue, 25 Feb 2020 14:46:16 +0100 Subject: [PATCH] Separate conda and sphinx build directories Signed-off-by: Robert Winkler --- Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 7d5ae56..00c7769 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ SPHINXOPTS = CMDS = cd source/prjxray/docs && make links && cd - && SPHINXBUILD = $(CMDS) sphinx-build PAPER = -BUILDDIR = build +BUILDDIR = build/sphinx # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 @@ -16,6 +16,8 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sou CONDA_DIR = build/conda CONDA_ENV_FILE = environment.yml +DOXYGEN_DIR = build/doxygen + .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp epub latex latexpdf text man changes linkcheck doctest env help: @@ -35,9 +37,11 @@ help: @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" @echo " env to create a conda environment with the needed packages" + @echo " env-clean to remove the conda environment" clean: - -rm -rf $(BUILDDIR)/* + -rm -rf $(BUILDDIR)/ + -rm -rf $(DOXYGEN_DIR)/ html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @@ -118,7 +122,7 @@ doctest: env: @rm -rf $(CONDA_DIR) - @mkdir -p $(BUILDDIR) && mkdir -p $(CONDA_DIR) + @mkdir -p $(CONDA_DIR) @wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh\ -O $(CONDA_DIR)/miniconda.sh @bash $(CONDA_DIR)/miniconda.sh -f -b -p $(CONDA_DIR) > /dev/null &&\ @@ -126,3 +130,6 @@ env: @./$(CONDA_DIR)/bin/conda env create -q -f $(CONDA_ENV_FILE) > /dev/null &&\ echo "Conda packages installed successfully..." @echo "To use conda environment type:\nsource enter-env.sh" + +env-clean: + @rm -rf $(CONDA_DIR)