<<< Date Index >>>     <<< Thread Index >>>

Re: ChangeLog file



On 2007-05-02 10:39:10 -0700, Brendan Cully wrote:
> > In fact, the main problem is that the date doesn't correspond to
> > the latest change date. When building Mutt, if a .hg directory is
> > available, couldn't the date be taken from it?
> 
> It could, yes.

How about something like that (see attached patch)? Not sure if this
is the correct way, but reldate.h needs to be rebuilt every time as
mtime-based dependencies are not sufficient.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
diff -r f6861b85f22b Makefile.am
--- a/Makefile.am       Wed May 02 10:50:07 2007 -0700
+++ b/Makefile.am       Thu May 03 14:11:04 2007 +0200
@@ -121,8 +121,10 @@ keymap_defs.h: $(OPS) $(srcdir)/gen_defs
                $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME \
                        > $(srcdir)/keymap_alldefs.h
 
-reldate.h: $(srcdir)/ChangeLog
-       echo 'const char *ReleaseDate = "'`head -n 1 $(srcdir)/ChangeLog | 
LC_ALL=C cut -d ' ' -f 1`'";' > reldate.h.tmp; \
+reldate.h: reldate
+
+reldate:
+       echo 'const char *ReleaseDate = "'`(cd $(srcdir) && hg tip --template 
'{date|shortdate}') || head -n 1 $(srcdir)/ChangeLog | LC_ALL=C cut -d ' ' -f 
1`'";' > reldate.h.tmp; \
        cmp -s reldate.h.tmp reldate.h || cp reldate.h.tmp reldate.h; \
        rm reldate.h.tmp