documentation/Makefile
Antoine Vandevenne (anv) ebc3e70d0f [APOCALYPSE] Merge all documentations and add a new homemade theme
Co-authored-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Elisabeth Dickinson (edi) <edi@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2021-01-28 19:05:48 +01:00

42 lines
1.2 KiB
Makefile

# Makefile for Sphinx documentation
SPHINX_BUILD = sphinx-build
CONFIG_DIR = .
SPHINXOPTS = -A google_analytics_key=$(GOOGLE_ANALYTICS_KEY)
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
endif
# In first position to build the documentation from scratch by default
all: html
help:
@echo "Please use 'make <target>' where <target> is one of"
@echo " html to build the documentation to HTML"
@echo " clean to delete the build files"
clean:
@echo "Cleaning build files..."
$(RM_CMD) $(BUILD_DIR)/*
$(RM_CMD) extensions/odoo_theme/static/style.css
@echo "Cleaning finished."
edi: SPHINXOPTS += -A collapse_menu=True
edi: clean html
html: extensions/odoo_theme/static/style.css
@echo "Starting build..."
$(SPHINX_BUILD) -c $(CONFIG_DIR) -b html $(SPHINXOPTS) $(SOURCE_DIR) $(BUILD_DIR)/html
@echo "Build finished."
extensions/odoo_theme/static/style.css: extensions/odoo_theme/static/*.scss
@echo "Compiling stylesheets..."
pysassc $(subst .css,.scss,$@) $@
@echo "Compilation finished."