1ifeq ($(TOPDIR),) 2 TOPDIR:=${CURDIR}/.. 3endif 4PKG_NAME=docs 5 6all: compile 7 8include $(TOPDIR)/rules.mk 9include $(INCLUDE_DIR)/prereq.mk 10 11MAIN = openwrt.tex 12DEPS = $(MAIN) Makefile config.tex network.tex network-scripts.tex network-scripts.tex wireless.tex build.tex adding.tex bugs.tex debugging.tex $(TMP_DIR)/.prereq-docs 13 14compile: $(TMP_DIR)/.prereq-docs 15 $(NO_TRACE_MAKE) cleanup 16 latex $(MAIN) 17 $(NO_TRACE_MAKE) openwrt.pdf openwrt.html 18 $(NO_TRACE_MAKE) cleanup 19 20$(TMP_DIR)/.prereq-docs: 21 mkdir -p $(TMP_DIR) 22 $(NO_TRACE_MAKE) prereq 23 touch $@ 24 25openwrt.html: $(DEPS) 26 htlatex $(MAIN) 27 28openwrt.pdf: $(DEPS) 29 pdflatex $(MAIN) 30 31clean: cleanup 32 rm -f openwrt.pdf openwrt.html openwrt.css 33 34cleanup: FORCE 35 rm -f *.log *.aux *.toc *.out *.lg *.dvi *.idv *.4ct *.4tc *.xref *.tmp *.dvi 36 37$(eval $(call RequireCommand,latex, \ 38 You need to install LaTeX to build the OpenWrt documentation \ 39)) 40$(eval $(call RequireCommand,pdflatex, \ 41 You need to install PDFLaTeX to build the OpenWrt documentation \ 42)) 43$(eval $(call RequireCommand,htlatex, \ 44 You need to install tex4ht to build the OpenWrt documentation \ 45)) 46 47FORCE: 48.PHONY: FORCE 49