about summary refs log tree commit diff
path: root/Src/zsh.mdd
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/zsh.mdd
parentad5f9584c11561eb8d58b155aac018a771548e75 (diff)
downloadzsh-49a1ad7516f84672dcea24bc6178f87f92789c7c.tar.gz
zsh-49a1ad7516f84672dcea24bc6178f87f92789c7c.tar.xz
zsh-49a1ad7516f84672dcea24bc6178f87f92789c7c.zip
13194: change in module configuration system
Diffstat (limited to 'Src/zsh.mdd')
-rw-r--r--Src/zsh.mdd36
1 files changed, 21 insertions, 15 deletions
diff --git a/Src/zsh.mdd b/Src/zsh.mdd
index 78746a873..56cd081e8 100644
--- a/Src/zsh.mdd
+++ b/Src/zsh.mdd
@@ -1,4 +1,7 @@
 name=zsh/main
+link=static
+load=yes
+# load=static should replace use of alwayslink
 
 nozshdep=1
 alwayslink=1
@@ -57,24 +60,27 @@ zshpaths.h: Makemod $(CONFIG_INCS)
 	    echo "Updated \`zshpaths.h'." ; \
 	fi
 
-bltinmods.list: modules.stamp modules-bltin xmods.conf mkbltnmlst.sh
-	srcdir='$(sdir)' MODBINS='modules-bltin' \
-	XMODCF='$(sdir)/xmods.conf' $(SHELL) $(sdir)/mkbltnmlst.sh $@
+bltinmods.list: modules.stamp mkbltnmlst.sh $(dir_top)/config.modules
+	srcdir='$(sdir)' CFMOD='$(dir_top)/config.modules' \
+	  $(SHELL) $(sdir)/mkbltnmlst.sh $@
 
-zshxmods.h: modules-bltin xmods.conf
+zshxmods.h: $(dir_top)/config.modules
 	@echo "Creating \`$@'."
 	@( \
-	    binmods=`sed 's/^/ /;s/$$/ /' modules-bltin`; \
-	    for mod in `sed 's/^.* //' $(sdir_src)/xmods.conf`; do \
-		q_mod=`echo $$mod | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`; \
-		case $$binmods in \
-		    *" $$mod "*) \
-			echo "#define    LINKED_XMOD_$$q_mod 1" ;; \
-		    *)  echo "#ifdef DYNAMIC"; \
-			echo "# define UNLINKED_XMOD_$$q_mod 1"; \
-			echo "#endif" ;; \
-		esac; \
-	    done \
+	    for q_mod in `grep ' load=yes' $(dir_top)/config.modules | \
+	      grep ' link=static' | sed -e '/^#/d' -e 's/ .*//' \
+	        -e 's/^name=//' -e 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`; do \
+		test x$q_mod = xzshQsmain && continue; \
+	        echo "#define LINKED_XMOD_$$q_mod 1"; \
+	    done; \
+	    for q_mod in `grep ' load=yes' $(dir_top)/config.modules | \
+	      grep ' link=dynamic' | sed -e '/^#/d' -e 's/ .*//' \
+	        -e 's/^name=//' -e 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`; do \
+		test x$q_mod = x && continue; \
+	        echo "#ifdef DYNAMIC"; \
+		echo "# define UNLINKED_XMOD_$$q_mod 1"; \
+		echo "#endif"; \
+	    done; \
 	) > $@
 
 clean-here: clean.zsh