blob: ee6c8bf8dc8731cbbbad41482c058e146a8b3d12 [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"
Christi Scarboroughd68d7c02006-02-06 07:25:25 +00009
10.PHONY: all cleaner buildmanual output
11
Dominik Riebelingabac7392006-10-23 18:09:38 +000012buildmanual: rockbox-build.tex pdf
Dominik Riebeling3ed5de82008-08-31 21:18:21 +000013 @cp $(OBJDIR)/rockbox-build.pdf $(OBJDIR)/../rockbox-$(MODELNAME)-$(VERSION).pdf
Christi Scarboroughd68d7c02006-02-06 07:25:25 +000014
Dominik Riebeling9413c2a2006-07-20 18:07:46 +000015buildhtml: rockbox-build.tex
16 @mkdir -p $(OBJDIR)/html
Dominik Riebeling22b31592006-07-24 20:44:14 +000017 @(if [ $(SPLITHTML) ]; then \
18 $(HTLATEX) $(DOCUMENT) "$(HTOPTS1),$(SPLITHTML)" $(HTOPTS2) $(HTOPTS3); \
19 else \
20 $(HTLATEX) $(DOCUMENT) "$(HTOPTS1),2" $(HTOPTS2) $(HTOPTS3); \
21 fi)
22
Dominik Riebeling1c3c1712006-08-03 00:08:43 +000023 @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 +000024 @cp -r $(OBJDIR)/html $(OBJDIR)/../
Dominik Riebelingabac7392006-10-23 18:09:38 +000025buildtxt: buildhtml
26 @mkdir -p $(OBJDIR)/txt
27 @(cd $(OBJDIR)/txt; for i in $(OBJDIR)/html/*.html; do \
28 links -dump -no-numbering -no-references $$i > `basename $$i html`txt; \
29 done)
30 @cp -r $(OBJDIR)/txt $(OBJDIR)/../
Dominik Riebeling9413c2a2006-07-20 18:07:46 +000031
32htmlzip: buildhtml
Daniel Stenbergb34c8fc2006-07-23 10:37:28 +000033 @(cd $(OBJDIR); \
34 zip -r $(OBJDIR)/rockbox-manual.zip html; \
35 cp $(OBJDIR)/rockbox-manual.zip $(OBJDIR)/../ )
Dominik Riebelingabac7392006-10-23 18:09:38 +000036
37txtzip: buildtxt
38 @(cd $(OBJDIR); \
39 zip -r $(OBJDIR)/rockbox-manual-txt.zip txt; \
40 cp $(OBJDIR)/rockbox-manual-txt.zip $(OBJDIR)/../ )
41