From 3fbfb0f2813be9774f6c1a721ced07efc6e129cf Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Mon, 24 Jul 1995 22:50:17 +0000 Subject: [PATCH] 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. --- usr.bin/strip/Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/usr.bin/strip/Makefile b/usr.bin/strip/Makefile index 1a699e72de4d..e2ba84a45d0a 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