about summary refs log tree commit diff
path: root/Src/zsh.mdd
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2009-01-09 20:28:30 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2009-01-09 20:28:30 +0000
commit18143c322614c6e81648b696d30e743068c24afa (patch)
treef73b3c27953231ae3053d382293c11d8b9b06000 /Src/zsh.mdd
parentcb9360e4453d93f40e2b48cd87d81394a4cda3f4 (diff)
downloadzsh-18143c322614c6e81648b696d30e743068c24afa.tar.gz
zsh-18143c322614c6e81648b696d30e743068c24afa.tar.xz
zsh-18143c322614c6e81648b696d30e743068c24afa.zip
262727: add $ZSH_PATCHLEVEL from ChangeLog revision
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; \