mirror of
https://github.com/stnolting/neorv32.git
synced 2025-04-24 06:07:52 -04:00
[docs/makefile] Copy figures also for single targets (#1101)
This commit is contained in:
commit
5b9c7664e4
1 changed files with 44 additions and 17 deletions
|
@ -1,47 +1,64 @@
|
|||
.DEFAULT_GOAL := help
|
||||
|
||||
PUBLIC_DIR = public
|
||||
PUBLIC_IMG_DIR = $(PUBLIC_DIR)/img
|
||||
|
||||
DOXYGEN_IMG_DIR = doxygen_build/html/docs/figures
|
||||
|
||||
all: pdf html ug-pdf ug-html
|
||||
mkdir -p public/img/
|
||||
cp -vr figures/* public/img/
|
||||
|
||||
# Public folder
|
||||
$(PUBLIC_DIR):
|
||||
@mkdir -p $(PUBLIC_DIR)
|
||||
|
||||
# Copy images for datasheet and ug html
|
||||
$(PUBLIC_IMG_DIR): $(PUBLIC_DIR)
|
||||
@mkdir -p $@
|
||||
cp -vr figures/* $@
|
||||
|
||||
# Copy images for doxygen
|
||||
$(DOXYGEN_IMG_DIR):
|
||||
@mkdir -p $@
|
||||
cp -vr figures/* $@
|
||||
|
||||
# Generate PDF datasheet
|
||||
pdf:
|
||||
pdf: $(PUBLIC_DIR)
|
||||
[ -f revnumber.txt ] && REVNUMBER='-a revnumber='"$$(cat revnumber.txt)" || unset REVNUMBER; \
|
||||
asciidoctor-pdf $$REVNUMBER \
|
||||
-a allow-uri-read \
|
||||
-a pdf-theme=neorv32-theme.yml \
|
||||
-r asciidoctor-diagram \
|
||||
datasheet/main.adoc \
|
||||
--out-file public/pdf/NEORV32.pdf
|
||||
--out-file $(PUBLIC_DIR)/pdf/NEORV32.pdf
|
||||
|
||||
# Generate HTML datasheet
|
||||
html:
|
||||
html: $(PUBLIC_IMG_DIR) $(PUBLIC_DIR)
|
||||
[ -f revnumber.txt ] && REVNUMBER='-a revnumber='"$$(cat revnumber.txt)" || unset REVNUMBER; \
|
||||
asciidoctor $$REVNUMBER \
|
||||
-r asciidoctor-diagram \
|
||||
datasheet/index.adoc \
|
||||
--out-file public/index.html
|
||||
--out-file $(PUBLIC_DIR)/index.html
|
||||
|
||||
# Generate PDF user guide
|
||||
ug-pdf:
|
||||
ug-pdf: $(PUBLIC_DIR)
|
||||
[ -f revnumber.txt ] && REVNUMBER='-a revnumber='"$$(cat revnumber.txt)" || unset REVNUMBER; \
|
||||
asciidoctor-pdf $$REVNUMBER \
|
||||
-a allow-uri-read \
|
||||
-a pdf-theme=neorv32-theme.yml \
|
||||
-r asciidoctor-diagram \
|
||||
userguide/main.adoc \
|
||||
--out-file public/pdf/NEORV32_UserGuide.pdf
|
||||
--out-file $(PUBLIC_DIR)/pdf/NEORV32_UserGuide.pdf
|
||||
|
||||
# Generate HTML user guide
|
||||
ug-html:
|
||||
ug-html: $(PUBLIC_IMG_DIR) $(PUBLIC_DIR)
|
||||
[ -f revnumber.txt ] && REVNUMBER='-a revnumber='"$$(cat revnumber.txt)" || unset REVNUMBER; \
|
||||
asciidoctor $$REVNUMBER \
|
||||
-r asciidoctor-diagram \
|
||||
userguide/index.adoc \
|
||||
--out-file public/ug/index.html
|
||||
--out-file $(PUBLIC_DIR)/ug/index.html
|
||||
|
||||
# Generate DOXYGEN software documentation
|
||||
doxygen:
|
||||
doxygen: $(DOXYGEN_IMG_DIR)
|
||||
doxygen Doxyfile
|
||||
|
||||
# Generate revnumber.txt for overriding the revnumber attribute in 'pdf' and/or 'html'
|
||||
|
@ -54,12 +71,22 @@ revnumber:
|
|||
container: revnumber
|
||||
docker run --rm -v /$(shell pwd)://documents/ btdi/asciidoctor make all
|
||||
|
||||
clean:
|
||||
@rm -rf $(PUBLIC_IMG_DIR)
|
||||
@rm -rf $(PUBLIC_DIR)
|
||||
@rm -rf doxygen_build
|
||||
@rm -f revnumber.txt
|
||||
|
||||
# Help
|
||||
help:
|
||||
@echo "Targets:"
|
||||
@echo " help - show this text"
|
||||
@echo " pdf - build datasheet as pdf file (public/pdf/NEORV32.pdf)"
|
||||
@echo " html - build datasheet as HTML page (public/index.html)"
|
||||
@echo " ug-pdf - build user guide as pdf file (public/pdf/NEORV32_UserGuide.pdf)"
|
||||
@echo " ug-html - build user guide as HTML page (public/ug/index.html)"
|
||||
@echo " doxygen - build software documentation as HTML page (doxygen_build/html/index.html)"
|
||||
@echo " all - build datasheet and user guide as pdf and HTML file"
|
||||
@echo " help - show this text"
|
||||
@echo " pdf - build datasheet as pdf file (public/pdf/NEORV32.pdf)"
|
||||
@echo " html - build datasheet as HTML page (public/index.html)"
|
||||
@echo " ug-pdf - build user guide as pdf file (public/pdf/NEORV32_UserGuide.pdf)"
|
||||
@echo " ug-html - build user guide as HTML page (public/ug/index.html)"
|
||||
@echo " doxygen - build software documentation as HTML page (doxygen_build/html/index.html)"
|
||||
@echo " revnumber - for overriding the revnumber attribute in 'pdf' and/or 'html'"
|
||||
@echo " container - Build 'pdf' and 'html' in an 'asciidoctor-wavedrom' container
|
||||
@echo " clean - delete output files and directories"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue