Refactoring Makefile.

This commit is contained in:
2018-10-21 23:15:43 +01:00
parent 6d2e9126f0
commit 6dcb28f05b

View File

@@ -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: