Mercurial > hg > octave-lyh
view src/mk-pkg-add @ 5769:2b9a5ce46678
[project @ 2006-04-18 15:57:06 by jwe]
author | jwe |
---|---|
date | Tue, 18 Apr 2006 15:57:06 +0000 |
parents | d090d39bb82c |
children | 20f4bd627a74 |
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=`grep '^ *XDEFUN_DLD_INTERNAL' $f |\ $SED -e 's/XDEFUN_DLD_INTERNAL *( *//' -e 's/ *,.*$//' |\ 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 $?