Skip to content

Commit

Permalink
Makefile: Combine gen_images and gen_examples
Browse files Browse the repository at this point in the history
gen_images and gen_examples are never called on their own, CI scripts call make -C docs directly. Since calling them both in parallel seems to cause issues, let's not do that, and instead combine them into a singular `make docs/gen`.  This should resolve the parallelism problems by making them sequential while still retaining the -j support.
  • Loading branch information
KrystalDelusion committed Oct 16, 2024
1 parent 5d14c30 commit e5da0e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -996,12 +996,9 @@ docs/source/cell/word_add.rst: $(TARGETS) $(EXTRA_TARGETS)
docs/source/generated/cells.json: docs/source/generated $(TARGETS) $(EXTRA_TARGETS)
$(Q) ./$(PROGRAM_PREFIX)yosys -p 'help -dump-cells-json $@'

PHONY: docs/gen_examples docs/gen_images docs/guidelines docs/usage docs/reqs
docs/gen_examples: $(TARGETS)
$(Q) $(MAKE) -C docs examples

docs/gen_images: $(TARGETS)
$(Q) $(MAKE) -C docs images
PHONY: docs/gen docs/guidelines docs/usage docs/reqs
docs/gen: $(TARGETS)
$(Q) $(MAKE) -C docs gen

DOCS_GUIDELINE_FILES := GettingStarted CodingStyle
DOCS_GUIDELINE_SOURCE := $(addprefix guidelines/,$(DOCS_GUIDELINE_FILES))
Expand Down Expand Up @@ -1037,7 +1034,7 @@ docs/reqs:
$(Q) $(MAKE) -C docs reqs

.PHONY: docs/prep
docs/prep: docs/source/cmd/abc.rst docs/source/generated/cells.json docs/gen_examples docs/gen_images docs/guidelines docs/usage
docs/prep: docs/source/cmd/abc.rst docs/source/generated/cells.json docs/gen docs/guidelines docs/usage

DOC_TARGET ?= html
docs: docs/prep
Expand Down
5 changes: 5 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ images:
$(MAKE) -C source/_images
$(MAKE) -C source/_images convert

.PHONY: gen
gen:
$(MAKE) examples
$(MAKE) images

.PHONY: reqs
reqs:
$(PYTHON) -m pip install -r source/requirements.txt

0 comments on commit e5da0e3

Please sign in to comment.