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.mdd8
1 files changed, 6 insertions, 2 deletions
diff --git a/Src/zsh.mdd b/Src/zsh.mdd
index 420e8fc1d..0fec5c363 100644
--- a/Src/zsh.mdd
+++ b/Src/zsh.mdd
@@ -40,8 +40,12 @@ version.h: $(sdir_top)/Config/version.mk zshcurses.h zshterm.h
 	echo '#define ZSH_VERSION "'$(VERSION)'"' > $@
 
 patchlevel.h: FORCE
-	echo '#define ZSH_PATCHLEVEL "'`git describe --tags --long`'"' > $@.tmp
-	cmp $@ $@.tmp && rm -f $@.tmp || mv $@.tmp $@
+	@if [ -f $(sdir)/$@.release ]; then \
+	  cp -f $(sdir)/$@.release $@; \
+	else \
+	  echo '#define ZSH_PATCHLEVEL "'`git describe --tags --long`'"' > $@.tmp; \
+	  cmp $@ $@.tmp && rm -f $@.tmp || mv $@.tmp $@; \
+	fi
 FORCE:
 
 zshcurses.h: ../config.h