Makefile 933 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # serve the site locally
  2. serve: prepare_files style_check
  3. venv/bin/mkdocs serve
  4. serve_dirty: prepare_files style_check
  5. venv/bin/mkdocs serve --dirtyreload
  6. build: prepare_files style_check
  7. venv/bin/mkdocs build
  8. # create files that are not versioned inside the mkdocs folder (images, examples)
  9. prepare_files: clean
  10. mkdir docs/examples
  11. cp -r ../json.gif docs/images
  12. cp -r ../examples/*.cpp ../examples/*.output docs/examples
  13. style_check:
  14. @cd docs ; python3 ../scripts/check_structure.py
  15. # clean subfolders
  16. clean:
  17. rm -fr docs/images/json.gif docs/examples
  18. # publish site to GitHub pages
  19. publish: prepare_files
  20. venv/bin/mkdocs gh-deploy --clean --force
  21. # install a Python virtual environment
  22. install_venv: requirements.txt
  23. python3 -mvenv venv
  24. venv/bin/pip install --upgrade pip
  25. venv/bin/pip install wheel
  26. venv/bin/pip install -r requirements.txt
  27. # uninstall the virtual environment
  28. uninstall_venv: clean
  29. rm -fr venv