From 6dcb28f05b480690174aac8588c93ef4db67fa7d Mon Sep 17 00:00:00 2001 From: Vahagn Khachatryan Date: Sun, 21 Oct 2018 23:15:43 +0100 Subject: [PATCH] Refactoring Makefile. --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 8f51fae..ec6b382 100644 --- a/Makefile +++ b/Makefile @@ -2,24 +2,26 @@ SHELL=C:/windows/system32/cmd.exe .SHELLFLAGS=/C -TEST_FILES = $(wildcard samples/*.zip) +#INPUT_DIR = /Users/vahagn/Downloads/Books +INPUT_DIR = samples +OUTPUT_DIR = test_out + +TEST_FILES = $(notdir $(wildcard $(INPUT_DIR)/*.zip)) PYTHONPATH = $(CURDIR)/modules/ebooklib .PHONY: test -test: test_samples/algorithms_third_edition_in_c.zip +test: test_algorithms_third_edition_in_c.zip +#test: test_algorithms_in_c__parts_1_4__fundamentals__data_structures__sorting__searching__third_edition.zip .PHONY: test_all test_all: $(addprefix test_,$(TEST_FILES)) - .ONESHELL: .PHONY: $(addprefix test_,$(TEST_FILES)) $(addprefix test_,$(TEST_FILES)): test_%: @echo Testing $* - @set PYTHONPATH=$(PYTHONPATH) && python gragir/__main__.py -v $* test_out/$(*F).epub - -#python gragir/__main__.py samples/algorithms_third_edition_in_c.zip algorithms_third_edition_in_c.epub + @set PYTHONPATH=$(PYTHONPATH) && python gragir/__main__.py -v $(INPUT_DIR)/$* $(OUTPUT_DIR)/$(*F).epub .PHONY: setup setup: