changeset 1674:c4649e82dbb4

[project @ 1995-12-27 23:47:44 by jwe] Initial revision
author jwe
date Wed, 27 Dec 1995 23:47:44 +0000
parents 75ac8d38071c
children b66e40443b56
files src/mk-oct-links.in
diffstat 1 files changed, 27 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/mk-oct-links.in	Wed Dec 27 23:47:44 1995 +0000
@@ -0,0 +1,27 @@
+#! /bin/sh
+
+# Create additional links to .oct files that define more than one
+# function.
+
+# The first arg is taken as the directory where the .oct files are
+# installed.  The remaining arguments should be the list of source
+# files that were used to create the .oct files.
+
+links_dir=$1
+shift
+
+for f in "$@"; do
+  base=`basename $f | sed 's/\.cc$//'`
+  fcns=`grep -h '^ *DEFUN_DLD' $f |\
+        sed -e 's/DEFUN_DLD_BUILTIN *( *"//' -e 's/".*$//' |\
+        sort -u`
+  if [ -n "$fcns" ]; then
+    for n in $fcns; do
+      if [ "$n" = "$base" ]; then
+        true
+      else
+        ( cd $links_dir; ln $base.oct $n.oct )
+      fi
+    done
+  fi
+done