Fix silly mistake
[maemo-rb.git] / manual / Makefile
blobcfccc4d7b2db77facbc7b0cb2251cf6c17ee3d53
1 # __________ __ ___.
2 # Open \______ \ ____ ____ | | _\_ |__ _______ ___
3 # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
4 # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
5 # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
6 # \/ \/ \/ \/ \/
7 # $Id$
10 ifndef V
11 SILENT=@
12 endif
14 # Needed to build the features list.
15 INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
16 -I$(BUILDDIR)/bitmaps -I$(OBJDIR)
18 .PHONY: all buildmanual clean
19 MANFILE := rockbox-build
21 VERSION= `$(TOOLSDIR)/version.sh $(ROOTDIR)`
23 all: manual-pdf
25 features: $(OBJDIR)/features
27 manual-prep: rockbox.tex
28 @if [ "$(OBJDIR)" = "" ]; then echo Run make in you build directory!; false; fi
29 @mkdir -p $(OBJDIR)
30 @find * -type d \! -regex '.*\.svn.*' -exec mkdir -p $(OBJDIR)/{} \;
31 @find * -type f \! -regex '.*\.svn.*' -exec cp {} $(OBJDIR)/{} \;
32 @printf "%s%%" $(VERSION) > $(OBJDIR)/version.tex
33 @perl credits.pl < $(DOCSDIR)/CREDITS > $(OBJDIR)/CREDITS.tex
34 @printf "\\\\newcommand{\\\\platform}{${MANUALDEV}}\n" > $(OBJDIR)/$(MANFILE).tex
35 @printf "\\\\newcommand{\\\\buildversion}{$(VERSION)}\n" >> $(OBJDIR)/$(MANFILE).tex
36 @printf "\\\\input{rockbox.tex}\n" >> $(OBJDIR)/$(MANFILE).tex
37 @mv $(OBJDIR)/Makefile.pdflatex $(OBJDIR)/Makefile
39 $(OBJDIR)/features: $(ROOTDIR)/apps/features.txt
40 @echo "processing $(notdir $^)"
41 $(SILENT)mkdir -p `dirname $@`
42 $(SILENT)cat $< | $(HOSTCC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
43 $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" -imacros "button.h" - | \
44 grep -v "^\#" | grep -v "^$$" > $@; \
45 for f in `cat $(OBJDIR)/features`; do feat="$$feat\\n\\\\edef\\\\UseOption{\\\\UseOption,$$f}" ; done ; \
46 printf "$$feat" >$(OBJDIR)/features.tex
48 manual-pdf: features manual-prep rockbox.tex
49 $(MAKE) -C $(OBJDIR) buildmanual
51 manual-html: features manual-prep rockbox.tex
52 $(MAKE) -C $(OBJDIR) buildhtml
54 manual-txt: manual-html
55 $(MAKE) -C $(OBJDIR) buildtxt
57 manual-txt-zip: manual-txt
58 $(MAKE) -C $(OBJDIR) txtzip
60 manual-zip: manual-html
61 $(MAKE) -C $(OBJDIR) htmlzip
63 clean:
64 @if [ "$(OBJDIR)" = "" ]; then echo Run make in you build directory!; false; fi
65 @rm -rf $(OBJDIR)/manual $(OBJDIR)/*.pdf
66 @rm -rf $(OBJDIR)/html $(OBJDIR)/txt