Skip to content

Commit f30f963

Browse files
authored
Internal docs generation updates (#16411)
1 parent b1de11c commit f30f963

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
# QMK-specific
2020
api_data/v1
21-
doxygen/
2221
quantum/version.h
2322
*.bin
2423
*.eep

Doxyfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ DOXYFILE_ENCODING = UTF-8
2121
PROJECT_NAME = "QMK Firmware"
2222
PROJECT_NUMBER = https://github.com/qmk/qmk_firmware
2323
PROJECT_BRIEF = "Keyboard controller firmware for Atmel AVR and ARM USB families"
24-
OUTPUT_DIRECTORY = doxygen
24+
OUTPUT_DIRECTORY = .build/doxygen
2525
ALLOW_UNICODE_NAMES = NO
2626
OUTPUT_LANGUAGE = English
2727
BRIEF_MEMBER_DESC = YES
@@ -145,7 +145,7 @@ FILE_PATTERNS = *.c \
145145
RECURSIVE = YES
146146
EXCLUDE =
147147
EXCLUDE_SYMLINKS = NO
148-
EXCLUDE_PATTERNS =
148+
EXCLUDE_PATTERNS = */protocol/arm_atsam/*
149149
EXCLUDE_SYMBOLS =
150150
EXAMPLE_PATH =
151151
EXAMPLE_PATTERNS = *
@@ -209,7 +209,7 @@ EXPAND_ONLY_PREDEF = NO
209209
SEARCH_INCLUDES = YES
210210
INCLUDE_PATH =
211211
INCLUDE_FILE_PATTERNS =
212-
PREDEFINED =
212+
PREDEFINED = __DOXYGEN__ PROGMEM
213213
EXPAND_AS_DEFINED =
214214
SKIP_FUNCTION_MACROS = YES
215215

lib/python/qmk/cli/generate/docs.py

+10-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
from milc import cli
88

99
DOCS_PATH = Path('docs/')
10-
BUILD_PATH = Path('.build/docs/')
10+
BUILD_PATH = Path('.build/')
11+
BUILD_DOCS_PATH = BUILD_PATH / 'docs'
12+
DOXYGEN_PATH = BUILD_PATH / 'doxygen'
1113

1214

1315
@cli.subcommand('Build QMK documentation.', hidden=False if cli.config.user.developer else True)
@@ -18,10 +20,12 @@ def generate_docs(cli):
1820
* [ ] Add a real build step... something static docs
1921
"""
2022

21-
if BUILD_PATH.exists():
22-
shutil.rmtree(BUILD_PATH)
23+
if BUILD_DOCS_PATH.exists():
24+
shutil.rmtree(BUILD_DOCS_PATH)
25+
if DOXYGEN_PATH.exists():
26+
shutil.rmtree(DOXYGEN_PATH)
2327

24-
shutil.copytree(DOCS_PATH, BUILD_PATH)
28+
shutil.copytree(DOCS_PATH, BUILD_DOCS_PATH)
2529

2630
# When not verbose we want to hide all output
2731
args = {
@@ -34,6 +38,6 @@ def generate_docs(cli):
3438

3539
# Generate internal docs
3640
cli.run(['doxygen', 'Doxyfile'], **args)
37-
cli.run(['moxygen', '-q', '-a', '-g', '-o', BUILD_PATH / 'internals_%s.md', 'doxygen/xml'], **args)
41+
cli.run(['moxygen', '-q', '-g', '-o', BUILD_DOCS_PATH / 'internals_%s.md', DOXYGEN_PATH / 'xml'], **args)
3842

39-
cli.log.info('Successfully generated internal docs to %s.', BUILD_PATH)
43+
cli.log.info('Successfully generated internal docs to %s.', BUILD_DOCS_PATH)

0 commit comments

Comments
 (0)