Skip to content

Commit

Permalink
Now the docs build works (fingers-crossed)
Browse files Browse the repository at this point in the history
Still warnings but at least it should run
  • Loading branch information
callendorph committed Dec 17, 2024
1 parent 2cee3dd commit a519ff8
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 5 deletions.
27 changes: 22 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

SLM_STANZA ?= jstanza
STANZA := $(SLM_STANZA)

CWD := $(shell pwd)
SLM ?= slm

Expand Down Expand Up @@ -87,18 +88,34 @@ build-docgen: fetch-deps

DOC_PKGS_FILE := $(DOCS_DIR)/pkgs.txt
PKGS := $(shell cat ${DOC_PKGS_FILE} | xargs)
JITX_PKGS_FILE := $(DOCS_DIR)/jitx_pkgs.txt
JITX_PKGS := $(shell cat ${JITX_PKGS_FILE} | xargs)


# I'm trying to cover my bases here because
# our build, ci, and production environments
# are all so different. It is frankly amazing
# that anything works.

$(info STANZA: $(STANZA))
$(info STANZA_CONFIG: $(STANZA_CONFIG))

# This is likely not correct in the
# general case. In development - JITX_ROOT is set by `SLM_CONFIG` is not
# In production - JITX_ROOT is not set
JITX_ROOT := ${SLM_CONFIG}
ifeq (${JITX_ROOT},)
$(info Overriding JITX_ROOT with: ${STANZA_CONFIG})
JITX_ROOT := ${STANZA_CONFIG}
else
ifeq (${STANZA_CONFIG},)
$(info Overriding STANZA_CONFIG with: ${JITX_ROOT})
STANZA_CONFIG := ${JITX_ROOT}
endif
endif

test-docs: build-docgen

$(STANZA) definitions-database $(JITX_ROOT)/stanza.proj -o $(DOCS_DIR)/jitx_runtime_db.dat
$(STANZA) definitions-database ./stanza.proj -merge-with $(DOCS_DIR)/jitx_runtime_db.dat -o $(DEFS_DB)

$(DOCGEN) generate $(DEFS_DB) -type mkdocs -pkgs $(PKGS) -standalone src -o $(DOCS_DIR)/docs
$(DOCGEN) generate $(DEFS_DB) -type mkdocs -pkgs $(PKGS) $(JITX_PKGS) -standalone $(DOCS_DIR)/src -o $(DOCS_DIR)/docs


.PHONY: clean
Expand Down
20 changes: 20 additions & 0 deletions docs_build/jitx_pkgs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
jitx
jitx/anchor
jitx/layer-specs
jitx/percentage
jitx/pose
jitx/preconditions
jitx/ref
jitx/stateful
jitx/toleranced
jitx/transform
jitx/grid-locs
jitx/emodel-types
jitx/emodels
jitx/signal-models
jitx/shapes
jitx/commands
jitx/interval
jitx/schematic-table
jitx/parts/component-types
jitx/parts/component-code
17 changes: 17 additions & 0 deletions docs_build/src/heading.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@label jitx/pcb-board
@label jitx/pcb-bundle
@label jitx/pcb-check
@label jitx/pcb-component
@label jitx/pcb-enum
@label jitx/pcb-landpattern
@label jitx/pcb-material
@label jitx/pcb-module
@label jitx/pcb-pad
@label jitx/pcb-rules
@label jitx/pcb-routing-structure
@label jitx/pcb-differential-routing-structure
@label jitx/pcb-stackup
@label jitx/pcb-via
@label jitx/pcb-struct
@label jitx/pcb-symbol
@label jitx/pcb-schematic-template

0 comments on commit a519ff8

Please sign in to comment.