Source

htsql-tutorial / Makefile

#
# Copyright (c) 2006-2011, Prometheus Research, LLC
# See `LICENSE` for license information, `AUTHORS` for the list of authors.
#

# Run `make install` or `python setup.py install` to install HTSQL, or
# see `INSTALL` for the list of prerequisites and detailed installation
# instructions.

.PHONY: default build install install-deps develop clean

# Paths to executable files; overridable through environment variables.
PYTHON?=python
PIP?=pip

# Display the list of available targets.
default:
	@echo "Run 'make <target>', where <target> is one of:"
	@echo
	@echo "  install:       to install HTSQL"
	@echo "  install-deps:  to install database drivers"
	@echo "  develop:       to install HTSQL in the development mode"
	@echo "  clean:         to remove the build directory and compiled files"
	@echo

# Install the HTSQL packages.
install:
	${PYTHON} setup.py install

# Install database drivers.
install-deps:
	if ! ${PYTHON} -c 'import psycopg2' >/dev/null 2>&1; then \
		${PIP} install psycopg2; fi
	if ! ${PYTHON} -c 'import MySQLdb' >/dev/null 2>&1; then \
		${PIP} install mysql-python; fi
	if ! ${PYTHON} -c 'import pymssql' >/dev/null 2>&1; then \
		${PIP} install pymssql \
		-f http://pypi.python.org/pypi/pymssql/ --no-index; fi
	if ! ${PYTHON} -c 'import cx_Oracle' >/dev/null 2>&1; then \
		${PIP} install cx-oracle; fi

# Install the HTSQL packages in the development mode.
develop:
	${PYTHON} setup.py develop

# Delete the build directory and compiled files.
clean:
	rm -rf build
	rm -rf src/HTSQL.egg-info
	find . -name '*.pyc' -exec rm '{}' ';'
	find . -name '*.pyo' -exec rm '{}' ';'
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 ProjectModifiedEvent.java.
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.