about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2013-06-13 09:46:43 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2013-06-13 09:46:43 -0700
commite36e7d9adea7b8eab8f561e180f78b9f8e4eee5c (patch)
tree893f26aa779246d4d1bdb6c794cb51504eb2ea46
parent77feb2c1c4a852d4494af0783f0c33d6835fd4bb (diff)
downloadzsh-e36e7d9adea7b8eab8f561e180f78b9f8e4eee5c.tar.gz
zsh-e36e7d9adea7b8eab8f561e180f78b9f8e4eee5c.tar.xz
zsh-e36e7d9adea7b8eab8f561e180f78b9f8e4eee5c.zip
31474: create patchlevel.h correctly when using a separate build tree
-rw-r--r--ChangeLog5
-rw-r--r--Makefile.in2
-rw-r--r--Src/zsh.mdd2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9f7987b34..f85626314 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-06-13  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 31474: Makefile.in, Src/zsh.mdd: create patchlevel.h correctly
+	when running make in a separate build tree
+
 2013-06-09  Barton E. Schaefer  <schaefer@zsh.org>
 
 	* 31466: .cvsignore, .gitignore: Cause git and cvs to ignore
diff --git a/Makefile.in b/Makefile.in
index a29ab7885..197276c42 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -160,7 +160,7 @@ targz-src: $(DISTNAME).tar.gz
 $(DISTNAME).tar.gz: FORCE
 	@$(sdir_top)/Util/mkdisttree.sh $(DISTNAME) $(sdir_top) $(dir_top) SRC \
 	    $(MAKE) $(MAKEDEFS)
-	echo '#define ZSH_PATCHLEVEL "'`git describe --tags --long`'"' >$(DISTNAME)/Src/patchlevel.h.release
+	echo '#define ZSH_PATCHLEVEL "'`cd $(sdir_top) && git describe --tags --long`'"' >$(DISTNAME)/Src/patchlevel.h.release
 	tar cf - $(DISTNAME) | gzip -9 > $@
 	rm -rf $(DISTNAME)
 
diff --git a/Src/zsh.mdd b/Src/zsh.mdd
index 0fec5c363..4bc884b3d 100644
--- a/Src/zsh.mdd
+++ b/Src/zsh.mdd
@@ -43,7 +43,7 @@ patchlevel.h: FORCE
 	@if [ -f $(sdir)/$@.release ]; then \
 	  cp -f $(sdir)/$@.release $@; \
 	else \
-	  echo '#define ZSH_PATCHLEVEL "'`git describe --tags --long`'"' > $@.tmp; \
+	  echo '#define ZSH_PATCHLEVEL "'`cd $(sdir) && git describe --tags --long`'"' > $@.tmp; \
 	  cmp $@ $@.tmp && rm -f $@.tmp || mv $@.tmp $@; \
 	fi
 FORCE: