|
1 | | -ver=$(shell date +'%Y.%m.%d') |
2 | | -name=agentzh-nginx-tutorials-zhcn |
3 | | -zhcn_tutfiles=$(sort $(wildcard zh-cn/*.tut)) |
4 | | -zhcn_wikifiles=$(patsubst %.tut,wiki/%.wiki,$(zhcn_tutfiles)) |
5 | | -zhcn_htmlfiles=$(patsubst %.tut,html/%.html,$(zhcn_tutfiles)) |
| 1 | +.PHONY: all zhcn enuk clean |
6 | 2 |
|
7 | | -.PHONY: all mobi clean epub pdf html |
| 3 | +all: zhcn enuk |
8 | 4 |
|
9 | | -.PRECIOUS: $(zhcn_wikifiles) $(zhcn_htmlfiles) |
| 5 | +zhcn: |
| 6 | + $(MAKE) -f ebooks.mk |
10 | 7 |
|
11 | | -all: mobi epub pdf html |
12 | | - |
13 | | -mobi: $(name).mobi |
14 | | - |
15 | | -epub: $(name).epub |
16 | | - |
17 | | -pdf: $(name).pdf |
18 | | - |
19 | | -html: $(name).html |
20 | | - |
21 | | -%.pdf: $(name).html |
22 | | - ebook-convert $< $@ \ |
23 | | - --margin-bottom 30 \ |
24 | | - --margin-top 30 \ |
25 | | - --margin-left 20 \ |
26 | | - --margin-right 20 \ |
27 | | - --no-chapters-in-toc \ |
28 | | - --book-producer 'agentzh' \ |
29 | | - --output-profile kindle \ |
30 | | - --title "agentzh的Nginx教程($(ver)版)" --publisher 'agentzh' \ |
31 | | - --language "cn" --authors 'agentzh' |
32 | | - |
33 | | -%.mobi: $(name).html |
34 | | - ebook-convert $< $@ \ |
35 | | - --output-profile kindle_dx --no-inline-toc \ |
36 | | - --title "agentzh的Nginx教程($(ver)版)" --publisher '章亦春 (agentzh)' \ |
37 | | - --language "cn" --authors '章亦春 (agentzh)' |
38 | | - |
39 | | -%.epub: $(name).html |
40 | | - ebook-convert $< $@ \ |
41 | | - --no-default-epub-cover \ |
42 | | - --output-profile kindle_dx \ |
43 | | - --title "agentzh的Nginx教程($(ver)版)" --publisher '章亦春 (agentzh)' \ |
44 | | - --language "cn" --authors '章亦春 (agentzh)' |
45 | | - |
46 | | -$(name).html: $(zhcn_htmlfiles) |
47 | | - ./utils/gen-html-index.pl -v $(ver) -o $@ $^ |
48 | | - |
49 | | -html/%.html: wiki/%.wiki |
50 | | - mkdir -p $(dir $@) |
51 | | - ./utils/wiki2html.pl -o $@ $< |
52 | | - |
53 | | -wiki/%.wiki: %.tut |
54 | | - mkdir -p $(dir $@) |
55 | | - ./utils/tut2wiki.pl -o $@ $< |
| 8 | +enuk: |
| 9 | + $(MAKE) -f ebooks.mk lang=$@ lang2=en src=en-uk title="agentzh's Nginx Tutorials" |
56 | 10 |
|
57 | 11 | clean: |
58 | 12 | rm -rf html/ wiki/ index*.html *.mobi *.epub *.pdf |
59 | 13 |
|
60 | | -#test: ; echo $(zhcn_htmlfiles) |
61 | | - |
0 commit comments