Generate docs for apps
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m46s

This commit is contained in:
2026-03-15 23:34:51 +01:00
parent 9629aec4e2
commit 41c979e41b
10 changed files with 42 additions and 4 deletions

View File

@@ -15,3 +15,4 @@ make -B all_compiledb_libioutil
make -B all_compiledb_libmath make -B all_compiledb_libmath
make -B all_compiledb_libfat make -B all_compiledb_libfat
make -B all_compiledb_libdebugconsole make -B all_compiledb_libdebugconsole
make -B compiledb_apps

View File

@@ -16,5 +16,5 @@ make -B docs_libioutil
make -B docs_libmath make -B docs_libmath
make -B docs_libfat make -B docs_libfat
make -B docs_libdebugconsole make -B docs_libdebugconsole
make -B docs_apps
mkdocs build mkdocs build

3
ce/.gitignore vendored
View File

@@ -1,2 +1,5 @@
*.o *.o
*.json
docs/
.cache/
ce ce

View File

@@ -1,6 +1,8 @@
#ifndef _WALLOC_H #ifndef _WALLOC_H
#define _WALLOC_H #define _WALLOC_H
#include <stddef.h>
void* wmalloc (void* ctx, size_t size); void* wmalloc (void* ctx, size_t size);
void* wrealloc (void* ctx, void* mem, size_t old, size_t new); void* wrealloc (void* ctx, void* mem, size_t old, size_t new);

2
docs/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
libs/**
apps/**

3
init/.gitignore vendored
View File

@@ -1,2 +1,5 @@
*.o *.o
*.json
docs/
.cache/
init init

View File

@@ -5,7 +5,7 @@ $(eval $(call add_include,libstring))
cflags += -D"FAT_PRINTF(a)" cflags += -D"FAT_PRINTF(a)"
DOCS_COLLECT = $$(git ls-files '*.c' '*.h' ':!_fat.*' ':!_fatctx.h') DOCS_COLLECT = $$(git ls-files '*.c' '*.h' ':!\_fat.c' ':!\_fat.h' ':!\_fatctx.h')
libname := libfat libname := libfat

View File

@@ -12,4 +12,10 @@ clean_apps:
format_apps: format_apps:
@for d in $(apps); do make -C $$d platform=$(platform) format; done @for d in $(apps); do make -C $$d platform=$(platform) format; done
.PHONY: all_apps clean_apps format_apps docs_apps:
@for d in $(apps); do make -C $$d platform=$(platform) docs; done
compiledb_apps:
@for d in $(apps); do make -C $$d platform=$(platform) compiledb; done
.PHONY: all_apps clean_apps format_apps docs_apps compiledb_apps

View File

@@ -13,6 +13,18 @@ include ../$(platform)/flags.mk
FORMAT ?= clang-format -i $$(git ls-files '*.c' '*.h') 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/apps/$(app); \
mkdir -p ../docs/apps/$(app); \
cp ./docs/GlobalNamespace/*.md ../docs/apps/$(app);
all: $(app) all: $(app)
$(app): $(extra_deps) $(o) $(app): $(extra_deps) $(o)
@@ -30,4 +42,10 @@ clean:
format: format:
$(FORMAT) $(FORMAT)
.PHONY: all clean format docs:
$(DOCS)
compiledb:
bear --output compile_commands.json -- make platform=$(platform) all
.PHONY: all clean format docs compiledb

3
spin/.gitignore vendored
View File

@@ -1,2 +1,5 @@
*.o *.o
*.json
docs/
.cache/
spin spin