Mercurial > hg > octave-nkf
view src/mk-pkg-add @ 6565:3e2cfed6c87e before-object-branch
[project @ 2007-04-23 20:31:52 by jwe]
author | jwe |
---|---|
date | Mon, 23 Apr 2007 20:31:52 +0000 |
parents | 4e6be3c306f1 |
children | c05fbb1b7e1f |
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\", fullfile (fileparts (mfilename (\"fullpath\")), \"$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 $?