From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20141 invoked by alias); 8 Apr 2013 21:02:20 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31246 Received: (qmail 16523 invoked from network); 8 Apr 2013 21:02:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: neutral (ns1.primenet.com.au: 74.125.82.179 is neither permitted nor denied by SPF record at ntlworld.com) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-proxyuser-ip:date:from:to:subject:message-id :in-reply-to:references:x-mailer:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=2n7jVJ76kS1xo8JNEgeYH4FLum4yy1fLFSXRAjxFNCs=; b=HnKlJvBZRsoL2pHrzCEn0jURGyAJY1yqYOlp6wAr0AgmBpzcB6mfEpxPGCAGB4cvak VN/X8/LNLHqcknxMLIifRJIG/u8NEYBX8To2mthanyY6coOqADHmps0xVdALWdfLE4VT AJAbqh8uT8M3S1azQaF6G4zjI25mzkmHQhz3Aks71I58AJKNOETjs9vcXQomp6+fE74x +I0sryMdIwkYM7xcrmmWtnmMPDUYOgU1Ww3pS9Y1fySdQV7jdEsKguG/XrLW2kxa5Vl3 /iVY3VzM3/alQSBzROmwE1dCQQQV49AdkU9BUo9miql+Z2p0fdPtR7dUCnVH/RS2aYn0 PGkQ== X-Received: by 10.194.235.196 with SMTP id uo4mr34009764wjc.30.1365454932302; Mon, 08 Apr 2013 14:02:12 -0700 (PDT) X-ProxyUser-IP: 86.6.30.159 Date: Mon, 8 Apr 2013 22:02:07 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: version.h and ChangeLog Message-ID: <20130408220207.4c02af51@pws-pc.ntlworld.com> In-Reply-To: <20130408203413.43e20021@pws-pc.ntlworld.com> References: <130407103829.ZM487@torch.brasslantern.com> <20130407192324.5bde3a2b@pws-pc.ntlworld.com> <87bo9pnr1n.fsf@ft.bewatermyfriend.org> <20130408203413.43e20021@pws-pc.ntlworld.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmQ14/8tuYA3ougeKYvIvz870qWTDYYAR/MAROEgbU/gVP41b55IgOlmKztmKrQ+z+WsQ5O On Mon, 8 Apr 2013 20:34:13 +0100 Peter Stephenson wrote: > What should probably happen is that "make targz-src" should somehow > freeze the contents of patchlevel.h so that making it when untarred > doesn't update the header any further. Here's one possible simple way of doing that, though it would be better to move the code that generates the file contents into a script. By the way, are we guaranteed that the output of 'git describe --tags --long' is the same for everyone that has pulled the same code from the server (and doesn't have local changes)? If not, it would be worth a bit of extra work to make it so: the whole point of the patchlevel is so it consistently refers to a particular state of what's on the server for reporting by users who are just tracking development. Local changes are really a special case here --- people developing the shell can be assumed to be knowledgeable enough to make their own investigations --- though if it's possible to indicate that there are changes not pushed to the server in a way that sticks out, e.g. with something appended like "-local-", that's useful, too. This is definitely looking like a script. diff --git a/Makefile.in b/Makefile.in index 5fb736f..a29ab78 100644 --- a/Makefile.in +++ b/Makefile.in @@ -160,6 +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 tar cf - $(DISTNAME) | gzip -9 > $@ rm -rf $(DISTNAME) diff --git a/Src/zsh.mdd b/Src/zsh.mdd index 420e8fc..0fec5c3 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 -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/