makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # -*- make -*-
  2. BASE=..
  3. SUBDIR=doc
  4. SUBDIRS= $(dir $(wildcard */makefile))
  5. # Bring in the default rules
  6. include ../buildlib/defaults.mak
  7. # Debian Doc SGML Documents
  8. SOURCE = $(wildcard *.sgml)
  9. DEBIANDOC_HTML_OPTIONS=-l en
  10. include $(DEBIANDOC_H)
  11. # Do not use XMLTO, build the manpages directly with XSLTPROC
  12. ifdef XSLTPROC
  13. # generate a list of accepted man page translations
  14. SOURCE = $(patsubst %.xml,%,$(wildcard *.?.xml))
  15. INCLUDES = apt.ent
  16. STYLESHEET=manpage-style.xsl
  17. LOCAL := manpage-$(firstword $(SOURCE))
  18. $(LOCAL)-LIST := $(SOURCE)
  19. # Install generation hooks
  20. doc: $($(LOCAL)-LIST)
  21. veryclean: veryclean/$(LOCAL)
  22. $($(LOCAL)-LIST) :: % : %.xml $(INCLUDES)
  23. echo Creating man page $@
  24. $(XSLTPROC) -o $@ $(STYLESHEET) $<
  25. # Clean rule
  26. .PHONY: veryclean/$(LOCAL)
  27. veryclean/$(LOCAL):
  28. -rm -rf $($(@F)-LIST)
  29. endif
  30. # Chain to the manpage rule
  31. SOURCE = apt.8
  32. include $(MANPAGE_H)
  33. # Examples
  34. SOURCE = examples/apt.conf examples/sources.list examples/configure-index examples/apt-https-method-example.conf
  35. TO = $(DOC)
  36. TARGET = binary
  37. include $(COPY_H)
  38. #.PHONY: headers library clean veryclean all binary program doc doc.pt_BR doc.fr
  39. doc:
  40. for dir in $(SUBDIRS); do\
  41. $(MAKE) -C $$dir $@; \
  42. done
  43. clean: clean-subdirs
  44. veryclean: veryclean-subdirs
  45. clean-subdirs:
  46. for dir in $(SUBDIRS); do\
  47. $(MAKE) -C $$dir clean; \
  48. done
  49. veryclean-subdirs:
  50. for dir in $(SUBDIRS); do\
  51. $(MAKE) -C $$dir veryclean; \
  52. done
  53. ifdef PO4A
  54. doc: po4a
  55. clean: po4a-clean
  56. .PHONY: update-po po4a
  57. update-po:
  58. po4a --previous --no-backups --force --no-translations po4a.conf
  59. po4a-clean:
  60. po4a --previous --rm-backups --rm-translations po4a.conf
  61. po4a:
  62. po4a --previous --no-backups po4a.conf
  63. endif
  64. ifdef DOXYGEN
  65. DOXYGEN_SOURCES = $(shell find $(BASE)/apt-pkg -not -name .\\\#* -and \( -name \*.cc -or -name \*.h \) )
  66. clean: doxygen-clean
  67. doxygen-clean:
  68. rm -fr $(BUILD)/doc/doxygen
  69. rm -f $(BUILD)/doc/doxygen-stamp
  70. $(BUILD)/doc/Doxyfile: Doxyfile.in
  71. (cd $(BUILD) && ./config.status doc/Doxyfile)
  72. $(BUILD)/doc/doxygen-stamp: $(DOXYGEN_SOURCES) $(BUILD)/doc/Doxyfile
  73. rm -fr $(BUILD)/doc/doxygen
  74. $(DOXYGEN) $(BUILD)/doc/Doxyfile
  75. touch $(BUILD)/doc/doxygen-stamp
  76. doc: $(BUILD)/doc/doxygen-stamp
  77. endif