#!/usr/bin/make

run:
	python3 -m cookiedough
setup:
	#pandoc README.md -o README.rst
	python3 setup.py bdist_wheel
	rm -r cookiedough.egg-info
upload: setup
	python3 setup.py bdist_wheel upload
	rm -r cookiedough.egg-info
t:
	pytest -v -v -v -v
profile:
	python3 -m cProfile -o profile_data.pyprof -m cookiedough
	pyprof2calltree -i profile_data.pyprof -k

docs:
	pygmentize -S pastie -f html > logfmt1/docs/syntax.css
	cd logfmt1 ; PYTHONPATH=. mkdocs build -v -v -v
	sed -i 's/table\.docutils/table/g' logfmt1/html/css/theme.css 
	sed -i 's/[{};]/&\n/g' logfmt1/html/css/theme.css
%.1:	%.md
	pandoc --standalone -f markdown+pandoc_title_block -t man $< -o $@
%.5:	%.md
	pandoc --standalone -f markdown+pandoc_title_block -t man $< -o $@
man:	manpage/cookiedough.1 manpage/cookiecutter.1 

