about summary refs log tree commit diff
path: root/scripts/cpp
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-11-02 02:08:57 +0000
committerUlrich Drepper <drepper@redhat.com>2001-11-02 02:08:57 +0000
commit980c4d04493807bbc52b84cd0cf04b5c0338bc6d (patch)
tree055c0b2889a5aa831dc1b8504625264772c21b79 /scripts/cpp
parent2f653c01fcafd030129eb96394303965541ed5b2 (diff)
downloadglibc-980c4d04493807bbc52b84cd0cf04b5c0338bc6d.tar.gz
glibc-980c4d04493807bbc52b84cd0cf04b5c0338bc6d.tar.xz
glibc-980c4d04493807bbc52b84cd0cf04b5c0338bc6d.zip
Update.
	* sunrpc/Makefile (rpcgen-cmd): Use ../scripts/cpp in rpcgen calls.
	* scripts/cpp: New file.
Diffstat (limited to 'scripts/cpp')
-rwxr-xr-xscripts/cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/cpp b/scripts/cpp
new file mode 100755
index 0000000000..4a62f1e5ae
--- /dev/null
+++ b/scripts/cpp
@@ -0,0 +1,21 @@
+#! /bin/sh
+cpp=`which cpp 2>/dev/null`
+if test $? -ne 0; then
+  cpp=`type cpp 2>/dev/null | awk '{ print $NF }'`
+  if test $? -ne 0; then
+    cpp=`gcc -print-file-name=cpp 2>/dev/null`
+    if test $? -ne 0; then
+      if test -x /lib/cpp; then
+        cpp=/lib/cpp
+      else
+        echo "cpp not found" 1>&2
+        exit 1
+      fi
+    fi
+  fi
+fi
+
+exec $cpp $*
+Local Variables:
+mode: sh
+End: