about summary refs log tree commit diff
path: root/Src/zsh.mdd
diff options
context:
space:
mode:
Diffstat (limited to 'Src/zsh.mdd')
-rw-r--r--Src/zsh.mdd51
1 files changed, 35 insertions, 16 deletions
diff --git a/Src/zsh.mdd b/Src/zsh.mdd
index 244029d65..ad0d27bfe 100644
--- a/Src/zsh.mdd
+++ b/Src/zsh.mdd
@@ -1,3 +1,5 @@
+name=zsh/main
+
 nozshdep=1
 alwayslink=1
 
@@ -5,28 +7,48 @@ alwayslink=1
 
 objects="builtin.o compat.o cond.o exec.o glob.o hashtable.o \
 hist.o init.o input.o jobs.o lex.o linklist.o loop.o math.o \
-mem.o module.o options.o params.o parse.o prompt.o signals.o \
+mem.o module.o options.o params.o parse.o pattern.o prompt.o signals.o \
 signames.o subst.o text.o utils.o watch.o"
 
 headers="../config.h system.h zsh.h sigcount.h signals.h \
 prototypes.h hashtable.h ztype.h"
 
 :<<\Make
-signames.c: signames.awk @SIGNAL_H@
-	$(AWK) -f $(sdir)/signames.awk @SIGNAL_H@ > $@
+@CONFIG_MK@
+
+signames.c: signames1.awk signames2.awk ../config.h @SIGNAL_H@
+	$(AWK) -f $(sdir)/signames1.awk @SIGNAL_H@ >sigtmp.c
+	$(CPP) sigtmp.c >sigtmp.out
+	$(AWK) -f $(sdir)/signames2.awk sigtmp.out > $@
+	rm -f sigtmp.c sigtmp.out
 
 sigcount.h: signames.c
 	grep 'define.*SIGCOUNT' signames.c > $@
 
 init.o: bltinmods.list zshpaths.h zshxmods.h
 
-params.o: version.h
+init.o params.o: version.h
 
 version.h: $(sdir_top)/Config/version.mk
 	echo '#define ZSH_VERSION "'$(VERSION)'"' > $@
 
-zshpaths.h: FORCE
+zshpaths.h: Makemod $(CONFIG_INCS)
 	@echo '#define MODULE_DIR "'$(MODDIR)'"' > zshpaths.h.tmp
+	@if test x$(sitefndir) != xno; then \
+	  echo '#define SITEFPATH_DIR "'$(sitefndir)'"' >> zshpaths.h.tmp; \
+	fi
+	@if test x$(fndir) != xno; then \
+	  echo '#define FPATH_DIR "'$(fndir)'"' >> zshpaths.h.tmp; \
+	  if test x$(FUNCTIONS_SUBDIRS) != x -a \
+	  x$(FUNCTIONS_SUBDIRS) != xno; then \
+	    fpath_tmp="`for f in $$FUNCTIONS_INSTALL; do \
+	      echo $$f | sed s%/.*%%; \
+	    done | sort | uniq`"; \
+	    fpath_tmp="`echo $$fpath_tmp | sed 's/ /\", \"/g'`"; \
+	    echo "#define FPATH_SUBDIRS { \"$$fpath_tmp\" }" \
+	    >>zshpaths.h.tmp; \
+	  fi; \
+	fi
 	@if cmp -s zshpaths.h zshpaths.h.tmp; then \
 	    rm -f zshpaths.h.tmp; \
 	    echo "\`zshpaths.h' is up to date." ; \
@@ -43,19 +65,16 @@ zshxmods.h: modules-bltin xmods.conf
 	@echo "Creating \`$@'."
 	@( \
 	    binmods=`sed 's/^/ /;s/$$/ /' modules-bltin`; \
-	    for mod in `cat $(sdir_src)/xmods.conf`; do \
+	    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_$$mod 1" ;; \
+			echo "#define    LINKED_XMOD_$$q_mod 1" ;; \
 		    *)  echo "#ifdef DYNAMIC"; \
-			echo "# define UNLINKED_XMOD_$$mod 1"; \
+			echo "# define UNLINKED_XMOD_$$q_mod 1"; \
 			echo "#endif" ;; \
 		esac; \
-	    done; \
-	    echo; \
-	    for mod in $$binmods; do \
-		echo "int boot_$$mod _((Module));"; \
-	    done; \
+	    done \
 	) > $@
 
 clean-here: clean.zsh
@@ -63,9 +82,9 @@ clean.zsh:
 	rm -f sigcount.h signames.c bltinmods.list version.h zshpaths.h zshxmods.h
 
 # This is not properly part of this module, but it is built as if it were.
-main.o: main.c zsh.mdh main.pro
+main.o: main.c zsh.mdh main.epro
 	$(CC) -c -I. $(CPPFLAGS) $(DEFS) $(CFLAGS) -o $@ $(sdir)/main.c
 
-main.pro: $(PROTODEPS)
-proto.zsh: main.pro
+main.syms: $(PROTODEPS)
+proto.zsh: main.epro
 Make