a3cc428796
Using features.tex as intermediate file for creating features.tex is a bit confusing, and there is no real need for using an intermediate file. Change some hardcoded output files while at it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30959 a1c6a512-1295-4272-9138-f99709370657
80 lines
2.6 KiB
Makefile
80 lines
2.6 KiB
Makefile
# __________ __ ___.
|
|
# Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
# \/ \/ \/ \/ \/
|
|
# $Id$
|
|
#
|
|
|
|
ifndef V
|
|
SILENT=@
|
|
endif
|
|
|
|
# Needed to build the features list.
|
|
INCLUDES= $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I. -I$(BUILDDIR) \
|
|
-I$(BUILDDIR)/bitmaps -I$(OBJDIR)
|
|
|
|
.PHONY: all buildmanual clean objdir-check
|
|
MANFILE := rockbox-build
|
|
|
|
VERSION= `$(TOOLSDIR)/version.sh $(ROOTDIR)`
|
|
|
|
.PHONY: $(OBJDIR)/version.tex $(OBJDIR)/$(MANFILE).tex
|
|
|
|
all: manual-pdf
|
|
|
|
features: $(OBJDIR)/features.tex
|
|
|
|
objdir-check:
|
|
@if [ "$(OBJDIR)" = "" ]; then echo Run make in you build directory!; false; fi
|
|
|
|
|
|
manual-prep: objdir-check rockbox.tex $(OBJDIR)/CREDITS.tex $(OBJDIR)/version.tex $(OBJDIR)/$(MANFILE).tex
|
|
$(SILENT)mkdir -p $(OBJDIR)
|
|
$(SILENT)find * -type d \! -regex '.*\.svn.*' -exec mkdir -p $(OBJDIR)/{} \;
|
|
$(SILENT)find * -type f \! -regex '.*\.svn.*' -exec cp {} $(OBJDIR)/{} \;
|
|
$(SILENT)mv $(OBJDIR)/Makefile.pdflatex $(OBJDIR)/Makefile
|
|
|
|
$(OBJDIR)/$(MANFILE).tex:
|
|
@echo "creating $(notdir $@)"
|
|
$(SILENT)printf "\\\\newcommand{\\\\platform}{${MANUALDEV}}\n" > $@
|
|
$(SILENT)printf "\\\\newcommand{\\\\buildversion}{$(VERSION)}\n" >> $@
|
|
$(SILENT)printf "\\\\input{rockbox.tex}\n" >> $@
|
|
|
|
$(OBJDIR)/CREDITS.tex: $(DOCSDIR)/CREDITS
|
|
@echo "processing $(notdir $^)"
|
|
$(SILENT)perl credits.pl < $(DOCSDIR)/CREDITS > $@
|
|
|
|
$(OBJDIR)/version.tex:
|
|
@echo "creating $(notdir $@)"
|
|
$(SILENT)printf "%s%%" $(VERSION) > $@
|
|
|
|
$(OBJDIR)/features.tex: $(ROOTDIR)/apps/features.txt
|
|
@echo "processing $(notdir $^)"
|
|
$(SILENT)mkdir -p `dirname $@`
|
|
$(SILENT) for f in \
|
|
$$(cat $< | $(HOSTCC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) \
|
|
$(TARGET) $(DEFINES) $(EXTRA_DEFINES) -E -P -imacros "config.h" \
|
|
-imacros "button.h" - | grep -v "^\#" | grep -v "^$$"); \
|
|
do feat="$$feat\\n\\\\edef\\\\UseOption{\\\\UseOption,$$f}"; done ; \
|
|
printf "$$feat" > $@
|
|
|
|
manual-pdf: objdir-check features manual-prep rockbox.tex
|
|
$(SILENT)$(MAKE) -C $(OBJDIR) buildmanual
|
|
|
|
manual-html: objdir-check features manual-prep rockbox.tex
|
|
$(SILENT)$(MAKE) -C $(OBJDIR) buildhtml
|
|
|
|
manual-txt: manual-html
|
|
$(SILENT)$(MAKE) -C $(OBJDIR) buildtxt
|
|
|
|
manual-txt-zip: manual-txt
|
|
$(SILENT)$(MAKE) -C $(OBJDIR) txtzip
|
|
|
|
manual-zip: manual-html
|
|
$(SILENT)$(MAKE) -C $(OBJDIR) htmlzip
|
|
|
|
clean: objdir-check
|
|
$(SILENT)rm -rf $(OBJDIR)/manual $(OBJDIR)/*.pdf
|
|
$(SILENT)rm -rf $(OBJDIR)/html $(OBJDIR)/txt
|