Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: git updates stalled?



At 13:35 +0100 18 Feb 2013, Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
Once that's done, we can arrange to apply Aaron's patch from 30840.
Possibly with modifications as per 30870. Aaron:?

The actual modification was described in 30841, only mentioned in 30870. But to simplify things, here's an updated version with that modification already applied.

The line below would allow this message to be fed as-is to `git am -c`, except that the commit message below will need to be modified to include the sequence number for this message.

--- 8< ---

Subject: [PATCH] Generate patch level using `git describe`

Generate the patch level using `git describe` rather than relying on the
CVS $Revision$.  Need to use the `--tags` option, since currently there
are no annotated tags.  The `--long` option should be used so that the
output will always be in the 'tag-commits-hash' format rather than just
naming a tag when that would fully describe the current commit.

Since changes to the patchlevel could now be caused by changes to any
file, force the rule to be called every time that `make` is run.  Only
update the file when there are actually changes to prevent unnecessary
rebuilding of other build products (currently just `params.o` and
`zsh`).
---
Src/zsh.mdd |    8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Src/zsh.mdd b/Src/zsh.mdd
index 6e90776..420e8fc 100644
--- a/Src/zsh.mdd
+++ b/Src/zsh.mdd
@@ -39,10 +39,10 @@ params.o: patchlevel.h
version.h: $(sdir_top)/Config/version.mk zshcurses.h zshterm.h
	echo '#define ZSH_VERSION "'$(VERSION)'"' > $@

-patchlevel.h: $(sdir_top)/ChangeLog
-	sed -ne \
-	's/^\* *\$$''Revision: \(.*\) ''\$$/#define ZSH_PATCHLEVEL "\1"/p' \
-	$(sdir_top)/ChangeLog >patchlevel.h
+patchlevel.h: FORCE
+	echo '#define ZSH_PATCHLEVEL "'`git describe --tags --long`'"' > $@.tmp
+	cmp $@ $@.tmp && rm -f $@.tmp || mv $@.tmp $@
+FORCE:

zshcurses.h: ../config.h
	@if test x$(ZSH_CURSES_H) != x; then \
--
1.7.10.4



Messages sorted by: Reverse Date, Date, Thread, Author