1# serve the site locally 2serve: prepare_files 3 venv/bin/mkdocs serve 4 5build: prepare_files 6 venv/bin/mkdocs build 7 8# create files that are not versioned inside the mkdocs folder 9prepare_files: clean 10 # build Doxygen 11 $(MAKE) -C .. 12 # create subfolders 13 mkdir docs/images docs/examples 14 # copy images 15 cp -vr ../json.gif ../images/range-begin-end.svg ../images/range-rbegin-rend.svg ../images/callback_events.png ../images/json_syntax_number.png docs/images 16 # copy examples 17 cp -vr ../examples/*.cpp ../examples/*.output docs/examples 18 19# clean subfolders 20clean: 21 rm -fr docs/images docs/examples 22 23# publish site to GitHub pages 24publish: prepare_files 25 venv/bin/mkdocs gh-deploy --clean --force 26 27# install a Python virtual environment 28install_venv: requirements.txt 29 python3 -mvenv venv 30 venv/bin/pip install -r requirements.txt 31 32# uninstall the virtual environment 33uninstall_venv: clean 34 rm -fr venv 35