docsite/Makefile
d6e4b1bf
 #!/usr/bin/make
 SITELIB = $(shell python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
cd051c4a
 FORMATTER=../hacking/module_formatter.py
fbdcb22e
 DUMPER=../hacking/dump_playbook_attributes.py
d6e4b1bf
 
 all: clean docs
 
fbdcb22e
 docs: clean directives modules staticmin
d6e4b1bf
 	./build-site.py
d04649fa
 	-(cp *.ico htmlout/)
 	-(cp *.jpg htmlout/)
 	-(cp *.png htmlout/)
d6e4b1bf
 
f247b932
 variables:
 	(mkdir -p htmlout/)
 	dot variables.dot -Tpng -o htmlout/variables.png
 
cc440d0a
 viewdocs: clean staticmin
d6e4b1bf
 	./build-site.py view
 
cc440d0a
 htmldocs: staticmin
d706aca8
 	./build-site.py rst
d6e4b1bf
 
6e716b17
 webdocs: htmldocs
 
d6e4b1bf
 clean:
d706aca8
 	-rm -rf htmlout
d6e4b1bf
 	-rm -f .buildinfo
 	-rm -f *.inv
 	-rm -rf *.doctrees
cc440d0a
 	@echo "Cleaning up minified css files"
 	find . -type f -name "*.min.css" -delete
d6e4b1bf
 	@echo "Cleaning up byte compiled python stuff"
 	find . -regex ".*\.py[co]$$" -delete
 	@echo "Cleaning up editor backup files"
 	find . -type f \( -name "*~" -or -name "#*" \) -delete
 	find . -type f \( -name "*.swp" \) -delete
81e9a605
 	@echo "Cleaning up generated rst"
 	-rm rst/list_of_*.rst
 	-rm rst/*_by_category.rst
 	-rm rst/*_module.rst
d6e4b1bf
 
 .PHONEY: docs clean
 
fbdcb22e
 directives: $(FORMATTER) ../hacking/templates/rst.j2
 	PYTHONPATH=../lib $(DUMPER) --template-dir=../hacking/templates --output-dir=rst/
 
cd051c4a
 modules: $(FORMATTER) ../hacking/templates/rst.j2
bceb0026
 	PYTHONPATH=../lib $(FORMATTER) -t rst --template-dir=../hacking/templates --module-dir=../lib/ansible/modules -o rst/
d6e4b1bf
 
cc440d0a
 staticmin:
0d7c3284
 	cat _themes/srtd/static/css/theme.css | sed -e 's/^[ 	]*//g; s/[ 	]*$$//g; s/\([:{;,]\) /\1/g; s/ {/{/g; s/\/\*.*\*\///g; /^$$/d' | sed -e :a -e '$$!N; s/\n\(.\)/\1/; ta' > _themes/srtd/static/css/theme.min.css