summary refs log tree commit diff
path: root/Src/mkmakemod.sh
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2000-11-26 20:01:01 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2000-11-26 20:01:01 +0000
commit49a1ad7516f84672dcea24bc6178f87f92789c7c (patch)
tree95839ab8df06151f9322c89ffe7734b28f36a360 /Src/mkmakemod.sh
parentad5f9584c11561eb8d58b155aac018a771548e75 (diff)
downloadzsh-49a1ad7516f84672dcea24bc6178f87f92789c7c.tar.gz
zsh-49a1ad7516f84672dcea24bc6178f87f92789c7c.tar.xz
zsh-49a1ad7516f84672dcea24bc6178f87f92789c7c.zip
13194: change in module configuration system
Diffstat (limited to 'Src/mkmakemod.sh')
-rw-r--r--Src/mkmakemod.sh21
1 files changed, 14 insertions, 7 deletions
diff --git a/Src/mkmakemod.sh b/Src/mkmakemod.sh
index e0ef05c9c..98b9199df 100644
--- a/Src/mkmakemod.sh
+++ b/Src/mkmakemod.sh
@@ -90,6 +90,8 @@ the_makefile=$2
 
 if $first_stage; then
 
+    dir_top=`echo $the_subdir | sed 's,[^/][^/]*,..,g'`
+
     trap "rm -f $the_subdir/${the_makefile}.in" 1 2 15
     echo "creating $the_subdir/${the_makefile}.in"
     exec 3>&1 >$the_subdir/${the_makefile}.in
@@ -99,12 +101,16 @@ if $first_stage; then
     echo "##### ===== DEFINITIONS ===== #####"
     echo
     echo "makefile = ${the_makefile}"
-    echo "dir_top = "`echo $the_subdir | sed 's,[^/][^/]*,..,g'`
-    echo "subdir = $the_subdir"
+    echo "dir_top = ${dir_top}"
+    echo "subdir = ${the_subdir}"
     echo
 
-    . Src/modules.index
-    bin_mods=" zsh/main "`sed 's/^/ /;s/$/ /' Src/modules-bltin`
+    bin_mods=`grep link=static ./config.modules | \
+    sed -e '/^#/d' -e 's/ .*/ /' -e 's/^name=/ /'`
+    dyn_mods="`grep link=dynamic ./config.modules | \
+    sed -e '/^#/d' -e 's/ .*/ /' -e 's/^name=/ /'`"
+    module_list="${bin_mods}${dyn_mods}"
+
     if grep '%@D@%D%' config.status >/dev/null; then
 	is_dynamic=true
     else
@@ -120,8 +126,8 @@ if $first_stage; then
     all_proto=
     lastsub=//
     for module in $module_list; do
-	q_module=`echo $module | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`
-	eval "modfile=\$modfile_$q_module"
+        modfile="`grep '^name='$module' ' ./config.modules | \
+	  sed -e 's/^.* modfile=//' -e 's/ .*//'`"
 	case $modfile in
 	    $the_subdir/$lastsub/*) ;;
 	    $the_subdir/*/*)
@@ -194,9 +200,10 @@ if $first_stage; then
 	imports=
 	q_moddeps=
 	for dep in $moddeps; do
+	    depfile="`grep '^name='$dep' ' ./config.modules | \
+	      sed -e 's/^.* modfile=//' -e 's/ .*//'`"
 	    q_dep=`echo $dep | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`
 	    q_moddeps="$q_moddeps $q_dep"
-	    eval "depfile=\$modfile_$q_dep"
 	    eval `echo $depfile | sed 's,/\([^/]*\)\.mdd$,;depbase=\1,;s,^,loc=,'`
 	    case "$binmod" in
 		*" $dep "* )