Mercurial > hg > octave-lojdl
comparison src/mk-pkg-add @ 5539:b800ae36fc6a
[project @ 2005-11-16 18:45:32 by jwe]
author | jwe |
---|---|
date | Wed, 16 Nov 2005 18:45:32 +0000 |
parents | e107161b8ca3 |
children | d090d39bb82c |
comparison
equal
deleted
inserted
replaced
5538:8d2903f71c96 | 5539:b800ae36fc6a |
---|---|
1 #! /bin/sh -e | 1 #! /bin/sh -e |
2 | |
3 # Create additional links to .oct files that define more than one | |
4 # function. | |
5 | |
6 # If the first arg is --print, only print the links we need to make. | |
7 | |
8 # The first non-option arg is taken as the directory where the .oct | |
9 # files are installed. The remaining arguments should be the list of | |
10 # .df files corresponding to the source files that were used to | |
11 # create the .oct files. | |
12 | 2 |
13 SED=${SED:-'sed'} | 3 SED=${SED:-'sed'} |
14 | 4 |
5 install=false | |
15 if [ $1 = "--prefix" ]; then | 6 if [ $1 = "--prefix" ]; then |
16 shift | 7 shift |
17 prefix="$1" | 8 prefix="$1" |
18 shift | 9 shift |
10 elif [ $1 = "--install" ]; then | |
11 install=true | |
12 shift | |
13 fi | |
14 | |
15 if [ $# -gt 0 ]; then | |
16 if $install; then | |
17 cat <<EOF | |
18 __octfiledir__ = strrep (octave_config_info ("octfiledir"), | |
19 octave_config_info ("prefix"), | |
20 OCTAVE_HOME); | |
21 EOF | |
22 fi | |
19 fi | 23 fi |
20 | 24 |
21 for f in "$@"; do | 25 for f in "$@"; do |
22 if [ -f $f ]; then | 26 if [ -f $f ]; then |
23 | 27 |
31 for n in $fcns; do | 35 for n in $fcns; do |
32 if [ "$n" = "$base" ]; then | 36 if [ "$n" = "$base" ]; then |
33 true | 37 true |
34 else | 38 else |
35 if [ -n "$prefix" ]; then | 39 if [ -n "$prefix" ]; then |
36 echo "autoload (\"$n\", \"$prefix/$base.oct\");" | 40 echo "autoload (\"$n\", strcat (\"$prefix\", filesep, \"$base.oct\"));" |
41 elif $install; then | |
42 echo "autoload (\"$n\", strcat (__octfiledir__, filesep, \"$base.oct\"));" | |
37 else | 43 else |
38 echo "autoload (\"$n\", \"$base.oct\");" | 44 echo "autoload (\"$n\", \"$base.oct\");" |
39 fi | 45 fi |
40 fi | 46 fi |
41 done | 47 done |