docs fix generation for libs
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m44s

This commit is contained in:
2026-03-15 22:26:49 +01:00
parent 20ff8788b8
commit 60c44f2939
2 changed files with 13 additions and 6 deletions

View File

@@ -5,6 +5,8 @@ $(eval $(call add_include,libstring))
cflags += -D"FAT_PRINTF(a)"
DOCS_COLLECT = $(git ls-files '*.c' '*.h' ':!_fat.*' ':!_fatctx.h')
libname := libfat
include ../make/lib.mk

View File

@@ -10,6 +10,16 @@ include ../$(platform)/flags.mk
FORMAT ?= clang-format -i $$(git ls-files '*.c' '*.h')
DOCS_COLLECT ?= $$(git ls-files '*.c' '*.h')
DOCS ?= \
rm -rf docs; \
clang-doc --format=md --output docs -p . $(DOCS_COLLECT); \
for f in ./docs/GlobalNamespace/*.md; do sed -i '/^\# Global Namespace/d' "$$f"; done; \
rm -rf ../docs/libs/$(libname); \
mkdir -p ../docs/libs/$(libname); \
cp ./docs/GlobalNamespace/*.md ../docs/libs/$(libname);
all: build/$(libname).a
build/$(libname).a: $(o)
@@ -28,11 +38,6 @@ format:
$(FORMAT)
docs:
rm -rf docs
clang-doc --format=md --output docs -p . $$(git ls-files '*.h')
for f in ./docs/GlobalNamespace/*.md; do sed -i '/^# Global Namespace/d' "$$f"; done
rm -rf ../docs/libs/$(libname)
mkdir -p ../docs/libs/$(libname)
cp ./docs/GlobalNamespace/*.md ../docs/libs/$(libname)
$(DOCS)
.PHONY: all clean format