2015-02-11 15:22:56 +07:00
|
|
|
# Makefile for Sphinx documentation
|
|
|
|
|
2021-01-29 01:05:48 +07:00
|
|
|
SPHINX_BUILD = sphinx-build
|
|
|
|
CONFIG_DIR = .
|
2021-02-01 14:58:35 +07:00
|
|
|
SPHINXOPTS = -D project_root=$(ROOT) -D canonical_version=$(CANONICAL_VERSION) \
|
|
|
|
-D versions=$(VERSIONS) -D languages=$(LANGUAGES) -D language=$(CURRENT_LANG) \
|
|
|
|
-A google_analytics_key=$(GOOGLE_ANALYTICS_KEY)
|
2021-01-29 01:05:48 +07:00
|
|
|
SOURCE_DIR = content
|
|
|
|
BUILD_DIR = _build
|
|
|
|
|
|
|
|
# Rely on COMSPEC, which is a variable present in all Windows platforms, to determine the OS
|
|
|
|
ifdef COMSPEC
|
|
|
|
RM_CMD ?= del
|
|
|
|
else
|
|
|
|
RM_CMD ?= rm -rf
|
2015-02-11 15:22:56 +07:00
|
|
|
endif
|
|
|
|
|
2021-01-29 01:05:48 +07:00
|
|
|
# In first position to build the documentation from scratch by default
|
|
|
|
all: html
|
2015-02-11 15:22:56 +07:00
|
|
|
|
|
|
|
help:
|
2021-01-29 01:05:48 +07:00
|
|
|
@echo "Please use 'make <target>' where <target> is one of"
|
|
|
|
@echo " html to build the documentation to HTML"
|
2021-01-29 15:27:18 +07:00
|
|
|
@echo " fast to build the documentation to HTML with shallow menu (faster)"
|
2021-01-29 01:05:48 +07:00
|
|
|
@echo " clean to delete the build files"
|
2015-02-11 15:22:56 +07:00
|
|
|
|
|
|
|
clean:
|
2021-01-29 01:05:48 +07:00
|
|
|
@echo "Cleaning build files..."
|
|
|
|
$(RM_CMD) $(BUILD_DIR)/*
|
|
|
|
$(RM_CMD) extensions/odoo_theme/static/style.css
|
|
|
|
@echo "Cleaning finished."
|
2015-02-11 15:22:56 +07:00
|
|
|
|
2021-02-19 20:01:26 +07:00
|
|
|
#edi: SPHINXOPTS += -A collapse_menu=True # If needed, comment rather than setting False
|
2021-02-01 14:58:35 +07:00
|
|
|
edi: VERSIONS += 12.0,13.0,14.0
|
|
|
|
edi: CANONICAL_VERSION += 14.0
|
|
|
|
edi: LANGUAGES += en,fr,es
|
|
|
|
edi: CURRENT_LANG += fr
|
2021-01-29 01:05:48 +07:00
|
|
|
edi: clean html
|
2015-02-11 15:22:56 +07:00
|
|
|
|
2021-02-19 23:15:07 +07:00
|
|
|
static: extensions/odoo_theme/static extensions/odoo_theme/static/style.css
|
|
|
|
cp -r extensions/odoo_theme/static/* _build/html/_static/
|
|
|
|
|
2021-01-29 01:05:48 +07:00
|
|
|
html: extensions/odoo_theme/static/style.css
|
|
|
|
@echo "Starting build..."
|
|
|
|
$(SPHINX_BUILD) -c $(CONFIG_DIR) -b html $(SPHINXOPTS) $(SOURCE_DIR) $(BUILD_DIR)/html
|
2015-02-11 15:22:56 +07:00
|
|
|
@echo "Build finished."
|
|
|
|
|
2021-01-29 15:27:18 +07:00
|
|
|
fast: SPHINXOPTS += -A collapse_menu=True
|
|
|
|
fast: html
|
|
|
|
|
2021-01-29 01:05:48 +07:00
|
|
|
extensions/odoo_theme/static/style.css: extensions/odoo_theme/static/*.scss
|
|
|
|
@echo "Compiling stylesheets..."
|
|
|
|
pysassc $(subst .css,.scss,$@) $@
|
|
|
|
@echo "Compilation finished."
|