diff options
author | rillig <rillig@pkgsrc.org> | 2008-12-15 11:03:49 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2008-12-15 11:03:49 +0000 |
commit | 9a009cf3a3996a6a0d5346c9f1206eff0596fade (patch) | |
tree | 2bc55fb7cdcc9e18b5b7d0ef0453c0af5801c2b3 /mk | |
parent | 6f8cd07b1f5a73fd9e370d178bf5ba5060f44b9a (diff) | |
download | pkgsrc-9a009cf3a3996a6a0d5346c9f1206eff0596fade.tar.gz |
Made the code shorter.
The info messages can be omitted. At least for ELF binaries, the code is
sufficiently stable.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/check/check-stripped.mk | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/mk/check/check-stripped.mk b/mk/check/check-stripped.mk index 5cda390b863..6caa5d50e38 100644 --- a/mk/check/check-stripped.mk +++ b/mk/check/check-stripped.mk @@ -1,4 +1,4 @@ -# $NetBSD: check-stripped.mk,v 1.1 2008/02/13 15:02:20 rillig Exp $ +# $NetBSD: check-stripped.mk,v 1.2 2008/12/15 11:03:49 rillig Exp $ # # This file checks that after installation, all binaries conform to the # setting of INSTALL_UNSTRIPPED. @@ -43,16 +43,17 @@ _check-stripped: error-check .PHONY ${CHECK_STRIPPED_SKIP:@p@${p}) continue ;;@} \ *) ;; \ esac; \ - test -x "$$file" || continue; \ - if [ ! -r "$$file" ]; then \ - ${DELAYED_WARNING_MSG} "[check-stripped.mk] File \"${DESTDIR}${PREFIX}/$$file\" cannot be read."; \ + dpfile=${DESTDIR}${PREFIX}/$$file; \ + test -x "$$dpfile" || continue; \ + if [ ! -r "$$dpfile" ]; then \ + ${DELAYED_WARNING_MSG} "[check-stripped.mk] File \"$$dpfile\" cannot be read."; \ continue; \ fi; \ - ftype=`LANG=C LC_ALL=C ${FILE_CMD} ./$$file`; \ + ftype=`LC_ALL=C ${FILE_CMD} ./$$dpfile`; \ case $$want_stripped,$$ftype in \ - yes,*:*\ ELF\ *,\ not\ stripped*) ${DELAYED_ERROR_MSG} "[check-stripped.mk] ${DESTDIR}${PREFIX}/$$file should be stripped, but is not.";; \ - no,*:*\ ELF\ *,\ stripped*) ${DELAYED_ERROR_MSG} "[check-stripped.mk] ${DESTDIR}${PREFIX}/$$file should NOT be stripped, but it is.";; \ - no,*:*\ ELF\ *,\ not\ stripped*) ${INFO_MSG} "[check-stripped.mk] ${DESTDIR}${PREFIX}/$$file is not stripped (ok).";; \ - yes,*:*\ ELF\ *,\ stripped*) ${INFO_MSG} "[check-stripped.mk] ${DESTDIR}${PREFIX}/$$file is stripped (ok).";; \ + yes,*:*\ ELF\ *,\ not\ stripped*) ${DELAYED_ERROR_MSG} "[check-stripped.mk] $$dpfile should be stripped, but is not.";; \ + no,*:*\ ELF\ *,\ stripped*) ${DELAYED_ERROR_MSG} "[check-stripped.mk] $$dpfile should NOT be stripped, but it is.";; \ + no,*:*\ ELF\ *,\ not\ stripped*) : ${INFO_MSG} "[check-stripped.mk] $$dpfile is not stripped (ok).";; \ + yes,*:*\ ELF\ *,\ stripped*) : ${INFO_MSG} "[check-stripped.mk] $$dpfile is stripped (ok).";; \ esac; \ done |