Minor corrections to the .colours file editing; added .colours to the list of support...
[maemo-rb.git] / manual / Makefile
blob6a52af1024dccb4e878873393372dde44f0aac5a
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id$
10 # Needed to build the features list.
11 INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
12 -I$(BUILDDIR)/bitmaps -I$(OBJDIR)
14 .PHONY: all buildmanual clean
15 MANFILE := rockbox-build
17 all: manual-pdf
19 features: $(OBJDIR)/features
21 manual-prep: rockbox.tex
22 @if [ "$(OBJDIR)" = "" ]; then echo Run make in you build directory!; false; fi
23 @mkdir -p $(OBJDIR)
24 @find * -type d \! -regex '.*\.svn.*' -exec mkdir -p $(OBJDIR)/{} \;
25 @find * -type f \! -regex '.*\.svn.*' -exec cp -u {} $(OBJDIR)/{} \;
26 @printf "%s%%" $(VERSION) > $(OBJDIR)/version.tex
27 @perl credits.pl < $(DOCSDIR)/CREDITS > $(OBJDIR)/CREDITS.tex
28 @printf "\\\\newcommand{\\\\platform}{${MANUALDEV}}\n" > $(OBJDIR)/$(MANFILE).tex
29 @printf "\\\\newcommand{\\\\buildversion}{$(VERSION)}\n" >> $(OBJDIR)/$(MANFILE).tex
30 @printf "\\\\input{rockbox.tex}\n" >> $(OBJDIR)/$(MANFILE).tex
31 @mv $(OBJDIR)/Makefile.pdflatex $(OBJDIR)/Makefile
33 $(OBJDIR)/features: $(ROOTDIR)/apps/features.txt
34 $(SILENT)mkdir -p `dirname $@`
35 $(SILENT)cat $< | $(HOSTCC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
36 $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" -imacros "button.h" - | \
37 grep -v "^\#" | grep -v "^$$" > $@; \
38 for f in `cat $(OBJDIR)/features`; do feat="$$feat\\n\\\\edef\\\\UseOption{\\\\UseOption,$$f}" ; done ; \
39 printf "$$feat" >$(OBJDIR)/features.tex
41 manual-pdf: features manual-prep rockbox.tex
42 $(MAKE) -C $(OBJDIR) buildmanual
44 manual-html: features manual-prep rockbox.tex
45 $(MAKE) -C $(OBJDIR) buildhtml
47 manual-txt: manual-html
48 $(MAKE) -C $(OBJDIR) buildtxt
50 manual-txt-zip: manual-txt
51 $(MAKE) -C $(OBJDIR) txtzip
53 manual-zip: manual-html
54 $(MAKE) -C $(OBJDIR) htmlzip
56 clean:
57 @if [ "$(OBJDIR)" = "" ]; then echo Run make in you build directory!; false; fi
58 @rm -rf $(OBJDIR)/manual $(OBJDIR)/*.pdf
59 @rm -rf $(OBJJDIR)/html $(OBJDIR)/txt