summaryrefslogtreecommitdiff
path: root/manual/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'manual/Makefile')
-rw-r--r--manual/Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/manual/Makefile b/manual/Makefile
index 05df9ba5f0..52f6bd58c1 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -7,12 +7,17 @@
7# $Id$ 7# $Id$
8# 8#
9 9
10# Needed to build the features list.
11INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
12 -I$(BUILDDIR)/bitmaps -I$(OBJDIR)
10 13
11.PHONY: all buildmanual clean 14.PHONY: all buildmanual clean
12MANFILE := rockbox-build 15MANFILE := rockbox-build
13 16
14all: manual-pdf 17all: manual-pdf
15 18
19features: $(OBJDIR)/features
20
16manual-prep: rockbox.tex 21manual-prep: rockbox.tex
17 @if [ "$(OBJDIR)" = "" ]; then echo Run make in you build directory!; false; fi 22 @if [ "$(OBJDIR)" = "" ]; then echo Run make in you build directory!; false; fi
18 @mkdir -p $(OBJDIR) 23 @mkdir -p $(OBJDIR)
@@ -25,7 +30,15 @@ manual-prep: rockbox.tex
25 @printf "\\\\input{rockbox.tex}\n" >> $(OBJDIR)/$(MANFILE).tex 30 @printf "\\\\input{rockbox.tex}\n" >> $(OBJDIR)/$(MANFILE).tex
26 @mv $(OBJDIR)/Makefile.pdflatex $(OBJDIR)/Makefile 31 @mv $(OBJDIR)/Makefile.pdflatex $(OBJDIR)/Makefile
27 32
28manual-pdf: manual-prep rockbox.tex 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 echo -e "$$feat" >$(OBJDIR)/features.tex
40
41manual-pdf: features manual-prep rockbox.tex
29 $(MAKE) -C $(OBJDIR) buildmanual 42 $(MAKE) -C $(OBJDIR) buildmanual
30 43
31manual-html: manual-prep rockbox.tex 44manual-html: manual-prep rockbox.tex