diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2002-06-27 01:43:16 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2002-06-27 01:43:16 +0000 |
commit | 0e2749397a279824d29dc26116175646247c908a (patch) | |
tree | ebe1d11466862436b9981359032e3429925d2a73 /Src/mkbltnmlst.sh | |
parent | af04d02643b8203c9804387958abdcd4d5ba8fcb (diff) | |
download | zsh-0e2749397a279824d29dc26116175646247c908a.tar.gz zsh-0e2749397a279824d29dc26116175646247c908a.tar.xz zsh-0e2749397a279824d29dc26116175646247c908a.zip |
17357: Predefine autoloads in zsh emulation only.
Diffstat (limited to 'Src/mkbltnmlst.sh')
-rw-r--r-- | Src/mkbltnmlst.sh | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/Src/mkbltnmlst.sh b/Src/mkbltnmlst.sh index 0ce14da83..8609cc0fd 100644 --- a/Src/mkbltnmlst.sh +++ b/Src/mkbltnmlst.sh @@ -8,22 +8,24 @@ srcdir=${srcdir-`echo $0|sed 's%/[^/][^/]*$%%'`} test "x$srcdir" = "x$0" && srcdir=. test "x$srcdir" = "x" && srcdir=. -MODBINS=${MODBINS-modules-bltin} -XMODCF=${XMODCF-$srcdir/xmods.conf} +CFMOD=${CFMOD-$srcdir/../config.modules} -bin_mods=" zsh/main "`sed 's/^/ /;s/$/ /' $MODBINS` -x_mods=`sed 's/^.* //' $XMODCF` -. ./modules.index +bin_mods="`grep ' link=static' $CFMOD | sed -e '/^#/d' \ +-e 's/ .*/ /' -e 's/^name=/ /'`" + +x_mods="`grep ' load=yes' $CFMOD | sed -e '/^#/d' -e '/ link=no/d' \ +-e 's/ .*/ /' -e 's/^name=/ /'`" trap "rm -f $1; exit 1" 1 2 15 exec > $1 +echo " if (emulation == EMULATE_ZSH) {" for x_mod in $x_mods; do - q_x_mod=`echo $x_mod | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'` - eval "modfile=\$modfile_$q_x_mod" + modfile="`grep '^name='$x_mod' ' $CFMOD | sed -e 's/^.* modfile=//' \ + -e 's/ .*//'`" if test "x$modfile" = x; then - echo >&2 "WARNING: $XMODCF lists non-existent module \`$x_mod' (ignored)" + echo >&2 "WARNING: no name for \`$x_mod' in $CFMOD (ignored)" continue fi case "$bin_mods" in @@ -59,17 +61,22 @@ for x_mod in $x_mods; do done test "x$linked" = xno && echo "#endif" done +echo " }" echo done_mods=" " for bin_mod in $bin_mods; do q_bin_mod=`echo $bin_mod | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'` + modfile="`grep '^name='$bin_mod' ' $CFMOD | sed -e 's/^.* modfile=//' \ + -e 's/ .*//'`" echo "/* linked-in module \`$bin_mod' */" - eval "modfile=\$modfile_$q_bin_mod" unset moddeps . $srcdir/../$modfile for dep in $moddeps; do - case $done_mods in + # This assumes there are no circular dependencies in the builtin + # modules. Better ordering of config.modules would be necessary + # to enforce stricter dependency checking. + case $bin_mods in *" $dep "*) echo " /* depends on \`$dep' */" ;; *) echo >&2 "ERROR: linked-in module \`$bin_mod' depends on \`$dep'" |