[FIX] Makefile: fix CSS compilation for multi-version/lang builds
Commit547d90a
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#1077 X-original-commit:9bad0540b0
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
This commit is contained in:
parent
61b6fe53e1
commit
972403bd3b
15
Makefile
15
Makefile
@ -18,7 +18,6 @@ SPHINXOPTS = -D project_root=$(ROOT) -D canonical_version=$(CANONICAL_VERSIO
|
|||||||
-j $(WORKERS)
|
-j $(WORKERS)
|
||||||
SOURCE_DIR = content
|
SOURCE_DIR = content
|
||||||
|
|
||||||
|
|
||||||
HTML_BUILD_DIR = $(BUILD_DIR)/html
|
HTML_BUILD_DIR = $(BUILD_DIR)/html
|
||||||
ifdef VERSIONS
|
ifdef VERSIONS
|
||||||
HTML_BUILD_DIR := $(HTML_BUILD_DIR)/14.0
|
HTML_BUILD_DIR := $(HTML_BUILD_DIR)/14.0
|
||||||
@ -43,7 +42,7 @@ clean:
|
|||||||
rm -rf $(BUILD_DIR)/*
|
rm -rf $(BUILD_DIR)/*
|
||||||
@echo "Cleaning finished."
|
@echo "Cleaning finished."
|
||||||
|
|
||||||
html: $(BUILD_DIR)/html/_static/style.css
|
html: $(HTML_BUILD_DIR)/html/_static/style.css
|
||||||
@echo "Starting build..."
|
@echo "Starting build..."
|
||||||
$(SPHINX_BUILD) -c $(CONFIG_DIR) -b html $(SPHINXOPTS) $(SOURCE_DIR) $(HTML_BUILD_DIR)
|
$(SPHINX_BUILD) -c $(CONFIG_DIR) -b html $(SPHINXOPTS) $(SOURCE_DIR) $(HTML_BUILD_DIR)
|
||||||
@echo "Build finished."
|
@echo "Build finished."
|
||||||
@ -63,10 +62,10 @@ gettext:
|
|||||||
$(SPHINX_BUILD) -c $(CONFIG_DIR) -b gettext $(SOURCE_DIR) locale/sources
|
$(SPHINX_BUILD) -c $(CONFIG_DIR) -b gettext $(SOURCE_DIR) locale/sources
|
||||||
@echo "Generation finished."
|
@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..."
|
@echo "Compiling stylesheets..."
|
||||||
mkdir -p $(BUILD_DIR)/html/_static
|
mkdir -p $(HTML_BUILD_DIR)/_static
|
||||||
pysassc extensions/odoo_theme/static/style.scss $(BUILD_DIR)/html/_static/style.css
|
pysassc extensions/odoo_theme/static/style.scss $(HTML_BUILD_DIR)/_static/style.css
|
||||||
@echo "Compilation finished."
|
@echo "Compilation finished."
|
||||||
|
|
||||||
#=== Development and debugging rules ===#
|
#=== 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: SPHINXOPTS += -A collapse_menu=True
|
||||||
fast: html
|
fast: html
|
||||||
|
|
||||||
static: $(BUILD_DIR)/static/style.css
|
static: $(HTML_BUILD_DIR)/static/style.css
|
||||||
cp -r extensions/odoo_theme/static/* $(BUILD_DIR)/html/_static/
|
cp -r extensions/odoo_theme/static/* $(HTML_BUILD_DIR)/html/_static/
|
||||||
cp -r static/* $(BUILD_DIR)/html/_static/
|
cp -r static/* $(HTML_BUILD_DIR)/html/_static/
|
||||||
|
Loading…
Reference in New Issue
Block a user