virtualenvwrapper3 / Makefile

# Get the version of the app.  This is used in the doc build.
export VERSION=$(shell python --version)

# Default target is to show help
	@echo "sdist          - Source distribution"
	@echo "html           - HTML documentation"
	@echo "register       - register a new release on PyPI"
	@echo "website        - build web version of docs"
	@echo "installwebsite - deploy web version of docs"
	@echo "develop        - install development version"

.PHONY: sdist
sdist: html
	python sdist

# Documentation
.PHONY: html
	rm -rf virtualenvwrapper/docs
	(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/pkg")
	cp -r docs/build/html virtualenvwrapper/docs

# Website copy of documentation
.PHONY: website
website: docs/sphinx/web/templates/base.html
	rm -rf docs/website
	(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/web" BUILDDIR="website")

installwebsite: website
	(cd docs/website/html && rsync --rsh=ssh --archive --delete --verbose .

# Register the new version on pypi
.PHONY: register
	python register

# Copy the base template from my website build directory
docs/sphinx/web/templates/base.html: ~/Devel/doughellmann/doughellmann/templates/base.html
	cp $< $@

# Testing
TEST_SCRIPTS=$(wildcard tests/test*.sh)

.PHONY: develop test test-bash test-sh test-zsh test-loop test-install
test: develop test-bash test-sh test-zsh test-install

	python develop

	TEST_SHELL=bash $(MAKE) test-loop

	TEST_SHELL=sh $(MAKE) test-loop

	TEST_SHELL="zsh -o shwordsplit" $(MAKE) test-loop

	@for test_script in $(wildcard tests/test*.sh) ; do \
	 	echo '********************************************************************************' ; \
		echo "Running $$test_script with $(TEST_SHELL)" ; \
		SHUNIT_PARENT=$$test_script $(TEST_SHELL) $$test_script || exit 1 ; \
		echo ; \

	bash ./tests/ `pwd`/dist "$(VERSION)"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.