rk27xx: move debug-target.h content to .c
[maemo-rb.git] / manual / Makefile
blobe091fdc4ee771ea80c3d3d27cc4fef6adc15a444
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 objdir-check
19 MANFILE := rockbox-build
21 VERSION= `$(TOOLSDIR)/version.sh $(ROOTDIR)`
23 .PHONY: $(OBJDIR)/version.tex $(OBJDIR)/$(MANFILE).tex
25 all: manual-pdf
27 features: $(OBJDIR)/features.tex
29 objdir-check:
30 @if [ "$(OBJDIR)" = "" ]; then echo Run make in you build directory!; false; fi
33 manual-prep: objdir-check rockbox.tex $(OBJDIR)/CREDITS.tex $(OBJDIR)/version.tex $(OBJDIR)/$(MANFILE).tex
34 $(SILENT)mkdir -p $(OBJDIR)
35 $(SILENT)find * -type d \! -regex '.*\.svn.*' -exec mkdir -p $(OBJDIR)/{} \;
36 $(SILENT)find * -type f \! -regex '.*\.svn.*' -exec cp {} $(OBJDIR)/{} \;
37 $(SILENT)mv $(OBJDIR)/Makefile.pdflatex $(OBJDIR)/Makefile
39 $(OBJDIR)/$(MANFILE).tex:
40 @echo "creating $(notdir $@)"
41 $(SILENT)printf "\\\\newcommand{\\\\platform}{${MANUALDEV}}\n" > $@
42 $(SILENT)printf "\\\\newcommand{\\\\buildversion}{$(VERSION)}\n" >> $@
43 $(SILENT)printf "\\\\input{rockbox.tex}\n" >> $@
45 $(OBJDIR)/CREDITS.tex: $(DOCSDIR)/CREDITS
46 @echo "processing $(notdir $^)"
47 $(SILENT)perl credits.pl < $(DOCSDIR)/CREDITS > $@
49 $(OBJDIR)/version.tex:
50 @echo "creating $(notdir $@)"
51 $(SILENT)printf "%s%%" $(VERSION) > $@
53 $(OBJDIR)/features.tex: $(ROOTDIR)/apps/features.txt
54 @echo "processing $(notdir $^)"
55 $(SILENT)mkdir -p `dirname $@`
56 $(SILENT) for f in \
57 $$(cat $< | $(HOSTCC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
58 $(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" \
59 -imacros "button.h" - | grep -v "^\#" | grep -v "^$$"); \
60 do feat="$$feat\\n\\\\edef\\\\UseOption{\\\\UseOption,$$f}"; done ; \
61 printf "$$feat" > $@
63 manual-pdf: objdir-check features manual-prep rockbox.tex
64 $(SILENT)$(MAKE) -C $(OBJDIR) buildmanual
66 manual-html: objdir-check features manual-prep rockbox.tex
67 $(SILENT)$(MAKE) -C $(OBJDIR) buildhtml
69 manual-txt: manual-html
70 $(SILENT)$(MAKE) -C $(OBJDIR) buildtxt
72 manual-txt-zip: manual-txt
73 $(SILENT)$(MAKE) -C $(OBJDIR) txtzip
75 manual-zip: manual-html
76 $(SILENT)$(MAKE) -C $(OBJDIR) htmlzip
78 clean: objdir-check
79 $(SILENT)rm -rf $(OBJDIR)/manual $(OBJDIR)/*.pdf
80 $(SILENT)rm -rf $(OBJDIR)/html $(OBJDIR)/txt