{"thread":{"id":"4392","subject":"[PATCH] Makefile: make customization of installation locations easier.","startedAt":"2006-06-04T20:38:58Z","lastAt":"2006-06-04T20:38:58Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"21223","messageId":"11494535382304-git-send-email-junkio@cox.net","threadId":"4392","inReplyTo":null,"subject":"[PATCH] Makefile: make customization of installation locations easier.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-06-04T20:38:58Z","receivedAt":"2006-06-04T20:38:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Signed-off-by: Junio C Hamano <junkio@cox.net>\n---\n Makefile |   13 +++++++++----\n 1 files changed, 9 insertions(+), 4 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex a7ff69b..d20f823 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1,4 +1,8 @@\n-PREFIX\t= $(HOME)\n+prefix\t= $(HOME)\n+bindir= $(prefix)/bin\n+mandir = $(prefix)/man\n+# DESTDIR=\n+\n LDLIBS  = -lcurses\n CFLAGS\t= -Wall -O2\n DFLAGS\t= -g -DDEBUG -Werror\n@@ -19,14 +23,15 @@ doc: $(DOCS)\n \n install: all\n \tfor prog in $(PROGS); do \\\n-\t\tinstall $$prog $(PREFIX)/bin; \\\n+\t\tinstall $$prog $(DESTDIR)$(bindir); \\\n \tdone\n \n install-doc: doc\n+\tmkdir -p $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5\n \tfor doc in $(DOCS); do \\\n \t\tcase \"$$doc\" in \\\n-\t\t*.1) install $$doc $(PREFIX)/man/man1 ;; \\\n-\t\t*.5) install $$doc $(PREFIX)/man/man5 ;; \\\n+\t\t*.1) install $$doc $(DESTDIR)$(mandir)/man1 ;; \\\n+\t\t*.5) install $$doc $(DESTDIR)$(mandir)/man5 ;; \\\n \t\tesac \\\n \tdone\n \n-- \n1.3.3.gb266\n"}]}