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.mdd9
1 files changed, 9 insertions, 0 deletions
diff --git a/Src/zsh.mdd b/Src/zsh.mdd
index 1cba4b9dc..0d80b9259 100644
--- a/Src/zsh.mdd
+++ b/Src/zsh.mdd
@@ -33,12 +33,21 @@ init.o: bltinmods.list zshpaths.h zshxmods.h
 
 init.o params.o parse.o: version.h
 
+params.o: patchlevel.h
+
 # The main shell doesn't currently need zshcurses.h and zshterm.h,
 # but make sure these are built with the headers.
 # If it did need need them they would be in headers at the top instead.
 version.h: $(sdir_top)/Config/version.mk zshcurses.h zshterm.h
 	echo '#define ZSH_VERSION "'$(VERSION)'"' > $@
 
+patchlevel.h: $(sdir_top)/ChangeLog
+	{ \
+	  echo -n "#define ZSH_PATCHLEVEL "; \
+	  sed -ne 's/^\* *\$$Revision: 1.19 $$/"\1"/p' \
+	  $(sdir_top)/ChangeLog; \
+	} >patchlevel.h
+
 zshcurses.h: ../config.h
 	@if test x$(ZSH_CURSES_H) != x; then \
 	  echo "#include <$(ZSH_CURSES_H)>" >zshcurses.h; \