summaryrefslogtreecommitdiff
path: root/contrib/auto-naming/Sample-Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/auto-naming/Sample-Makefile')
-rw-r--r--contrib/auto-naming/Sample-Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/auto-naming/Sample-Makefile b/contrib/auto-naming/Sample-Makefile
new file mode 100644
index 0000000000..e3e0351df8
--- /dev/null
+++ b/contrib/auto-naming/Sample-Makefile
@@ -0,0 +1,20 @@
+
+all: ../approved-routers
+
+update:
+ wget -q -O - http://tor.noreply.org/tor/status-vote/current/consensus | \
+ ./process-consensus
+
+.PHONY: approved-routers-auto
+approved-routers-auto:
+ ./build-approved-routers > "$@"
+
+.INTERMEDIATE: approved-routers
+approved-routers: approved-routers-auto /etc/tor/approved-routers
+ cat $^ > "$@"
+
+../approved-routers: approved-routers
+ if ! diff -q "$<" "$@"; then \
+ mv "$<" "$@" &&\
+ (! [ -e /var/run/tor/tor.pid ] || kill -HUP `cat /var/run/tor/tor.pid`) ; \
+ fi