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.)
master
Drake 3 years ago
parent 84ca84611f
commit 98e6ace84d

@ -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:

Loading…
Cancel
Save