From 5cbdd915c7ea64fa7949518618d9d66eb186ae44 Mon Sep 17 00:00:00 2001 From: speedplane Date: Thu, 11 Dec 2014 00:53:33 -0500 Subject: [PATCH] Remove the dependancy on python2. Also, allow tests to be run on cygwin by checking for it, and converting unix2dos line endings. --- samples/Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/samples/Makefile b/samples/Makefile index d1b06c4..7984c37 100644 --- a/samples/Makefile +++ b/samples/Makefile @@ -1,9 +1,15 @@ # GNUMakefile for test +UNAME_S := $(shell uname -o) +CNVTXT=: +ifeq ($(UNAME_S),Cygwin) + CNVTXT=unix2dos +endif + RM=rm -f CMP=: ECHO=echo -PYTHON=python2 +PYTHON=python PDF2TXT=PYTHONPATH=.. $(PYTHON) ../tools/pdf2txt.py -p1 -V @@ -40,10 +46,13 @@ tests: for i in $(TESTS); do \ $(ECHO) $$i; \ $(PDF2TXT) -t html -o $$i.html $$i.pdf || exit 1; \ + $(CNVTXT) $$i.html || exit 1; \ $(CMP) $$i.html $$i.html.ref || exit 1; \ $(PDF2TXT) -t xml -o $$i.xml $$i.pdf || exit 1; \ + $(CNVTXT) $$i.xml || exit 1; \ $(CMP) $$i.xml $$i.xml.ref || exit 1; \ - $(PDF2TXT) -t text -o $$i.txt $$i.pdf || eixt 1; \ + $(PDF2TXT) -t text -o $$i.txt $$i.pdf || exit 1; \ + $(CNVTXT) $$i.txt || exit 1; \ $(CMP) $$i.txt $$i.txt.ref || exit 1; \ done