summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/strip/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/usr.bin/strip/Makefile b/usr.bin/strip/Makefile
index 1a699e7..e2ba84a 100644
--- a/usr.bin/strip/Makefile
+++ b/usr.bin/strip/Makefile
@@ -2,9 +2,17 @@
PROG= strip
MAN1= strip.1
-STRIP=
-afterinstall:
- ./strip ${DESTDIR}${BINDIR}/strip
+all: maybe_stripped
+
+maybe_stripped: strip
+ cp -p strip maybe_stripped
+.if ${STRIP:M-s} != ""
+ ./strip maybe_stripped
+.endif
+
+install: maninstall
+ ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
+ maybe_stripped ${DESTDIR}${BINDIR}/strip
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud