Skip to content

Commit aacff73

Browse files
committed
docs: Fix up doxyfile.
No longer using :sources, since that fails on render.com.
1 parent d55fc85 commit aacff73

File tree

7 files changed

+82
-37
lines changed

7 files changed

+82
-37
lines changed

docs/Doxyfile

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,15 +1295,6 @@ HTML_COLORSTYLE_SAT = 100
12951295

12961296
HTML_COLORSTYLE_GAMMA = 80
12971297

1298-
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
1299-
# page will contain the date and time when the page was generated. Setting this
1300-
# to YES can help to show when doxygen was last run and thus if the
1301-
# documentation is up to date.
1302-
# The default value is: NO.
1303-
# This tag requires that the tag GENERATE_HTML is set to YES.
1304-
1305-
HTML_TIMESTAMP = NO
1306-
13071298
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
13081299
# documentation will contain a main index with vertical navigation menus that
13091300
# are dynamically created via JavaScript. If disabled, the navigation index will
@@ -1950,14 +1941,6 @@ LATEX_HIDE_INDICES = NO
19501941

19511942
LATEX_BIB_STYLE = plain
19521943

1953-
# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
1954-
# page will contain the date and time when the page was generated. Setting this
1955-
# to NO can help when comparing the output of multiple runs.
1956-
# The default value is: NO.
1957-
# This tag requires that the tag GENERATE_LATEX is set to YES.
1958-
1959-
LATEX_TIMESTAMP = NO
1960-
19611944
# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
19621945
# path from which the emoji images will be read. If a relative path is entered,
19631946
# it will be relative to the LATEX_OUTPUT directory. If left blank the
@@ -2587,3 +2570,19 @@ GENERATE_LEGEND = YES
25872570
# The default value is: YES.
25882571

25892572
DOT_CLEANUP = YES
2573+
2574+
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
2575+
# clang parser for more accurate parsing at the cost of reduced performance.
2576+
# This can be particularly helpful with template rich C++ code for which
2577+
# doxygen's built-in parser lacks the necessary type information.
2578+
2579+
CLANG_ASSISTED_PARSING = NO
2580+
2581+
# If clang assisted parsing is enabled you can provide the clang parser with
2582+
# the path to the directory containing a file called compile_commands.json.
2583+
# This file is the compilation database containing the options used when the
2584+
# source files were built. This is equivalent to specifying the -p option to a
2585+
# clang tool, such as clang-check. These options will then be passed to the
2586+
# parser. Any options specified with CLANG_OPTIONS will be added as well.
2587+
2588+
CLANG_DATABASE_PATH = _build

other/docker/doxygen/dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# ===== custom =====
2+
!docs/Doxyfile
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
FROM toxchat/c-toxcore:sources AS sources
2-
FROM alpine:3.19.0 AS build
1+
FROM toxchat/doxygen:latest AS build
32

4-
ENV LANG=en_US.UTF-8 \
5-
LANGUAGE=en_US.UTF-8 \
6-
LC_CTYPE=en_US.UTF-8 \
7-
LC_ALL=en_US.UTF-8
3+
RUN ["apk", "add", "--no-cache", \
4+
"gtest-dev", \
5+
"libconfig-dev", \
6+
"libsodium-dev", \
7+
"libvpx-dev", \
8+
"opus-dev"]
89

9-
RUN apk add --no-cache doxygen git graphviz texlive \
10-
&& git clone --depth=1 https://github.com/jothepro/doxygen-awesome-css.git /work/doxygen-awesome-css
11-
WORKDIR /work
12-
COPY --from=sources /src/ /work/
13-
COPY docs/Doxyfile /work/Doxyfile
14-
RUN echo "WARN_AS_ERROR = YES" >> Doxyfile \
10+
RUN git clone --depth=1 https://github.com/jothepro/doxygen-awesome-css.git /work/c-toxcore/doxygen-awesome-css
11+
12+
WORKDIR /work/c-toxcore
13+
COPY . /work/c-toxcore/
14+
RUN cmake . -B_build -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
15+
&& echo "WARN_AS_ERROR = YES" >> Doxyfile \
1516
&& sed -i -e 's/^non_null([^)]*) *//;s/^nullable([^)]*) *//' $(find . -name "*.[ch]") \
16-
&& doxygen Doxyfile
17+
&& doxygen docs/Doxyfile
1718

1819
FROM nginx:alpine
19-
COPY --from=build /work/_docs/html/ /usr/share/nginx/html/
20+
COPY --from=build /work/c-toxcore/_docs/html/ /usr/share/nginx/html/
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# ===== common =====
2+
# Ignore everything ...
3+
**/*
4+
# ... except sources
5+
!**/*.[ch]
6+
!**/*.cc
7+
!**/*.hh
8+
!CHANGELOG.md
9+
!LICENSE
10+
!README.md
11+
!auto_tests/data/*
12+
!other/bootstrap_daemon/bash-completion/**
13+
!other/bootstrap_daemon/tox-bootstrapd.*
14+
!other/proxy/*.mod
15+
!other/proxy/*.sum
16+
!other/proxy/*.go
17+
# ... and CMake build files (used by most builds).
18+
!**/CMakeLists.txt
19+
!.github/scripts/flags*.sh
20+
!cmake/*.cmake
21+
!other/pkgconfig/*
22+
!other/rpm/*
23+
!so.version
24+
# ===== custom =====
25+
!docs/Doxyfile

other/docker/doxygen/run

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
#!/bin/sh
2-
3-
set -eux
4-
BUILD=doxygen
5-
other/docker/sources/build
6-
docker build -t "toxchat/c-toxcore:$BUILD" -f "other/docker/$BUILD/$BUILD.Dockerfile" .
1+
#!/usr/bin/env bash
72

3+
. "$(cd "$(dirname "${BASH_SOURCE[0]}")/../sources" && pwd)/run.sh"
84
docker run --name toxcore-doxygen --rm -it -p "28192:80" "toxchat/c-toxcore:$BUILD"

other/docker/sources/run.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
# Common docker build script usable by many builds in the other/docker
4+
# directory. We're using a common dockerignore that ignores everything except
5+
# sources and CMake scripts. Subdirectories can contain a "dockerignore" file
6+
# (note the missing "." at the start) that will be pasted to the end of the
7+
# common dockerignore file. This way, we can use "COPY ." and get all the
8+
# files we need at once, which is much faster, more flexible, and less
9+
# error-prone than manually writing lots of COPY directives.
10+
11+
SOURCESDIR="$(dirname "${BASH_SOURCE[0]}")"
12+
DOCKERDIR="$(dirname "${BASH_SOURCE[1]}")"
13+
BUILD="$(basename "$DOCKERDIR")"
14+
15+
set -eux
16+
cat "$SOURCESDIR/sources.Dockerfile.dockerignore" >"$DOCKERDIR/$BUILD.Dockerfile.dockerignore"
17+
if [ -f "$DOCKERDIR/dockerignore" ]; then
18+
cat "$DOCKERDIR/dockerignore" >>"$DOCKERDIR/$BUILD.Dockerfile.dockerignore"
19+
fi
20+
21+
docker build -t "toxchat/c-toxcore:$BUILD" -f "other/docker/$BUILD/$BUILD.Dockerfile" .

other/docker/sources/sources.Dockerfile.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ===== common =====
12
# Ignore everything ...
23
**/*
34
# ... except sources

0 commit comments

Comments
 (0)