Skip to content

Commit

Permalink
Add support for codified VUs
Browse files Browse the repository at this point in the history
The following is implemented in this change:

- Codified VU parsing
- Codified VU reformatting in source (reflow.py)
- Codified VU formatting for build either in code or english
- Codified VU type checking
- Codified VU customization for build with/without extensions/versions
  * Removes the need for ifdef
- Unit tests
  • Loading branch information
ShabbyX committed Jul 15, 2024
1 parent 043260d commit 441572b
Show file tree
Hide file tree
Showing 49 changed files with 11,680 additions and 557 deletions.
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ VERBOSE =
# EXTRAATTRIBS sets additional attributes, if passed to make
# ADOCMISCOPTS miscellaneous options controlling error behavior, etc.
# ADOCEXTS asciidoctor extensions to load
# ADOCPROCOPTS options for passes that process the spec and produce side effects (such as validusage)
# ADOCOPTS options for asciidoc->HTML5 output

NOTEOPTS = -a editing-notes -a implementation-guide
Expand Down Expand Up @@ -207,10 +208,12 @@ ADOCMISCOPTS = --failure-level ERROR
# Look in $(GENERATED) for explicitly required non-extension Ruby, such
# as apimap.rb
ADOCEXTS = -I$(GENERATED) \
-I$(CONFIGS)/helpers/ \
-r $(CONFIGS)/spec-macros.rb \
-r $(CONFIGS)/open_listing_block.rb \
-r $(CONFIGS)/ifdef-mismatch.rb
ADOCOPTS = -d book $(ADOCMISCOPTS) $(ATTRIBOPTS) $(NOTEOPTS) $(VERBOSE) $(ADOCEXTS)
ADOCPROCOPTS = -d book $(ADOCMISCOPTS) $(ATTRIBOPTS) $(NOTEOPTS) $(VERBOSE) $(ADOCEXTS)
ADOCOPTS = $(ADOCPROCOPTS) -r $(CONFIGS)/vu-formatter.rb

# HTML target-specific Asciidoctor extensions and options
ADOCHTMLEXTS = -r $(CONFIGS)/katex_replace.rb \
Expand Down Expand Up @@ -380,11 +383,12 @@ epub: $(EPUBDIR)/vkspec.epub $(SPECSRC) $(COMMONDOCS)
$(EPUBDIR)/vkspec.epub: $(SPECSRC) $(COMMONDOCS)
$(QUIET)$(ASCIIDOC) -b epub3 $(ADOCOPTS) $(ADOCEPUBOPTS) -o $@ $(SPECSRC)

validusage: $(VUDIR)/validusage.json $(SPECSRC) $(COMMONDOCS)
.PHONY: validusage
validusage: $(VUDIR)/validusage.json

$(VUDIR)/validusage.json: $(SPECSRC) $(COMMONDOCS)
$(VUDIR)/validusage.json: $(SPECSRC) $(COMMONDOCS) $(CONFIGS)/vu-to-json/extension.rb $(CONFIGS)/helpers/vu_helpers.rb
$(QUIET)$(MKDIR) $(VUDIR)
$(QUIET)$(ASCIIDOC) $(ADOCOPTS) $(ADOCVUOPTS) --trace \
$(QUIET)$(ASCIIDOC) $(ADOCPROCOPTS) $(ADOCVUOPTS) --trace \
-a json_output=$@ -o $@ $(SPECSRC)

# Vulkan Documentation and Extensions, a.k.a. "Style Guide" documentation
Expand Down
Loading

0 comments on commit 441572b

Please sign in to comment.