about summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 79b4f9d4..c6b3b35d 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,7 @@ endif
 SETUPOPTS ?= '--record=install_log.txt'
 DOCDIR ?= doc/pydoc
 DESTDIR ?= /
+PREFIX ?= /usr/local
 PYOPTIMIZE ?= 1
 FILTER ?= .
 
@@ -55,7 +56,8 @@ help:
 
 install:
 	$(PYTHON) setup.py install $(SETUPOPTS) \
-		'--root=$(DESTDIR)' --optimize=$(PYOPTIMIZE)
+		'--prefix=$(PREFIX)' '--root=$(DESTDIR)' \
+		--optimize=$(PYOPTIMIZE)
 
 compile: clean
 	PYTHONOPTIMIZE=$(PYOPTIMIZE) $(PYTHON) -m compileall -q ranger
@@ -96,7 +98,8 @@ test_flake8:
 
 test_doctest:
 	@echo "Running doctests..."
-	@for FILE in $(shell grep -IHm 1 doctest -r ranger | grep $(FILTER) | cut -d: -f1); do \
+	@set -e; \
+	for FILE in $(shell grep -IHm 1 doctest -r ranger | grep $(FILTER) | cut -d: -f1); do \
 		echo "Testing $$FILE..."; \
 		RANGER_DOCTEST=1 PYTHONPATH=".:"$$PYTHONPATH ${PYTHON} $$FILE; \
 	done