Makefile 1.1 KB

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