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

Re: Getting the CVS revision of Zsh



On Tue, 13 Jan 2009 14:25:11 +0900
"Jun T." <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
> At 20:13 +0000 09.1.9, Peter Stephenson wrote:
> > +patchlevel.h: $(sdir_top)/ChangeLog
> > +	{ \
> > +	  echo -n "#define ZSH_PATCHLEVEL "; \
> 
> This does not work on MacOSX 10.5 (Leopard), because sh's builtin
> echo does not accept the option '-n':

OK, how about

Index: Src/zsh.mdd
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/zsh.mdd,v
retrieving revision 1.20
diff -u -r1.20 zsh.mdd
--- Src/zsh.mdd	9 Jan 2009 20:31:23 -0000	1.20
+++ Src/zsh.mdd	13 Jan 2009 10:08:06 -0000
@@ -42,11 +42,9 @@
 	echo '#define ZSH_VERSION "'$(VERSION)'"' > $@
 
 patchlevel.h: $(sdir_top)/ChangeLog
-	{ \
-	  echo -n "#define ZSH_PATCHLEVEL "; \
-	  sed -ne 's/^\* *\$$''Revision: \(.*\) ''\$$/"\1"/p' \
-	  $(sdir_top)/ChangeLog; \
-	} >patchlevel.h
+	sed -ne \
+	's/^\* *\$$''Revision: \(.*\) ''\$$/#define ZSH_PATCHLEVEL "\1"/p' \
+	$(sdir_top)/ChangeLog >patchlevel.h
 
 zshcurses.h: ../config.h
 	@if test x$(ZSH_CURSES_H) != x; then \



-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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