Files
SERiF/mk
Emily Boudreaux c782ff644a docs(mk): added doxygen commands to build docs
when running ./mk --docs the docs will also be build with the code itself and the tests
2025-01-19 12:23:34 -05:00

29 lines
550 B
Bash
Executable File

#!/bin/bash
# Check if the build directory is present, and remove it
if [ -d "build" ]; then
rm -rf build
fi
# Check for the --noTest flag
if [[ "$1" == "--noTest" ]]; then
meson setup build -Dbuild_tests=false
else
meson setup build -Dbuild_tests=true
fi
# Compile the project
meson compile -C build
# If tests are built, run them
if [[ "$1" != "--noTest" ]]; then
meson test -C build
fi
# Check if --docs are to be built
if [[ "$*" == *"--docs"* ]]; then
echo "Generating documentation..."
doxygen
cd docs/latex && make
fi