Home | History | Annotate | Download | only in doc
      1 apidir = @htmldir@/api
      2 
      3 # automake normally assumes that man pages are generated files;
      4 # these ones aren't, so we need the dist_ prefix to say that they're
      5 # their own source code
      6 dist_man1_MANS = \
      7 	dbus-cleanup-sockets.1 \
      8 	dbus-launch.1 \
      9 	dbus-monitor.1 \
     10 	dbus-send.1 \
     11 	dbus-uuidgen.1
     12 
     13 # on the other hand, this one is generated
     14 man1_MANS = \
     15 	dbus-daemon.1
     16 
     17 MAN_IN_FILES = dbus-daemon.1.in
     18 
     19 MAN_HTML_FILES = \
     20 	dbus-cleanup-sockets.1.html \
     21 	dbus-daemon.1.html \
     22 	dbus-launch.1.html \
     23 	dbus-monitor.1.html \
     24 	dbus-send.1.html \
     25 	dbus-uuidgen.1.html
     26 
     27 DTDS = \
     28 	busconfig.dtd \
     29 	introspect.dtd
     30 
     31 dist_doc_DATA = system-activation.txt
     32 
     33 # uploaded and distributed, but not installed
     34 STATIC_DOCS = \
     35 	dbus-faq.xml \
     36 	dbus-specification.xml \
     37 	dbus-test-plan.xml \
     38 	dbus-tutorial.xml \
     39 	dcop-howto.txt \
     40 	introspect.xsl \
     41 	$(DTDS)
     42 
     43 EXTRA_DIST = \
     44 	file-boilerplate.c \
     45 	doxygen_to_devhelp.xsl \
     46 	$(STATIC_DOCS) \
     47 	$(MAN_IN_FILES)
     48 
     49 html_DATA =
     50 
     51 dist_html_DATA =
     52 
     53 # diagram.png/diagram.svg aren't really HTML, but must go in the same
     54 # directory as the HTML to avoid broken links
     55 STATIC_HTML = \
     56 	diagram.png \
     57 	diagram.svg \
     58 	$(NULL)
     59 
     60 dist_html_DATA += $(STATIC_HTML)
     61 
     62 # we distribute these in the tarball so users don't necessarily need xmlto
     63 dist_html_DATA += $(XMLTO_OUTPUT)
     64 
     65 XMLTO_OUTPUT=					\
     66 	dbus-faq.html				\
     67 	dbus-specification.html			\
     68 	dbus-test-plan.html			\
     69 	dbus-tutorial.html
     70 
     71 if DBUS_XML_DOCS_ENABLED
     72 dbus-specification.html: dbus-specification.xml
     73 	$(XMLTO) html-nochunks $<
     74 
     75 dbus-test-plan.html: dbus-test-plan.xml
     76 	$(XMLTO) html-nochunks $<
     77 
     78 dbus-tutorial.html: dbus-tutorial.xml
     79 	$(XMLTO) html-nochunks $<
     80 
     81 dbus-faq.html: dbus-faq.xml
     82 	$(XMLTO) html-nochunks $<
     83 endif
     84 
     85 if DBUS_DOXYGEN_DOCS_ENABLED
     86 all-local:: doxygen.stamp
     87 
     88 doxygen.stamp: $(wildcard $(top_srcdir)/dbus/*.[ch])
     89 	$(AM_V_GEN)cd $(top_builddir) && doxygen Doxyfile
     90 	@touch $@
     91 
     92 if DBUS_HAVE_XSLTPROC
     93 html_DATA += dbus.devhelp
     94 
     95 dbus.devhelp: $(srcdir)/doxygen_to_devhelp.xsl doxygen.stamp
     96 	$(XSLTPROC) -o $@ $< api/xml/index.xml
     97 endif
     98 
     99 # this assumes CREATE_SUBDIRS isn't set to YES in Doxyfile
    100 # (which it isn't currently)
    101 install-data-local:: doxygen.stamp
    102 	$(MKDIR_P) $(DESTDIR)$(apidir)
    103 	$(INSTALL_DATA) api/html/* $(DESTDIR)$(apidir)
    104 
    105 uninstall-local::
    106 	rm -f $(DESTDIR)$(apidir)/*.html
    107 	rm -f $(DESTDIR)$(apidir)/*.png
    108 	rm -f $(DESTDIR)$(apidir)/*.css
    109 	rm -f $(DESTDIR)$(apidir)/*.js
    110 	rm -f $(DESTDIR)$(htmldir)/*.html
    111 	rm -f $(DESTDIR)$(docdir)/*.txt
    112 	rm -f $(DESTDIR)$(htmldir)/*.png
    113 	rm -f $(DESTDIR)$(htmldir)/*.svg
    114 	rmdir --ignore-fail-on-non-empty $(DESTDIR)$(apidir) || \
    115 		rmdir $(DESTDIR)$(apidir)
    116 endif
    117 
    118 if DBUS_HAVE_MAN2HTML
    119 html_DATA += $(MAN_HTML_FILES)
    120 
    121 %.1.html: %.1
    122 	$(AM_V_GEN)( $(MAN2HTML) < $< > $@.tmp && mv $@.tmp $@ )
    123 endif
    124 
    125 if DBUS_CAN_UPLOAD_DOCS
    126 BONUS_FILES = \
    127 	$(top_srcdir)/README \
    128 	$(top_srcdir)/HACKING \
    129 	$(top_srcdir)/AUTHORS \
    130 	$(top_srcdir)/NEWS \
    131 	$(top_srcdir)/COPYING \
    132 	$(top_srcdir)/ChangeLog
    133 
    134 dbus-docs: $(STATIC_DOCS) $(dist_doc_DATA) $(dist_html_DATA) $(MAN_HTML_FILES) $(BONUS_FILES) doxygen.stamp
    135 	$(AM_V_at)rm -rf $@ $@.tmp
    136 	$(AM_V_GEN)$(MKDIR_P) $@.tmp/api
    137 	$(AM_V_at)cd $(srcdir) && cp $(STATIC_DOCS) @abs_builddir@/$@.tmp
    138 	$(AM_V_at)cd $(srcdir) && cp $(dist_doc_DATA) @abs_builddir@/$@.tmp
    139 	$(AM_V_at)cd $(srcdir) && cp $(STATIC_HTML) @abs_builddir@/$@.tmp
    140 	$(AM_V_at)cp $(XMLTO_OUTPUT) @abs_builddir@/$@.tmp
    141 	$(AM_V_at)cp $(MAN_HTML_FILES) @abs_builddir@/$@.tmp
    142 	$(AM_V_at)cp $(BONUS_FILES) @abs_builddir@/$@.tmp
    143 	$(AM_V_at)cp -r api/html @abs_builddir@/$@.tmp/api
    144 	$(AM_V_at)mv $@.tmp $@
    145 
    146 dbus-docs.tar.gz: dbus-docs
    147 	$(AM_V_GEN)tar czf $@ $<
    148 
    149 DOC_SERVER = dbus.freedesktop.org
    150 DOC_WWW_DIR = /srv/dbus.freedesktop.org/www
    151 
    152 SPECIFICATION_SERVER = specifications.freedesktop.org
    153 SPECIFICATION_PATH = /srv/specifications.freedesktop.org/www/dbus/1.0
    154 
    155 maintainer-upload-docs: dbus-docs.tar.gz dbus-docs
    156 	scp dbus-docs.tar.gz $(DOC_SERVER):$(DOC_WWW_DIR)/
    157 	rsync -rpvzP --chmod=Dg+s,ug+rwX,o=rX \
    158 		dbus-docs/ $(DOC_SERVER):$(DOC_WWW_DIR)/doc/
    159 	cd $(srcdir) && scp -p $(DTDS) $(SPECIFICATION_SERVER):$(SPECIFICATION_PATH)/
    160 else
    161 maintainer-upload-docs:
    162 	@echo "Can't upload documentation! Re-run configure with"
    163 	@echo "  --enable-doxygen-docs --enable-xml-docs"
    164 	@echo "and ensure that man2html is installed."
    165 	@false
    166 endif
    167 
    168 clean-local:
    169 	rm -f $(html_DATA)
    170 	rm -rf api
    171 	rm -rf dbus-docs dbus-docs.tmp
    172 	rm -f *.1.html
    173 	rm -f doxygen.stamp
    174 
    175 maintainer-clean-local:
    176 	rm -f $(XMLTO_OUTPUT)
    177