summaryrefslogtreecommitdiffstats
path: root/usr.bin/strip
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-07-24 22:50:17 +0000
committerbde <bde@FreeBSD.org>1995-07-24 22:50:17 +0000
commit6496fec897c7d9bbcc903cd2c2d50a8da7d60aae (patch)
tree29e2884e6798745f12fe455f29555a74b62809a6 /usr.bin/strip
parent2abb3f187ae0fff806fc1dfa1c2d50ffe56b46cb (diff)
downloadFreeBSD-src-6496fec897c7d9bbcc903cd2c2d50a8da7d60aae.zip
FreeBSD-src-6496fec897c7d9bbcc903cd2c2d50a8da7d60aae.tar.gz
Build a stripped copy of `strip' so that it doesn't have to be stripped
at install time. This will allow `install -C' to avoid replacing the installed copy if the new copy is the same. `install -C' would actually work right if `strip' is already installed, but the Makefile doesn't know that and has to work for plain `install'. Stripping should be done by default at link time, but complications would still be required for installing `strip' in case the default is overridden.
Diffstat (limited to 'usr.bin/strip')
-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