1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-02-27 02:56:04 +01:00
CommandStation-EX/docs/Makefile
2025-02-05 18:59:37 +10:00

29 lines
839 B
Makefile

# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
# BUILDDIR = _build
# Determine build directory based on git branch
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
ifeq ($(BRANCH),master-exraildocdev)
BUILDDIR = _build/html/devel
else
BUILDDIR = _build
endif
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)