docs: manual: fix formatting
[platform/upstream/gstreamer.git] / docs / manuals.mak
index ebf65e4..c0fec85 100644 (file)
@@ -87,20 +87,12 @@ $(BUILDDIR)/$(MAIN): $(XML) $(CSS) $(EXTRA_SRC)
        cp ../version.entities $(BUILDDIR) ; \
        cp $(top_srcdir)/docs/url.entities $(BUILDDIR)
 
-# we should switch to xsltproc
-# docbook2html aka jade can't add the encoding easily to the html meta
-# (but we are lazy and just abuse sed to add it)
-# jw -f docbook -b html -d pwg.dsl -o ../html -V '%use-id-as-filename%' $(MAIN)
-# this is a starting point
-# xsltproc --nonet /usr/share/xml/docbook/stylesheet/nwalsh/html/docbook.xsl pwg.xml
-# 
 html/index.html: $(BUILDDIR)/$(MAIN) $(PNG_BUILT) $(FIG_SRC)
        @$(MAKE) check-local
        @echo "*** Generating HTML output ***"
        @-mkdir -p html
        @cp -f $(srcdir)/../image-png $(BUILDDIR)/image.entities
-       @cd $(BUILDDIR) && SP_ENCODING="UTF-8" docbook2html -o ../html -V '%use-id-as-filename%' $(MAIN)
-       @$(SED) -i -e 's/\(^CONTENT.*\)\(.>\)/\1;charset=UTF-8\2/' html/*html
+       @cd $(BUILDDIR) && $(XSLTPROC) -o ../html/ --stringparam chunker.output.encoding UTF-8 --stringparam  use.id.as.filename 1 $(XSLTPROC_FLAGS) "http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl" $(MAIN)
        @test "x$(CSS)" != "x" && \
           echo "Copying .css files: $(CSS)" && \
           cp $(srcdir)/$(CSS) html
@@ -174,7 +166,20 @@ $(BUILDIMAGESDIR)/%.ps: %.png
 # make sure xml validates properly
 check-local: $(BUILDDIR)/$(MAIN)
        @cp -f $(srcdir)/../image-png $(BUILDDIR)/image.entities
-       cd $(BUILDDIR) && xmllint -noout -valid $(MAIN)
+       @cd $(BUILDDIR) && xmllint -noout -valid $(MAIN)
+       @cd $(BUILDDIR) && \
+       if [ `which curl` ]; then \
+    links=`$(XSLTPROC) $(XSLTPROC_FLAGS) --xinclude $(abs_top_srcdir)/docs/list-ulink.xsl $(MAIN) | egrep '^http' | sort | uniq` && \
+    have_error=0 && \
+    for link in $$links; do \
+      code=`curl -s -m20 -o /dev/null -I -w "%{http_code}" $$link`; \
+      if [ \( $$? -ne 0 \) -o \( $$code -gt 399 \) ]; then \
+        echo "exit_status=$$?, http_code=$$code: $$link"; \
+        grep -Hnr "$$link" .; \
+        have_error=1; \
+      fi; \
+    done \
+  fi
 
 # avoid 'cp: cannot create regular file `build/image.entities': File exists'
 # errors during 'make distcheck' by disabling parallel builds