# dev and build helper
# :-
# SPDX-FileCopyrightText: © 2026 Franz Glasner
# SPDX-License-Identifier: BSD-3-Clause
# :-

.PHONY: help export clean tests doc clean-doc doc-html clean-doc-html doc-pdf clean-doc-pdf 

help:
	@echo Targets: help, export, clean, tests, doc, clean-doc, doc-html, clean-doc-html, doc-pdf, clean-doc-pdf 

export:
	rm -rf __arch
	hg kwarchive __arch

clean:
	rm -rf __arch/
	find . -name '*.pyc' -delete

tests:
	-python -m unittest discover -s tests

doc: doc-html doc-pdf

clean-doc:
	(cd docs && gmake clean)

doc-html:
	(cd docs && gmake html)

clean-doc-html:
	rm -rf docs/_build/html

doc-pdf:
	(cd docs && gmake latex)
	(cd docs/_build/latex && gmake)

clean-doc-pdf:
	rm -rf docs/_build/latex
