changeset 2644:f9492444329e

[project @ 1997-01-29 17:27:20 by jwe]
author jwe
date Wed, 29 Jan 1997 17:27:20 +0000
parents c69a267054d1
children 8fbc52dfc4c3
files src/mk-oct-links src/mk-oct-links.in
diffstat 2 files changed, 42 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
new file mode 100755
--- /dev/null
+++ b/src/mk-oct-links
@@ -0,0 +1,42 @@
+#! /bin/sh -e
+
+# Create additional links to .oct files that define more than one
+# function.
+
+# If the first arg is -p, only print the links we need to make.
+
+# The first non-option 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.
+
+print_only=false
+if [ $1 = "-p" ]; then
+  print_only=true
+  shift
+fi
+
+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 *( *//' -e 's/ *,.*$//' |\
+        sort -u`
+  if [ -n "$fcns" ]; then
+    for n in $fcns; do
+      if [ "$n" = "$base" ]; then
+        true
+      else
+        if $print_only; then
+          echo $base.oct $n.oct
+        else
+          echo "creating link $n.oct -> $base.oct"
+          ( cd $links_dir; rm -f $n.oct; ln $base.oct $n.oct )
+        fi
+      fi
+    done
+  fi
+done
+
+exit $?
deleted file mode 100755
--- a/src/mk-oct-links.in
+++ /dev/null
@@ -1,44 +0,0 @@
-#! /bin/sh -e
-
-# Create additional links to .oct files that define more than one
-# function.
-
-# If the first arg is -p, only print the links we need to make.
-
-# The first non-option 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.
-
-print_only=false
-if [ $1 = "-p" ]; then
-  print_only=true
-  shift
-fi
-
-LN_S="%LN_S%"
-
-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 *( *//' -e 's/ *,.*$//' |\
-        sort -u`
-  if [ -n "$fcns" ]; then
-    for n in $fcns; do
-      if [ "$n" = "$base" ]; then
-        true
-      else
-        if $print_only; then
-          echo $base.oct $n.oct
-        else
-          echo "creating link $n.oct -> $base.oct"
-          ( cd $links_dir; rm -f $n.oct; $LN_S $base.oct $n.oct )
-        fi
-      fi
-    done
-  fi
-done
-
-exit $?