Make Python-path configurable

This commit introduces a Makefile that needs to be run initially to
configure reclass for use on the local system, by setting the full path
to the Python interpreter.

Closes: #1
Signed-off-by: martin f. krafft <madduck@madduck.net>
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..67f71bd
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+#!/usr/bin/make
+#
+# This file is part of reclass (http://github.com/madduck/reclass)
+#
+# Copyright © 2007–13 martin f. krafft <madduck@madduck.net>
+# Released under the terms of the Artistic Licence 2.0
+#
+
+PYTHON_DEFAULT = /usr/bin/python
+PYTHON := $(shell which python)
+
+IN_FILES = $(wildcard *.in adapters/*.in)
+all: $(patsubst %.in,%,$(IN_FILES))
+.PHONY: all
+
+ifeq ($(PYTHON),$(PYTHON_DEFAULT))
+REPLACE_PYTHON_SHEBANG = cat
+else
+REPLACE_PYTHON_SHEBANG = sed -e 's,$(PYTHON_DEFAULT),$(PYTHON),g'
+endif
+
+%: %.in ALWAYS_REDO
+	$(REPLACE_PYTHON_SHEBANG) $< > $@
+	chmod +x $@
+
+ALWAYS_REDO:
+	@: