[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/master] add a help2man man page for the nodejs browser proxy



commit f2ef8d1080be67ea51488615336e8fe21df469fc
Author: Ximin Luo <infinity0@xxxxxxx>
Date:   Mon Dec 2 16:04:03 2013 +0000

    add a help2man man page for the nodejs browser proxy
---
 proxy/modules/nodejs/.gitignore |    1 +
 proxy/modules/nodejs/Makefile   |   18 ++++++++++++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/proxy/modules/nodejs/.gitignore b/proxy/modules/nodejs/.gitignore
index 72f73ff..ca29a34 100644
--- a/proxy/modules/nodejs/.gitignore
+++ b/proxy/modules/nodejs/.gitignore
@@ -1,3 +1,4 @@
 /flashproxy.js
+/flashproxy.1
 /node_modules
 /npm-debug.log
diff --git a/proxy/modules/nodejs/Makefile b/proxy/modules/nodejs/Makefile
index 9b1f8ce..4c93948 100644
--- a/proxy/modules/nodejs/Makefile
+++ b/proxy/modules/nodejs/Makefile
@@ -1,5 +1,19 @@
-.PHONY: prepublish
+.PHONY: all prepublish
+topsrcdir = ../../..
+
+ALL_DST = flashproxy.js flashproxy.1
+VERSION = $(shell sed -nre 's/^\s*"version"\s*:\s*"([^"]+)".*/\1/gp' package.json)
+
+all: $(ALL_DST)
 
 prepublish: flashproxy.js
-flashproxy.js: ../../flashproxy.js
+flashproxy.js: $(topsrcdir)/proxy/flashproxy.js
 	cp -f $< $@
+
+flashproxy.1: main.js flashproxy.js $(topsrcdir)/mkman.sh $(topsrcdir)/mkman.inc Makefile
+	./main.js --help \
+	  | sed -re 's,/\S+/nodejs ./main.js,flashproxy,g' \
+	  | $(topsrcdir)/mkman.sh flashproxy "$(VERSION)" "The flashproxy standalone nodejs proxy" "$(VERSION)" > "$@"
+
+clean:
+	rm -f $(ALL_DST)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits