From 9bad0540b013298f16043027c42c1343874e918e Mon Sep 17 00:00:00 2001 From: "Antoine Vandevenne (anv)" Date: Tue, 3 Aug 2021 09:54:30 +0000 Subject: [PATCH] [FIX] Makefile: fix CSS compilation for multi-version/lang builds Commit 547d90a allowed `BUILD_DIR` to be defined from the CLI but didn't update usages of `HTML_BUILD_DIR`. When building the documentation for multiple versions and/or languages, we should rely on `HTML_BUILD_DIR` to point to the appropriate directory. closes odoo/documentation#1075 Signed-off-by: Antoine Vandevenne (anv) --- Makefile | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 7f7f2feb5..45943dfa0 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,6 @@ SPHINXOPTS = -D project_root=$(ROOT) -D canonical_version=$(CANONICAL_VERSIO -j $(WORKERS) SOURCE_DIR = content - HTML_BUILD_DIR = $(BUILD_DIR)/html ifdef VERSIONS HTML_BUILD_DIR := $(HTML_BUILD_DIR)/12.0 @@ -43,7 +42,7 @@ clean: rm -rf $(BUILD_DIR)/* @echo "Cleaning finished." -html: $(BUILD_DIR)/html/_static/style.css +html: $(HTML_BUILD_DIR)/html/_static/style.css @echo "Starting build..." $(SPHINX_BUILD) -c $(CONFIG_DIR) -b html $(SPHINXOPTS) $(SOURCE_DIR) $(HTML_BUILD_DIR) @echo "Build finished." @@ -63,10 +62,10 @@ gettext: $(SPHINX_BUILD) -c $(CONFIG_DIR) -b gettext $(SOURCE_DIR) locale/sources @echo "Generation finished." -$(BUILD_DIR)/html/_static/style.css: extensions/odoo_theme/static/style.scss extensions/odoo_theme/static/scss/*.scss +$(HTML_BUILD_DIR)/html/_static/style.css: extensions/odoo_theme/static/style.scss extensions/odoo_theme/static/scss/*.scss @echo "Compiling stylesheets..." - mkdir -p $(BUILD_DIR)/html/_static - pysassc extensions/odoo_theme/static/style.scss $(BUILD_DIR)/html/_static/style.css + mkdir -p $(HTML_BUILD_DIR)/_static + pysassc extensions/odoo_theme/static/style.scss $(HTML_BUILD_DIR)/_static/style.css @echo "Compilation finished." #=== Development and debugging rules ===# @@ -74,6 +73,6 @@ $(BUILD_DIR)/html/_static/style.css: extensions/odoo_theme/static/style.scss ext fast: SPHINXOPTS += -A collapse_menu=True fast: html -static: $(BUILD_DIR)/static/style.css - cp -r extensions/odoo_theme/static/* $(BUILD_DIR)/html/_static/ - cp -r static/* $(BUILD_DIR)/html/_static/ +static: $(HTML_BUILD_DIR)/static/style.css + cp -r extensions/odoo_theme/static/* $(HTML_BUILD_DIR)/html/_static/ + cp -r static/* $(HTML_BUILD_DIR)/html/_static/