Mercurial > hg > octave-nkf
view src/mk-pkg-add @ 6946:10c7a803b409
[project @ 2007-10-03 14:38:48 by jwe]
author | jwe |
---|---|
date | Wed, 03 Oct 2007 14:38:48 +0000 |
parents | c05fbb1b7e1f |
children | 4270ded9ddc6 |
line wrap: on
line source
#! /bin/sh -e SED=${SED:-'sed'} for f in "$@"; do if [ -f $f ]; then ## Compute and print the autoloads. base=`basename $f | $SED 's/\.df$//'` fcns=`$SED -n -e 's/^ *XDEFUN_DLD_INTERNAL *( *\([^, ]*\)[, ].*$/\1/p' \ -e 's/^ *XDEFUNX_DLD_INTERNAL *( *"\([^"]*\)".*$/\1/p' $f | \ sort -u` if [ -n "$fcns" ]; then for n in $fcns; do if [ "$n" = "$base" ]; then true else echo "autoload (\"$n\", \"$base.oct\");" fi done fi ## Process PKG_ADD directives after autoloads so that all ## necessary functions can be found before they are used. $SED -n -e 's,^//* *PKG_ADD: *,,p' \ -e 's,^/\* *PKG_ADD: *\(.*\) *\*/ *$,\1,p' $f fi done exit $?