Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 1 | DOCUMENT := rockbox-build |
| 2 | LATEX := pdflatex |
| 3 | include LaTeX.Rules |
| 4 | GRAPHIC_FILES:=`find . -name \*.jpg \*.jpeg` |
Dominik Riebeling | 9413c2a | 2006-07-20 18:07:46 +0000 | [diff] [blame] | 5 | HTLATEX := htlatex |
Dominik Riebeling | f15e219 | 2008-12-02 22:33:49 +0000 | [diff] [blame] | 6 | HTOPTS1 := rockbox-html,charset=utf-8,early_ |
Dominik Riebeling | 1244ab6 | 2008-12-16 22:44:22 +0000 | [diff] [blame] | 7 | HTOPTS2 := " -utf8 -cmozhtf" |
Dominik Riebeling | f15e219 | 2008-12-02 22:33:49 +0000 | [diff] [blame] | 8 | HTOPTS3 := "-dhtml/ -cvalidate" |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 9 | |
| 10 | .PHONY: all cleaner buildmanual output |
| 11 | |
Dominik Riebeling | abac739 | 2006-10-23 18:09:38 +0000 | [diff] [blame] | 12 | buildmanual: rockbox-build.tex pdf |
Dominik Riebeling | 3ed5de8 | 2008-08-31 21:18:21 +0000 | [diff] [blame] | 13 | @cp $(OBJDIR)/rockbox-build.pdf $(OBJDIR)/../rockbox-$(MODELNAME)-$(VERSION).pdf |
Christi Scarborough | d68d7c0 | 2006-02-06 07:25:25 +0000 | [diff] [blame] | 14 | |
Dominik Riebeling | 9413c2a | 2006-07-20 18:07:46 +0000 | [diff] [blame] | 15 | buildhtml: rockbox-build.tex |
| 16 | @mkdir -p $(OBJDIR)/html |
Dominik Riebeling | 22b3159 | 2006-07-24 20:44:14 +0000 | [diff] [blame] | 17 | @(if [ $(SPLITHTML) ]; then \ |
| 18 | $(HTLATEX) $(DOCUMENT) "$(HTOPTS1),$(SPLITHTML)" $(HTOPTS2) $(HTOPTS3); \ |
| 19 | else \ |
| 20 | $(HTLATEX) $(DOCUMENT) "$(HTOPTS1),2" $(HTOPTS2) $(HTOPTS3); \ |
| 21 | fi) |
| 22 | |
Dominik Riebeling | 1c3c171 | 2006-08-03 00:08:43 +0000 | [diff] [blame] | 23 | @cp --parent `cat $(OBJDIR)/html/*.html | sed -e '/[pj][np]g/!d;s/.*\"\(.*\.[pj][np]g\)\".*/\1/g;/</d'` $(OBJDIR)/html |
Dominik Riebeling | 9413c2a | 2006-07-20 18:07:46 +0000 | [diff] [blame] | 24 | @cp -r $(OBJDIR)/html $(OBJDIR)/../ |
Dominik Riebeling | abac739 | 2006-10-23 18:09:38 +0000 | [diff] [blame] | 25 | buildtxt: 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 Riebeling | 9413c2a | 2006-07-20 18:07:46 +0000 | [diff] [blame] | 31 | |
| 32 | htmlzip: buildhtml |
Daniel Stenberg | b34c8fc | 2006-07-23 10:37:28 +0000 | [diff] [blame] | 33 | @(cd $(OBJDIR); \ |
| 34 | zip -r $(OBJDIR)/rockbox-manual.zip html; \ |
| 35 | cp $(OBJDIR)/rockbox-manual.zip $(OBJDIR)/../ ) |
Dominik Riebeling | abac739 | 2006-10-23 18:09:38 +0000 | [diff] [blame] | 36 | |
| 37 | txtzip: buildtxt |
| 38 | @(cd $(OBJDIR); \ |
| 39 | zip -r $(OBJDIR)/rockbox-manual-txt.zip txt; \ |
| 40 | cp $(OBJDIR)/rockbox-manual-txt.zip $(OBJDIR)/../ ) |
| 41 | |