blob: c351f82fb5b535bd1d57f67277b50ee48cd5a092 [file] [log] [blame]
Christi Scarboroughd68d7c02006-02-06 07:25:25 +00001DOCUMENT := rockbox-build
2LATEX := pdflatex
3include LaTeX.Rules
4GRAPHIC_FILES:=`find . -name \*.jpg \*.jpeg`
Dominik Riebeling9413c2a2006-07-20 18:07:46 +00005HTLATEX := htlatex
Dominik Riebelingf15e2192008-12-02 22:33:49 +00006HTOPTS1 := rockbox-html,charset=utf-8,early_
Dominik Riebeling1244ab62008-12-16 22:44:22 +00007HTOPTS2 := " -utf8 -cmozhtf"
Dominik Riebelingf15e2192008-12-02 22:33:49 +00008HTOPTS3 := "-dhtml/ -cvalidate"
Rafaël Carrécdc42452010-05-30 23:18:06 +00009VERSION=`$(TOOLSDIR)/version.sh $(ROOTDIR)`
Dominik Riebeling19f24562011-06-19 09:41:13 +000010SPLITHTML ?= 2
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000011
12.PHONY: all cleaner buildmanual output
13
Dominik Riebelingabac7392006-10-23 18:09:38 +000014buildmanual: rockbox-build.tex pdf
Dominik Riebeling3ed5de82008-08-31 21:18:21 +000015 @cp $(OBJDIR)/rockbox-build.pdf $(OBJDIR)/../rockbox-$(MODELNAME)-$(VERSION).pdf
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000016
Dominik Riebeling9413c2a2006-07-20 18:07:46 +000017buildhtml: rockbox-build.tex
18 @mkdir -p $(OBJDIR)/html
Dominik Riebeling19f24562011-06-19 09:41:13 +000019 @$(HTLATEX) $(DOCUMENT) "$(HTOPTS1),$(SPLITHTML)" $(HTOPTS2) $(HTOPTS3)
Dominik Riebelinge9e0cf52011-06-19 15:43:41 +000020 @cp --parent `cat $(OBJDIR)/html/*.html | sed -e '/\.js/!d;s/.*\"\(.*\.js\)\".*/\1/g;/</d' | uniq` $(OBJDIR)/html
Dominik Riebeling1c3c1712006-08-03 00:08:43 +000021 @cp --parent `cat $(OBJDIR)/html/*.html | sed -e '/[pj][np]g/!d;s/.*\"\(.*\.[pj][np]g\)\".*/\1/g;/</d'` $(OBJDIR)/html
Dominik Riebeling9413c2a2006-07-20 18:07:46 +000022 @cp -r $(OBJDIR)/html $(OBJDIR)/../
Dominik Riebeling19f24562011-06-19 09:41:13 +000023
Dominik Riebelingabac7392006-10-23 18:09:38 +000024buildtxt: buildhtml
25 @mkdir -p $(OBJDIR)/txt
26 @(cd $(OBJDIR)/txt; for i in $(OBJDIR)/html/*.html; do \
27 links -dump -no-numbering -no-references $$i > `basename $$i html`txt; \
28 done)
29 @cp -r $(OBJDIR)/txt $(OBJDIR)/../
Dominik Riebeling9413c2a2006-07-20 18:07:46 +000030
31htmlzip: buildhtml
Daniel Stenbergb34c8fc2006-07-23 10:37:28 +000032 @(cd $(OBJDIR); \
33 zip -r $(OBJDIR)/rockbox-manual.zip html; \
34 cp $(OBJDIR)/rockbox-manual.zip $(OBJDIR)/../ )
Dominik Riebelingabac7392006-10-23 18:09:38 +000035
36txtzip: buildtxt
37 @(cd $(OBJDIR); \
38 zip -r $(OBJDIR)/rockbox-manual-txt.zip txt; \
39 cp $(OBJDIR)/rockbox-manual-txt.zip $(OBJDIR)/../ )
40