Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zsh-3.1.2-zefram3 - first experience



1. mkmakemod.sh scripts doesn't work with default OS /bin/sh. It *does*
work with zsh-3.1.2 in /bin/sh mode :-) I put set -x at the top:

gmake[1]: Entering directory `/SAM/home/bor/build/zsh-3.1.2-zefram3/Src'
( cd /home/bor/src/zsh-3.1.2-zefram3 && /bin/sh Src/mkmodindex.sh Src ) \
    > modules.index.tmp
`modules.index' is up to date.
cd .. && /bin/sh $top_srcdir/Src/mkmakemod.sh Src Makemod
sed_normalise=
    s,^,/,
    s,$,/,
    :1
    s,/\./,/,
    t1
    :2
    s,/[^/.][^/]*/\.\./,/,
    s,/\.[^/.][^/]*/\.\./,/,
    s,/\.\.[^/][^/]*/\.\./,/,
    t2
    s,^/$,.,
    s,^/,,
    s,\(.\)/$,\1,

first_stage=true
second_stage=true
+ test .Src = .-m 
+ test .Src = .-i 
+ echo /home/bor/src/zsh-3.1.2-zefram3 
+ sed 
    s,^,/,
    s,$,/,
    :1
    s,/\./,/,
    t1
    :2
    s,/[^/.][^/]*/\.\./,/,
    s,/\.[^/.][^/]*/\.\./,/,
    s,/\.\.[^/][^/]*/\.\./,/,
    t2
    s,^/$,.,
    s,^/,,
    s,\(.\)/$,\1,
 
top_srcdir=/home/bor/src/zsh-3.1.2-zefram3
the_subdir=Src
the_makefile=Makemod
/home/bor/src/zsh-3.1.2-zefram3/Src/mkmakemod.sh: syntax error at line 239: `(' unexpected
gmake[1]: *** [Makemod] Error 2
gmake[1]: Leaving directory `/SAM/home/bor/build/zsh-3.1.2-zefram3/Src'
gmake: *** [Src] Error 2

I tried two shells (Bourne shell and XPG4 shell) and they bail out in
different places, but with the same message.


2. I don't quite understand what mkmakemod.sh does at the end. Here is
relevant part:

if $second_stage; then

    trap "rm -f $the_subdir/${the_makefile}" 1 2 15

    # config.status requires the pathname for the .in file to be relative
    # to the top of the source tree.  As we have it in the build tree, it
    # is necessary to construct an appropriate pathname.

    case $top_srcdir in
	/*) sdir=$top_srcdir ;;
	*) sdir=`pwd`/$top_srcdir; sdir=`echo $sdir | sed "$sed_normalise"` ;;
    esac
    top_builddir=`echo $sdir | sed -e 's,[^/][^/]*,..,g;s,^/,,'``pwd`

    CONFIG_FILES=$the_subdir/${the_makefile}:$top_builddir/$the_subdir/${the_makefile}.in CONFIG_HEADERS= ./config.status

My setup:

  /home -> /SAM/home
  srcdir = ~/src/zsh-3.1.2-zefram3 == /home/bor/src/zsh-3.1.2-zefram3
   (I run ~/src/zsh-3.1.2-zefram3/configure)
  builddir = ~/build/zsh-3.1.2-zefram3

Now, what hapens when script runs:

+ true
+ trap rm -f Src/Makemod 1 2 15
+ sdir=/home/bor/src/zsh-3.1.2-zefram3 
+ top_builddir=+ echo /home/bor/src/zsh-3.1.2-zefram3
+ top_builddir=+ sed -e s,[^/][^/]*,..,g -e s,^/,,
+ top_builddir=+ pwd
+ top_builddir=../../../../SAM/home/bor/build/zsh-3.1.2-zefram3 
+ CONFIG_FILES=Src/Makemod:../../../../SAM/home/bor/build/zsh-3.1.2-zefram3/Src/Makemod.in CONFIG_HEADERS= ./config.status
creating Src/Makemod
sed: Cannot open /home/bor/src/zsh-3.1.2-zefram3/../../../../SAM/home/bor/build/zsh-3.1.2-zefram3/Src/Makemod.in: No such file or directory
+ exit 0

The problem is, that `pwd' returns "true" pathname, but the srcdir has one
level hidden. I am not shure, if it is a problem of configure (which
should resolve given name) or mkmakemod.sh (ditto). Yes, I know, that I
can always run it in different way. But it should work this way as well.

2. mkmodindex.sh:

   At least my /bin/sh is not happy with [^xyz] pattern. Here is patch:

--- Src/mkmodindex.sh.org	Mon Jan 12 19:19:12 1998
+++ Src/mkmodindex.sh	Mon Jan 12 19:40:47 1998
@@ -16,7 +16,7 @@
     dosubs=false
     for mod in `echo '' $dir/*.mdd '' | sed 's, [^ ]*/, ,g;s,\.mdd , ,g'`; do
 	case "$mod@ $module_list " in
-	    *[^_0-9A-Za-z]*@*)
+	    *[!_0-9A-Za-z]*@*)
 		echo >&2 "WARNING: illegally named module \`$mod' in $dir"
 		echo >&2 "         (ignoring it)"
 		;;

3. makepro.awk fails. I am using nawk. It fails because of unquoted `{' -
it is metacaracter in extended regexp.

--- Src/makepro.awk.org	Mon Jan 12 19:19:11 1998
+++ Src/makepro.awk	Tue Jan 13 12:38:27 1998
@@ -50,7 +50,7 @@
 	if(line ~ /\/\*/)
 	    continue
 	# If it is a function definition, note so.
-	if(line ~ /\) *{.*$/) #}
+	if(line ~ /\) *\{.*$/) #}
 	    isfunc = 1
 	if(sub(/ *[{;].*$/, "", line)) #}
 	    break
@@ -101,7 +101,7 @@
 	sub(/@-.*$/, "", dnam)
 
 	# Put parens etc. back
-	gsub(/@{/, " _((", dcltor)
+	gsub(/@\{/, " _((", dcltor)
 	gsub(/@}/, "))", dcltor)
 	gsub(/@</, "(", dcltor)
 	gsub(/@>/, ")", dcltor)


4. Finally, after I managed to compile it, I lost ZLE!!! All seems to
work, zle.so, comp1.so, compctl.so are loaded, bindkey shows all bindings,
but when I try to use *any* bound character, I get no effects. '^P' gives
fine message `'^P' not found" :-)

Any idea?


-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: borsenkow.msk@xxxxxx
-------------------------------------------------------------------------







Messages sorted by: Reverse Date, Date, Thread, Author