tMakefile to install/uninstall files. - plumber - Plumber – a modern approach to plumbing
(HTM) git clone git://r-36.net/plumber
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 6e905f1b6294e0f87dd626318127be0c5a1b399c
(DIR) parent 9e6c24b61ccb5fb2971d05e8a99a100c31c8de73
(HTM) Author: Ian Jones <ian@contractcoder.biz>
Date: Wed, 26 Jan 2022 21:58:55 +0000
Makefile to install/uninstall files.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Diffstat:
Makefile | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
---
(DIR) diff --git a/Makefile b/Makefile
t@@ -1,24 +1,25 @@
.POSIX:
-DESTDIR=$(HOME)/bin
+DESTDIR=$(HOME)
+INSTALL_PATH=$(DESTDIR)$(PREFIX)/bin
ALL_BIN_FILES:=$(shell ls bin)
ALL_OPENER_FILES:=$(shell ls openers)
all:
- @echo "install / uninstall - DESTDIR default is $(HOME)/bin"
+ @echo "install / uninstall - default is $(INSTALL_PATH)"
.PHONY: install uninstall
install:
- @echo "Installing to $(DESTDIR)\n"
- mkdir -p $(DESTDIR)
- cp bin/plumber $(DESTDIR)
- cp bin/opener $(DESTDIR)
- cp -a bin/p $(DESTDIR)
- cp -a bin/plumb $(DESTDIR)
- cp -a bin/Þ $(DESTDIR)
- cp openers/* $(DESTDIR)
+ @echo "Installing to $(INSTALL_PATH)\n"
+ mkdir -p $(INSTALL_PATH)
+ cp bin/plumber $(INSTALL_PATH)
+ cp bin/opener $(INSTALL_PATH)
+ cp -a bin/p $(INSTALL_PATH)
+ cp -a bin/plumb $(INSTALL_PATH)
+ cp -a bin/Þ $(INSTALL_PATH)
+ cp openers/* $(INSTALL_PATH)
@echo "\nRemember to 'export XTERM=<your_preferred_xterminal>' and add it to .mkshrc or .bashrc to make permanent.\n"
uninstall:
- @echo "Uninstalling from $(DESTDIR)\n"
- cd $(DESTDIR);\
+ @echo "Uninstalling from $(INSTALL_PATH)\n"
+ cd $(INSTALL_PATH);\
rm -f $(ALL_BIN_FILES) $(ALL_OPENER_FILES);\
cd -