chiark / gitweb /
build-sys: assemble HTML in docs/html
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 8 Mar 2013 15:27:44 +0000 (10:27 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 9 Mar 2013 13:47:50 +0000 (08:47 -0500)
The goal is to be able to preview how the documenation
will look when uploaded. Just point your browser at
   docs/html/man/index.html.

Makefile.am
docs/.gitignore

index 6634a8c..bae7385 100644 (file)
@@ -104,6 +104,7 @@ UNINSTALL_EXEC_HOOKS =
 INSTALL_DATA_HOOKS =
 UNINSTALL_DATA_HOOKS =
 DISTCLEAN_LOCAL_HOOKS =
+CLEAN_LOCAL_HOOKS =
 pkginclude_HEADERS =
 noinst_LTLIBRARIES =
 lib_LTLIBRARIES =
@@ -518,16 +519,38 @@ CLEANFILES += \
        $(man_MANS) \
        $(HTML_FILES)
 
+noinst_DATA += \
+       docs/html/libudev \
+       docs/html/gudev \
+       docs/html/man
+
+DISTCLEAN_LOCAL_HOOKS += clean-html-links
+
+clean-html-links:
+       rm -f docs/html/libudev docs/html/gudev docs/html/man
+
 if HAVE_PYTHON
 noinst_DATA += \
        man/index.html
 
 CLEANFILES += \
-       man/index.html
+       man/index.html
 
-man/index.html:
+man/index.html: man/systemd.index.html
        $(AM_V_GEN)$(LN_S) -f systemd.index.html $@
 
+docs/html/libudev:
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_LN)$(LN_S) -f ../libudev/html $@
+
+docs/html/gudev:
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_LN)$(LN_S) -f ../gudev/html $@
+
+docs/html/man:
+       $(AM_V_at)$(MKDIR_P) $(dir $@)
+       $(AM_V_LN)$(LN_S) -f ../../man $@
+
 NON_INDEX_XML_FILES = $(filter-out man/systemd.index.xml,$(XML_FILES))
 
 XML_GLOB = $(wildcard $(top_srcdir)/man/*.xml $(top_srcdir)/man/*.xml.in $(top_builddir)/man/*.xml)
@@ -3520,8 +3543,8 @@ PAPER = $(shell cat /etc/papersize 2>/dev/null || echo a4)
 SPHINXOPTS = -D latex_paper_size=$(PAPER)
 sphinx-%:
        $(AM_V_at)test -n "$(SPHINX_BUILD)" || { echo " *** sphinx-build is not available"; exit 1; }
-       $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/python-systemd/
-       $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/python-systemd/
+       $(AM_V_GEN)PYTHONPATH=$(DESTDIR)$(pyexecdir) LD_LIBRARY_PATH=$(DESTDIR)$(libdir) $(SPHINX_BUILD) -b $* $(SPHINXOPTS) $(top_srcdir)/src/python-systemd/docs $(top_builddir)/docs/html/python-systemd/
+       $(AM_V_at)echo Output has been generated in $(abs_top_builddir)/docs/html/python-systemd/
 
 destdir-sphinx: all
        dir="$$(mktemp -d /tmp/systemd-install.XXXXXX)" && \
@@ -3529,6 +3552,11 @@ destdir-sphinx: all
                $(MAKE) DESTDIR="$$dir" sphinx-html && \
                rm -rf "$$dir"
 
+CLEAN_LOCAL_HOOKS += clean-sphinx
+
+clean-sphinx:
+       -rm -rf docs/html/python-systemd/
+
 # ------------------------------------------------------------------------------
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
@@ -3802,7 +3830,7 @@ install-data-hook: $(INSTALL_DATA_HOOKS)
 
 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
 
-clean-local:
+clean-local: $(CLEAN_LOCAL_HOOKS)
        rm -rf $(abs_srcdir)/install-tree
        rm -f $(abs_srcdir)/hwdb/usb.ids $(abs_srcdir)/hwdb/pci.ids $(abs_srcdir)/hwdb/oui.txt \
               $(abs_srcdir)/hwdb/iab.txt
index e9fed44..f48033d 100644 (file)
@@ -1 +1,2 @@
 /gtk-doc.make
+/html/