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

29 lines
839 B
Makefile
Raw Normal View History

2025-02-03 23:29:17 +01:00
# 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 = .
2025-02-05 00:58:48 +01:00
# BUILDDIR = _build
# Determine build directory based on git branch
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
ifeq ($(BRANCH),master-exraildocdev)
2025-02-05 09:59:37 +01:00
BUILDDIR = _build/html/devel
2025-02-05 00:58:48 +01:00
else
BUILDDIR = _build
endif
2025-02-03 23:29:17 +01:00
# 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)