forked from jgoguen/calibre-kobo-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (50 loc) · 2.29 KB
/
Makefile
File metadata and controls
67 lines (50 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
ZIPS = KoboTouchExtended.zip KePub\ Output.zip KePub\ Input.zip \
KePub\ Metadata\ Reader.zip KePub\ Metadata\ Writer.zip
CSS = $(wildcard css/*.css)
TRANSLATIONS = $(wildcard translations/*.mo)
ALL_SOURCES = $(shell find . -type f -name '*.py' -not -name 'pygettext.py')
ALL_TESTS = $(shell find tests -type f -name '*.py')
all: $(ZIPS)
KoboTouchExtended.zip: common.py container.py $(wildcard device/*.py) \
$(TRANSLATIONS) $(CSS) plugin-import-name-kobotouch_extended.txt \
device_init
$(eval FILES := __init__.py)
$(foreach f,$^,$(if $(wildcard $(f)),$(eval FILES += $(f))))
-/usr/bin/zip -u "$@" $(FILES)
rm -f __init__.py
KePub\ Output.zip: common.py container.py conversion/kepub_output.py \
conversion/output_config.py $(TRANSLATIONS) $(CSS) conversion_out_init \
plugin-import-name-kepubout.txt conversion/output_init
$(eval FILES := __init__.py conversion/__init__.py)
$(foreach f,$^,$(if $(wildcard $(f)),$(eval FILES += $(f))))
-/usr/bin/zip -u "$@" $(FILES)
rm -f __init__.py conversion/__init__.py
KePub\ Input.zip: common.py container.py conversion/kepub_input.py \
conversion/input_config.py $(TRANSLATIONS) conversion_in_init \
plugin-import-name-kepubin.txt conversion/input_init
$(eval FILES := __init__.py conversion/__init__.py)
$(foreach f,$^,$(if $(wildcard $(f)),$(eval FILES += $(f))))
-/usr/bin/zip -u "$@" $(FILES)
rm -f __init__.py conversion/__init__.py
KePub\ Metadata\ Reader.zip: common.py metadata/reader.py metadata/__init__.py \
$(TRANSLATIONS) md_reader_init plugin-import-name-kepubmdreader.txt
$(eval FILES := __init__.py)
$(foreach f,$^,$(if $(wildcard $(f)),$(eval FILES += $(f))))
-/usr/bin/zip -u "$@" $(FILES)
rm -f __init__.py
KePub\ Metadata\ Writer.zip: common.py metadata/writer.py metadata/__init__.py \
$(TRANSLATIONS) md_writer_init plugin-import-name-kepubmdwriter.txt
$(eval FILES := __init__.py)
$(foreach f,$^,$(if $(wildcard $(f)),$(eval FILES += $(f))))
-/usr/bin/zip -u "$@" $(FILES)
rm -f __init__.py
%_init: %_init.py
cp -f $@.py $(dir $@)__init__.py
test:
PYTHONPATH=../calibre/src:. /usr/bin/env python2 -B -m unittest discover -s 'test' -v
pot: translations/messages.pot
translations/messages.pot: $(ALL_SOURCES)
/usr/bin/env python2 -B ./pygettext.py -p translations $(ALL_SOURCES)
clean:
rm -f *.zip
.PHONY: all clean test pot