From 98e6ace84d1dfdc1cf8d4fe285bcadc671f1750b Mon Sep 17 00:00:00 2001 From: Ruthenic Date: Thu, 22 Jul 2021 15:56:57 -0400 Subject: [PATCH] Makefile: add EXCLUDE_PROGS option for make install. rm is nowhere near proper completion (that i'd trust, anyways) so i'm adding this so i dont have to install it. in fact, its not installed by default (you'll have to manually specify the variable.) --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 9e03089..b824545 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,9 @@ CC_FLAGS := -Ilib ${CC_FLAGS} ifndef PROGS PROGS := arch basename cat ls pwd rm uname whoami yes endif +ifndef EXCLUDE_PROGS +EXCLUDE_PROGS := rm +endif ifndef DESTDIR DESTDIR := / endif @@ -36,7 +39,13 @@ clean: .PHONY: install install: + @for prog in ${EXCLUDE_PROGS}; do \ + mv bin/$$prog /tmp; \ + done install -m 777 bin/* ${DESTDIR}usr/local/bin + @for prog in ${EXCLUDE_PROGS}; do \ + mv /tmp/$$prog bin; \ + done .PHONY: help help: