chiark / gitweb /
Mention collab-maint in the VCS section. Closes: #496815
[developers-reference.git] / Makefile
index ab0a5bd..5c19b3b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
 
 SOURCES                := $(wildcard *.dbk) common.ent version.ent
 
-FORMATS                := html txt pdf
+FORMATS                := html txt pdf epub
 LANGS           := de fr ja
 TARGETS                := $(foreach fmt,$(FORMATS),developers-reference.$(fmt)) \
                   $(foreach lng,$(LANGS), \
@@ -59,6 +59,7 @@ publish:      all
        ln -sf index.en.html $(PUBLISHDIR)/developers-reference/index.html
        ln -sf developers-reference.en.pdf $(PUBLISHDIR)/developers-reference/developers-reference.pdf
        ln -sf developers-reference.en.txt $(PUBLISHDIR)/developers-reference/developers-reference.txt
+       ln -sf developers-reference.en.epub $(PUBLISHDIR)/developers-reference/developers-reference.epub
 
 .PHONY: developers-reference.html %/developers-reference.html
 developers-reference.html:     $(CURDIR)/index.html
@@ -102,6 +103,10 @@ developers-reference.pdf:       $(CURDIR)/developers-reference.pdf
            --param=lingua=$(@D) \
            && mv $(@D)/index.dbk.pdf $@
 
+developers-reference.epub:      $(CURDIR)/developers-reference.epub
+%/developers-reference.epub:     $(addprefix %/,$(SOURCES))
+       TOP=`pwd` && cd $(@D) && xmlto epub index.dbk && mv index.epub $(@F)
+
 .PHONY: pot
 pot:                                   po4a/po/developers-reference.pot
 po4a/po/developers-reference.pot:      %.dbk
@@ -130,7 +135,7 @@ checkpo:
 
 .PHONY: clean
 clean:
-       rm -f *.fo *.html *.pdf *.txt
+       rm -f *.fo *.html *.pdf *.txt *.epub
        for L in $(LANGS); do rm -rf `basename ./"$$L"/`; done
        rm -f version.ent
        rm -f `find . -name "*~" -o -name "*.bak"`