From e131de5b5f40e0a4100a17cf128ba56424003176 Mon Sep 17 00:00:00 2001 From: pdmef Date: Wed, 24 Aug 2005 11:39:27 +0000 Subject: [PATCH] Rocco Rutte: - try to fix version generation for SVN vs. non-SVN once more git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@436 e385b8ad-14ed-0310-8656-cc95a2468c6d --- Makefile.am | 11 ++++++----- VERSION.date | 1 + do-commit.sh | 3 +++ muttlib.c | 10 ++++------ sendlib.c | 1 - 5 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 VERSION.date create mode 100755 do-commit.sh diff --git a/Makefile.am b/Makefile.am index 2a90349..5087f3d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,7 +23,7 @@ SUBDIRS = m4 po intl doc contrib lib $(IMAP_SUBDIR) $(POP_SUBDIR) $(NNTP_SUBDIR) bin_SCRIPTS = muttngbug fleang -BUILT_SOURCES = keymap_defs.h patchlist.c svnrev.h +BUILT_SOURCES = keymap_defs.h patchlist.c version.h bin_PROGRAMS = muttng @DOTLOCK_TARGET@ @PGPAUX_TARGET@ @SMIMEAUX_TARGET@ muttng_SOURCES = $(BUILT_SOURCES) \ @@ -126,7 +126,7 @@ mutt_dotlock.c: dotlock.c cp $(srcdir)/dotlock.c mutt_dotlock.c CLEANFILES = mutt_dotlock.c stamp-doc-rc makedoc \ - keymap_alldefs.h keymap_defs.h patchlist.c svnrev.h + keymap_alldefs.h keymap_defs.h patchlist.c version.h ACLOCAL_AMFLAGS = -I m4 @@ -152,11 +152,12 @@ keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.PGP $(srcdir)/OPS.MIX $(srcdir)/OP $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME \ > keymap_alldefs.h -svnrev.h: +version.h: + echo "#undef MUTT_VERSION" > version.h if test -f "$(srcdir)/.svn/entries" ; then \ - echo "#define MUTTNG_SVNREV \"r`grep revision $(srcdir)/.svn/entries | sort -r | uniq | head -n 1 | cut -d '"' -f 2`\"" > svnrev.h ; \ + echo "#define MUTT_VERSION \"`cat $(srcdir)/VERSION.in`-r`grep revision $(srcdir)/.svn/entries | sort -r | uniq | head -n 1 | cut -d '"' -f 2`\"" >> version.h ; \ else \ - echo "#define MUTTNG_SVNREV \"`date "+%Y%m%d"`\"" > svnrev.h ; \ + echo "#define MUTT_VERSION \"`cat $(srcdir)/VERSION.in`-`cat $(srcdir)/VERSION.date`\"" >> version.h ; \ fi reldate: diff --git a/VERSION.date b/VERSION.date new file mode 100644 index 0000000..283880d --- /dev/null +++ b/VERSION.date @@ -0,0 +1 @@ +20050824 diff --git a/do-commit.sh b/do-commit.sh new file mode 100755 index 0000000..795ce32 --- /dev/null +++ b/do-commit.sh @@ -0,0 +1,3 @@ +#!/bin/sh +date "+%Y%m%d" > ./VERSION.date +svn commit "$@" diff --git a/muttlib.c b/muttlib.c index b55dfda..4efa41b 100644 --- a/muttlib.c +++ b/muttlib.c @@ -23,7 +23,7 @@ #include "attach.h" #include "reldate.h" -#include "svnrev.h" +#include "version.h" #ifdef USE_IMAP #include "imap.h" @@ -1290,12 +1290,10 @@ const char *mutt_make_version (int full) static char vstring[STRING]; if (full) - snprintf (vstring, sizeof (vstring), "Mutt-ng %s-%s (based " - "on Mutt 1.5.10/%s)", MUTT_VERSION, MUTTNG_SVNREV, - ReleaseDate); + snprintf (vstring, sizeof (vstring), "Mutt-ng %s (based " + "on Mutt 1.5.10/%s)", MUTT_VERSION, ReleaseDate); else - snprintf (vstring, sizeof (vstring), "mutt-ng/%s-%s", - MUTT_VERSION, MUTTNG_SVNREV); + snprintf (vstring, sizeof (vstring), "mutt-ng/%s", MUTT_VERSION); return vstring; } diff --git a/sendlib.c b/sendlib.c index b3f08b8..450f543 100644 --- a/sendlib.c +++ b/sendlib.c @@ -27,7 +27,6 @@ #include "charset.h" #include "mutt_crypt.h" #include "mutt_idna.h" -#include "svnrev.h" #include "lib/mem.h" #include "lib/str.h" -- 2.20.1