mirror of
https://github.com/stnolting/neorv32.git
synced 2025-04-24 06:07:52 -04:00
[docs] move Makefile from project root to subdir 'docs'
This commit is contained in:
parent
5c825daeb5
commit
c0f485cc6d
2 changed files with 11 additions and 16 deletions
2
.github/workflows/Documentation.yml
vendored
2
.github/workflows/Documentation.yml
vendored
|
@ -47,7 +47,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
|
||||
- name: '📚 Build Datasheet and User Guide (PDF and HTML)'
|
||||
run: make container
|
||||
run: make -C docs container
|
||||
|
||||
- name: '📤 Upload Artifact: HTML'
|
||||
uses: actions/upload-artifact@v2
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
.DEFAULT_GOAL := help
|
||||
|
||||
all: pdf html ug-pdf ug-html
|
||||
mkdir -p docs/public/img/
|
||||
cp -vr docs/figures/* docs/public/img/
|
||||
mkdir -p public/img/
|
||||
cp -vr figures/* public/img/
|
||||
|
||||
# Generate PDF datasheet
|
||||
pdf:
|
||||
cd docs; \
|
||||
[ -f revnumber.txt ] && REVNUMBER='-a revnumber='"$$(cat revnumber.txt)" || unset REVNUMBER; \
|
||||
asciidoctor-pdf $$REVNUMBER \
|
||||
-a pdf-theme=neorv32-theme.yml \
|
||||
|
@ -16,7 +15,6 @@ pdf:
|
|||
|
||||
# Generate HTML datasheet
|
||||
html:
|
||||
cd docs; \
|
||||
[ -f revnumber.txt ] && REVNUMBER='-a revnumber='"$$(cat revnumber.txt)" || unset REVNUMBER; \
|
||||
asciidoctor $$REVNUMBER \
|
||||
-r asciidoctor-diagram \
|
||||
|
@ -25,7 +23,6 @@ html:
|
|||
|
||||
# Generate PDF user guide
|
||||
ug-pdf:
|
||||
cd docs; \
|
||||
[ -f revnumber.txt ] && REVNUMBER='-a revnumber='"$$(cat revnumber.txt)" || unset REVNUMBER; \
|
||||
asciidoctor-pdf $$REVNUMBER \
|
||||
-a pdf-theme=neorv32-theme.yml \
|
||||
|
@ -35,7 +32,6 @@ ug-pdf:
|
|||
|
||||
# Generate HTML user guide
|
||||
ug-html:
|
||||
cd docs; \
|
||||
[ -f revnumber.txt ] && REVNUMBER='-a revnumber='"$$(cat revnumber.txt)" || unset REVNUMBER; \
|
||||
asciidoctor $$REVNUMBER \
|
||||
-r asciidoctor-diagram \
|
||||
|
@ -44,25 +40,24 @@ ug-html:
|
|||
|
||||
# Generate DOXYGEN software documentation
|
||||
doxygen:
|
||||
cd docs; \
|
||||
doxygen Doxyfile
|
||||
|
||||
# Generate revnumber.txt for overriding the revnumber attribute in 'pdf' and/or 'html'
|
||||
revnumber:
|
||||
if [ `git tag -l | grep nightly` ]; then git tag -d nightly; fi
|
||||
git describe --long --tags | sed 's#\([^-]*-g\)#r\1#;' > docs/revnumber.txt
|
||||
cat docs/revnumber.txt
|
||||
git describe --long --tags | sed 's#\([^-]*-g\)#r\1#;' > revnumber.txt
|
||||
cat revnumber.txt
|
||||
|
||||
# Build 'pdf' and 'html' in an 'asciidoctor-wavedrom' container
|
||||
container: revnumber
|
||||
docker run --rm -v /$(PWD)://documents/ btdi/asciidoctor make all
|
||||
docker run --rm -v /$(shell pwd)://documents/ btdi/asciidoctor make all
|
||||
|
||||
# Help
|
||||
help:
|
||||
@echo "Targets:"
|
||||
@echo " help - show this text"
|
||||
@echo " pdf - build datasheet as pdf file (docs/public/pdf/NEORV32.pdf)"
|
||||
@echo " html - build datasheet as HTML page (docs/public/index.html)"
|
||||
@echo " ug-pdf - build user guide as pdf file (docs/public/pdf/NEORV32_UserGuide.pdf)"
|
||||
@echo " ug-html - build user guide as HTML page (docs/public/ug/index.html)"
|
||||
@echo " doxygen - build software documentation as HTML page (docs/doxygen_build/html/index.html)"
|
||||
@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)"
|
Loading…
Add table
Add a link
Reference in a new issue