Commits

Roger Light committed 8787ebf

Generate html man pages with xsltproc as well.

Comments (0)

Files changed (3)

 	mkdir -p dist/mosquitto-${VERSION}
 	cp -r client examples installer lib logo man misc security service src test ChangeLog.txt CMakeLists.txt COPYING Makefile compiling.txt config.h config.mk readme.txt readme-windows.txt mosquitto.conf aclfile.example pwfile.example dist/mosquitto-${VERSION}/
 	cd dist; tar -zcf mosquitto-${VERSION}.tar.gz mosquitto-${VERSION}/
-	for m in libmosquitto.3 mosquitto.8 mosquitto-ssl.7 mosquitto.conf.5 mosquitto_pub.1 mosquitto_sub.1 mqtt.7; \
+	for m in man/*.xml; \
 		do \
-		hfile=$$(echo $${m} | sed -e 's/\./-/g'); \
-		man2html man/$${m} > dist/$${hfile}.html; \
-		sed -i 's#\(http://localhost\)\?/cgi-bin/man/man2html?8+mosquitto#mosquitto-8.html#' dist/$${hfile}.html; \
-		sed -i 's#\(http://localhost\)\?/cgi-bin/man/man2html?3+libmosquitto#libmosquitto-3.html#' dist/$${hfile}.html; \
-		sed -i 's#\(http://localhost\)\?/cgi-bin/man/man2html?5+mosquitto.conf#mosquitto-conf-5.html#' dist/$${hfile}.html; \
-		sed -i 's#\(http://localhost\)\?/cgi-bin/man/man2html?1+mosquitto_pub#mosquitto_pub-1.html#' dist/$${hfile}.html; \
-		sed -i 's#\(http://localhost\)\?/cgi-bin/man/man2html?1+mosquitto_sub#mosquitto_sub-1.html#' dist/$${hfile}.html; \
-		sed -i 's#\(http://localhost\)\?/cgi-bin/man/man2html?7+mqtt#mqtt-7.html#' dist/$${hfile}.html; \
-		sed -i 's#\(http://localhost\)\?/cgi-bin/man/man2html?7+mosquitto-ssl#mosquitto-ssl-7.html#' dist/$${hfile}.html; \
-		sed -i 's#\(http://localhost\)\?/cgi-bin/man/man2html?5+hosts_access#http://www.linuxmanpages.com/man5/hosts_access.5.php#' dist/$${hfile}.html; \
-		sed -i 's#\(http://localhost\)\?/cgi-bin/man/man2html#http://mosquitto.org/#' dist/$${hfile}.html; \
-		sed -i '1,2d' dist/$${hfile}.html; \
+		hfile=$$(echo $${m} | sed -e 's#man/\(.*\)\.xml#\1#' | sed -e 's/\./-/g'); \
+		$(XSLTPROC) $(DB_HTML_XSL) $${m} > dist/$${hfile}.html; \
 	done
 
 
 VERSION=0.15.90
 TIMESTAMP:=$(shell date "+%F %T%z")
 
+# Man page generation requires xsltproc and docbook-xsl
+XSLTPROC=xsltproc
+# For html generation
+DB_HTML_XSL=/usr/share/xml/docbook/stylesheet/docbook-xsl/html/docbook.xsl
+
 #MANCOUNTRIES=en_GB
 
 CFLAGS=-Wall -ggdb -O2
 
 .PHONY : all clean install uninstall dist 
 
-# Requires xsltproc and docbook-xsl
-XSLTPROC=xsltproc
-
 all :  mosquitto.8 mosquitto-ssl.7 mosquitto.conf.5 mosquitto_pub.1 mosquitto_sub.1 mqtt.7 libmosquitto.3
 
 clean :