Skip to content

Commit 6bb64e7

Browse files
authored
Merge pull request #139 from argtable/build-add-docs-makefile-target
build: add the docs makefile target
2 parents 68c67a1 + 7f7ce57 commit 6bb64e7

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ DOCKER_CONTAINER_NAME := argtable3-builder-container
3333

3434
BUILD_DIR := build
3535
OUTPUT_DIR := output
36+
DOCS_DIR := docs
3637
DOXYGEN_XML_DIR := docs/source/xml
3738
DOCS_BUILD_DIR := docs/build
3839
ARCHIVE_DIR := .archive
@@ -80,7 +81,7 @@ Here are some <TAG_NAME> examples (use 'make taglist' to get all available tags)
8081

8182

8283
.PHONY: build-docker-image
83-
build-docker-image:
84+
build-docker-image: tools/Dockerfile
8485
@if [ ! -f /.dockerenv ] && ! docker image inspect $(DOCKER_IMAGE_NAME) >/dev/null 2>&1; then \
8586
docker build -f tools/Dockerfile -t $(DOCKER_IMAGE_NAME) .; \
8687
fi
@@ -134,6 +135,16 @@ archive: build-docker-image co
134135
"
135136

136137

138+
.PHONY: docs
139+
docs: build-docker-image
140+
@$(DOCKER_CMD_PREFIX) bash -c "\
141+
printf 'Generate documentation...\n' && \
142+
pushd $(DOCS_DIR) && \
143+
doxygen && \
144+
make html \
145+
"
146+
147+
137148
.PHONY: shell
138149
shell: build-docker-image
139150
@if [ ! -f /.dockerenv ]; then \

tools/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ RUN apt-get update && \
3939
tar \
4040
zip \
4141
dos2unix \
42+
doxygen \
43+
python3 \
44+
python3-pip \
45+
python3-venv \
4246
&& rm -rf /var/lib/apt/lists/*
4347

48+
RUN python3 -m venv /opt/venv && \
49+
/opt/venv/bin/pip install --upgrade pip && \
50+
/opt/venv/bin/pip install sphinx furo breathe myst-parser
51+
52+
ENV PATH="/opt/venv/bin:$PATH"
53+
4454
WORKDIR /workdir

0 commit comments

Comments
 (0)