X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=docs%2FMakefile;h=9e888a4af2df7fab545631ffe872b16106738ffb;hb=5f23843ea6290fc71f3a3b487fd6129ef2ed092e;hp=543dbebad3de9604bb66a948aa628a36a9336102;hpb=5a1704e3fd578bbf68148a79746579ef234f3d99;p=openwrt-10.03%2F.git diff --git a/docs/Makefile b/docs/Makefile index 543dbebad..9e888a4af 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,15 +1,41 @@ -openwrt.pdf: Makefile openwrt.tex config.tex network.tex network-scripts.tex network-scripts.tex wireless.tex +ifeq ($(TOPDIR),) + TOPDIR:=${CURDIR}/.. +endif + +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/prereq.mk + +MAIN = openwrt.tex +DEPS = $(MAIN) Makefile config.tex network.tex network-scripts.tex network-scripts.tex wireless.tex build.tex adding.tex bugs.tex .prereq + +all: $(MAKE) cleanup - pdflatex openwrt.tex - pdflatex openwrt.tex + latex $(MAIN) + $(MAKE) openwrt.pdf openwrt.html $(MAKE) cleanup + +.prereq: + $(MAKE) prereq + touch $@ + +openwrt.html: $(DEPS) + htlatex $(MAIN) + +openwrt.pdf: $(DEPS) + pdflatex $(MAIN) clean: cleanup - rm -f openwrt.pdf + rm -f openwrt.pdf openwrt.html openwrt.css cleanup: FORCE - rm -f *.log *.aux *.toc *.out + rm -f *.log *.aux *.toc *.out *.lg *.dvi *.idv *.4ct *.4tc *.xref *.tmp *.dvi +$(eval $(call RequireCommand,pdflatex, \ + You need to install LaTeX to build the OpenWrt documentation \ +)) +$(eval $(call RequireCommand,htlatex, \ + You need to install tex4ht to build the OpenWrt documentation \ +)) FORCE: .PHONY: FORCE