[gtk-mac-bundler] Allow user to override install location.



commit 9ecfd3d097371a98530f9cf537e5cb1926501fcd
Author: John Ralls <jralls ceridwen us>
Date:   Sat Nov 20 10:59:20 2021 -0800

    Allow user to override install location.

 Makefile  | 10 ++++++----
 README.md |  9 +++++----
 2 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/Makefile b/Makefile
index 0238879..c463bfc 100644
--- a/Makefile
+++ b/Makefile
@@ -2,15 +2,17 @@ PACKAGE = gtk-mac-bundler
 VERSION = 0.7.4
 OLD_VERSION = 0.7.3
 
-bindir=$(HOME)/.local/bin
+if test "x$(BINDIR)" == "x"; then \
+  BINDIR="$(HOME)/.local/bin"; \
+fi
 
 all:
        @echo 'Run "make install" to install.'
 
 install:
-       @mkdir -p $(bindir)
-       @sed "s,@PATH@,`pwd`,g" < gtk-mac-bundler.in > $(bindir)/gtk-mac-bundler
-       @chmod a+x $(bindir)/gtk-mac-bundler
+       @mkdir -p $(BINDIR)
+       @SED "s,@PATH@,`pwd`,g" < gtk-mac-bundler.in > $(BINDIR)/gtk-mac-bundler
+       @chmod a+x $(BINDIR)/gtk-mac-bundler
 
 distdir = $(PACKAGE)-$(VERSION)
 dist:
diff --git a/README.md b/README.md
index 76c846c..efa670e 100644
--- a/README.md
+++ b/README.md
@@ -18,10 +18,11 @@ module is built in to the Pango library, by using the configure flag:
 
 ## Setting up
 
-Run `make install`; this installs the script into `~/bin` folder. Make sure you
-have that directory in your `PATH`, or use the absolute path when starting
-the script.
-
+Run `make install`; this installs the script into $HOME/.local/bin by
+default. You can set BINDIR in the environment to point somewhere
+else, e.g. `BINDIR="$HOME/.new_local/bin" make install` will put it in
+$HOME/.new_local/bin. Make sure you have that directory in your
+`PATH`, or use the absolute path when starting the script.
 
 ## Prerequisites
 


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