Commit cab8af89 authored by Federico Vaga's avatar Federico Vaga

bld: improve doc build

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 38668fb0
......@@ -3,7 +3,7 @@
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXOPTS = -Drelease=$(shell git describe) -Dversion=$(shell git describe | cut -d "-" -f 1 | tr -d "v")
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build
......@@ -17,28 +17,5 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
$(MAKE) -C drawings
$(MAKE) doxygen TARGET=$@
@$(MAKE) -f Makefile.dependencies $@
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
GIT_VERSION = $(shell git describe --dirty --long --tags)
GIT_VERSION = $(shell git describe --dirty --long --tags)
doxygen:
ifeq ($(TARGET),clean)
@rm -rf doxygen-fd-output .doxystamp
else
$(MAKE) .doxystamp
endif
# List of Doxygen folders to consider
DOXINPUT := ../../lib
DOXINPUT += ../../kernel/fine-delay.h
DOXEXCL := ../../lib/PyFmcFineDelay
# List of actual Doxygen source files
DOXSRC = $(shell find $(DOXINPUT) -type f -name '*.[chS]')
.doxystamp: $(DOXSRC)
GIT_VERSION=$(GIT_VERSION) DOXINPUT="$(DOXINPUT)" DOXEXCL="$(DOXEXCL)" doxygen ./doxygen-fd-config
@touch .doxystamp
# SPDX-FileCopyrightText: 2020 CERN (home.cern)
#
# SPDX-License-Identifier: CC-BY-SA-4.0+
TOP_DIR := $(shell pwd)/..
SW_DIR := $(TOP_DIR)/software
DOXY_OUT := doxygen-fd-output
all: doxygen drawings
GIT_VERSION = $(shell git describe --dirty --long --tags)
DOXINPUT := $(SW_DIR)/lib
DOXINPUT += $(SW_DIR)/kernel/fine-delay.h
DOXEXCL := $(SW_DIR)/lib/PyFmcFineDelay
doxygen: $(DOXY_OUT)
$(DOXY_OUT): doxygen-fd-config
GIT_VERSION=$(GIT_VERSION) DOXINPUT="$(DOXINPUT)" DOXEXCL="$(DOXEXCL)" doxygen $<
drawings:
$(MAKE) -C $@
clean:
$(MAKE) -C drawings $@
@rm -rf $(DOXY_OUT)
# Whatever sphinx target
%: all
@echo > /dev/null
.PHONY: all clean doxygen drawings
_build
.doxystamp
doxygen-fd-output
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment