commit e926cbd6687e633ef58161a921b747ac6182377f Author: David Fifield david@bamsoftware.com Date: Mon Sep 23 17:12:11 2013 -0700
Support DESTDIR in makefiles.
https://www.gnu.org/prep/standards/html_node/DESTDIR.html --- ChangeLog | 3 +++ Makefile | 9 +++++---- facilitator/Makefile | 7 ++++--- websocket-transport/Makefile | 5 +++-- 4 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 3cc3f6a..c4351d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ o Allowed websocket-server to gracefully handle SIGTERM.
+ o Makefiles that install now obey DESTDIR to install relative to a + different root. + Changes in version 1.3 o Added a new observed Google public key pin.
diff --git a/Makefile b/Makefile index 1ccd69a..7aa71fc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ VERSION = 1.3
+DESTDIR = PREFIX = /usr/local BINDIR = $(PREFIX)/bin MANDIR = $(PREFIX)/share/man @@ -20,10 +21,10 @@ all: $(CLIENT_DIST_FILES) $(CLIENT_MAN) a2x --no-xmllint --xsltproc-opts "--stringparam man.th.title.max.length 24" -d manpage -f manpage $<
install: - mkdir -p $(BINDIR) - mkdir -p $(MANDIR)/man1 - cp -f $(CLIENT_BIN) $(BINDIR) - cp -f $(CLIENT_MAN) $(MANDIR)/man1 + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man1 + cp -f $(CLIENT_BIN) $(DESTDIR)$(BINDIR) + cp -f $(CLIENT_MAN) $(DESTDIR)$(MANDIR)/man1
DISTNAME = flashproxy-client-$(VERSION) DISTDIR = dist/$(DISTNAME) diff --git a/facilitator/Makefile b/facilitator/Makefile index 90855d2..07ed125 100644 --- a/facilitator/Makefile +++ b/facilitator/Makefile @@ -1,3 +1,4 @@ +DESTDIR = PREFIX = /usr/local BINDIR = $(PREFIX)/bin
@@ -5,9 +6,9 @@ all: :
install: - mkdir -p $(BINDIR) - cp -f facilitator facilitator-email-poller facilitator-reg-daemon facilitator-reg facilitator.cgi fac.py $(BINDIR) - cp -f init.d/facilitator init.d/facilitator-email-poller init.d/facilitator-reg-daemon /etc/init.d/ + mkdir -p $(DESTDIR)$(BINDIR) + cp -f facilitator facilitator-email-poller facilitator-reg-daemon facilitator-reg facilitator.cgi fac.py $(DESTDIR)$(BINDIR) + cp -f init.d/facilitator init.d/facilitator-email-poller init.d/facilitator-reg-daemon $(DESTDIR)/etc/init.d/
clean: rm -f *.pyc diff --git a/websocket-transport/Makefile b/websocket-transport/Makefile index a791c41..2ce4ffa 100644 --- a/websocket-transport/Makefile +++ b/websocket-transport/Makefile @@ -1,3 +1,4 @@ +DESTDIR = PREFIX = /usr/local BINDIR = $(PREFIX)/bin
@@ -21,8 +22,8 @@ websocket-client: $(GOPATH)/src/websocket-client/*.go go build $(GOBUILDFLAGS) websocket-client
install: - mkdir -p "$(BINDIR)" - cp -f websocket-server "$(BINDIR)" + mkdir -p "$(DESTDIR)$(BINDIR)" + cp -f websocket-server "$(DESTDIR)$(BINDIR)"
clean: rm -f $(PROGRAMS)
tor-commits@lists.torproject.org