diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1998-02-18 15:16:49 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1998-02-18 15:16:49 +0000 |
commit | a84b871509e3a64e9955e49cab546acc1cfaee00 (patch) | |
tree | 929f0976c728b96640cfc66f84691f3d6e13e272 /usr.bin/cpp/cpp.sh | |
parent | 6bb8b19d3c96deb685911d4fb666cbe2249b3a4a (diff) |
Deal much better with installation problems
Diffstat (limited to 'usr.bin/cpp/cpp.sh')
-rw-r--r-- | usr.bin/cpp/cpp.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/cpp/cpp.sh b/usr.bin/cpp/cpp.sh index c00958801c8..e762de91a5d 100644 --- a/usr.bin/cpp/cpp.sh +++ b/usr.bin/cpp/cpp.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: cpp.sh,v 1.2 1996/06/26 05:32:24 deraadt Exp $ +# $OpenBSD: cpp.sh,v 1.3 1998/02/18 15:16:48 niklas Exp $ # # Copyright (c) 1990 The Regents of the University of California. @@ -52,7 +52,11 @@ FOUNDFILES=no CPP=/usr/libexec/cpp if [ ! -x $CPP ]; then - CPP=`cc -print-libgcc-file-name | sed -e 's/libgcc\.a/cpp/'`; + CPP=`cc -print-search-dirs | sed -ne '/^install: /s/install: \(.*\)/\1cpp/p'`; + if [ ! -x $CPP ]; then + echo "$0: installation problem: $CPP not found/executable" >&2 + exit 1 + fi fi while [ $# -gt 0 ] |