[tor-commits] [flashproxy/master] Modified makefile to package man pages.

dcf at torproject.org dcf at torproject.org
Tue Nov 13 04:21:40 UTC 2012


commit 1cdeeb36061f710931732e4156497073d470b298
Author: Alexandre Allaire <alexandre.allaire at mail.mcgill.ca>
Date:   Mon Nov 12 20:10:43 2012 -0500

    Modified makefile to package man pages.
    
    dist target now depends on generated generated man
    pages, added target to generate them using a2x. Also
    added highlighting of an option name in flashproxy-client
    man page.
---
 Makefile                    |   14 ++++++++++++--
 doc/flashproxy-client.1.txt |    2 +-
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index e86c8f5..1f12d46 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,10 @@ BINDIR = $(PREFIX)/bin
 
 VERSION = 0.8
 
-CLIENT_DIST_FILES = flashproxy-client flashproxy-reg-email flashproxy-reg-http README LICENSE torrc
+CLIENT_EXECUTABLES = flashproxy-client flashproxy-reg-email flashproxy-reg-http
+CLIENT_ASCIIDOCS = $(CLIENT_EXECUTABLES:%=doc/%.1.txt)
+CLIENT_MANPAGES = $(CLIENT_EXECUTABLES:%=doc/%.1)
+CLIENT_DIST_FILES = $(CLIENT_EXECUTABLES) README LICENSE torrc
 
 all:
 	:
@@ -23,10 +26,12 @@ test:
 
 DISTNAME = flashproxy-client-$(VERSION)
 DISTDIR = dist/$(DISTNAME)
-dist:
+dist: $(CLIENT_MANPAGES)
 	rm -rf dist
 	mkdir -p $(DISTDIR)
+	mkdir $(DISTDIR)/doc
 	cp -f $(CLIENT_DIST_FILES) $(DISTDIR)
+	cp -f $(CLIENT_MANPAGES) $(DISTDIR)/doc
 	cd dist && zip -q -r -9 $(DISTNAME).zip $(DISTNAME)
 
 dist/$(DISTNAME).zip: $(CLIENT_DIST_FILES)
@@ -37,4 +42,9 @@ sign: dist/$(DISTNAME).zip
 	cd dist && gpg --sign --detach-sign --armor $(DISTNAME).zip
 	cd dist && gpg --verify $(DISTNAME).zip.asc $(DISTNAME).zip
 
+%.1: $(CLIENT_ASCIIDOCS)
+	rm -rf $@
+	a2x --no-xmllint --xsltproc-opts "--stringparam man.th.title.max.length 23" \
+		-d manpage -f manpage $@.txt;
+
 .PHONY: all install clean test dist sign
diff --git a/doc/flashproxy-client.1.txt b/doc/flashproxy-client.1.txt
index abd4415..752f6e2 100644
--- a/doc/flashproxy-client.1.txt
+++ b/doc/flashproxy-client.1.txt
@@ -31,7 +31,7 @@ the "websocket" pluggable transport. In managed mode, the __LOCAL__ port is chos
 arbitrarily instead of defaulting to 9001; however this can be
 overridden by including a __LOCAL__ port in the command. This is the way the
 program should be invoked in a torrc ClientTransportPlugin "exec" line.
-Use the --external option to run as an external proxy that does not
+Use the **--external** option to run as an external proxy that does not
 interact with Tor.
 
 If any of the **--register**, **--register-addr**, or **--register-methods** options are





More information about the tor-commits mailing list