mutts' output.
bin_SCRIPTS = muttbug flea
-BUILT_SOURCES = keymap_defs.h
+BUILT_SOURCES = keymap_defs.h patches.h
bin_PROGRAMS = mutt @DOTLOCK_TARGET@ @PGPAUX_TARGET@
mutt_SOURCES = $(BUILT_SOURCES) \
_regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \
mbyte.h lib.h extlib.c pgpewrap.c pgplib.h Muttrc.head Muttrc \
makedoc.c stamp-doc-rc README.SSL \
- muttbug pgppacket.h depcomp ascii.h BEWARE
+ muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES
mutt_dotlock_SOURCES = mutt_dotlock.c
mutt_dotlock_LDADD = @LIBOBJS@
cp $(srcdir)/dotlock.c mutt_dotlock.c
CLEANFILES = mutt_dotlock.c stamp-doc-rc makedoc \
- keymap_alldefs.h keymap_defs.h
+ keymap_alldefs.h keymap_defs.h patches.h
ACLOCAL_AMFLAGS = -I m4
reldate:
echo 'const char *ReleaseDate = "'`date +%Y-%m-%d`'";' > $(srcdir)/reldate.h
+patches.h: $(srcdir)/PATCHES
+ echo "const char *Patches = \"`tr '\n' '+' < $< | sed -e 's/\+$$//'`\";" > $@
+
install-exec-local:
if test -f $(DESTDIR)$(bindir)/mutt.dotlock && test -f $(DESTDIR)$(bindir)/mutt_dotlock ; then \
rm -f $(DESTDIR)$(bindir)/mutt.dotlock ; \
mutt_cv_version=`cat $srcdir/VERSION`
+
AM_INIT_AUTOMAKE(mutt, $mutt_cv_version)
+
ALL_LINGUAS="de ru it es uk fr pl nl cs id sk ko el zh_TW zh_CN pt_BR eo gl sv da lt tr ja hu et"
AC_CANONICAL_HOST
manual.html \
stamp-doc-sgml \
stamp-doc-man \
- instdoc.sh.in
+ instdoc.sh.in \
+ patch-notes.txt
srcdir_DOCFILES = PGP-Notes.txt applying-patches.txt \
- devel-notes.txt
+ devel-notes.txt patch-notes.txt
topsrcdir_DOCFILES = COPYRIGHT GPL INSTALL ChangeLog \
--- /dev/null
+Date: Tue, 6 Nov 2001 20:10:13 +0100
+From: Thomas Roessler <roessler@does-not-exist.org>
+To: mutt-dev@mutt.org
+Subject: To those shipping patches
+Mail-Followup-To: mutt-dev@mutt.org
+
+We've repeatedly had bug reports in the recent past where it was
+hard to see whether or not the problematic version of mutt had, say,
+the compressed folders patch or the NNTP patch applied.
+
+From 1.3.23.2 on, I'll include the following mechanism to add a
+patch identifier to mutt's version ID: There's a new file called
+.PATCHES in the source tree, which will be _empty_ in the official
+distribution.
+
+This file's format is one patch ID per line. Patch IDs should be
+short, and follow the format "<initials>.<patch-description>". An
+example would be "vvv.nntp" for Vsevolod's NNTP patch, or
+"rr.compress" for Roland Rosenfeld's compressed folder patch.
+
+In order to properly construct this file, please include the
+following chunk with your patch, replacing <your-id-here> by your
+patch ID.
+
+------------------------------snip------------------------------
+--- PATCHES~ Tue Nov 6 19:59:33 2001
++++ PATCHES Tue Nov 6 19:59:42 2001
+@@ -1,0 +1 @@
++<your-id-here>
+------------------------------snip------------------------------
+
+The patch IDs will be used to construct mutt's version number as
+displayed when mutt is run with the 'v' command line switch, and as
+displayed on the User-Agent header.
+
+--
+Thomas Roessler http://log.does-not-exist.org/
+
#include "keymap.h"
#include "mailbox.h"
#include "url.h"
-#include "reldate.h"
#include <string.h>
#include <stdlib.h>
static void mutt_usage (void)
{
- printf ("Mutt %s (%s)\n", MUTT_VERSION, ReleaseDate);
+ puts (mutt_make_version ());
+
puts _(
"usage: mutt [ -nRyzZ ] [ -e <cmd> ] [ -F <file> ] [ -m <type> ] [ -f <file> ]\n\
mutt [ -nx ] [ -e <cmd> ] [ -a <file> ] [ -F <file> ] [ -H <file> ] [ -i <file> ] [ -s <subj> ] [ -b <addr> ] [ -c <addr> ] <addr> [ ... ]\n\
{
struct utsname uts;
- printf ("Mutt %s (%s)\n", MUTT_VERSION, ReleaseDate);
+ puts (mutt_make_version());
puts (_(Notice));
uname (&uts);
show_version ();
break;
default:
- printf ("Mutt %s (%s)\n", MUTT_VERSION, ReleaseDate);
+ puts (mutt_make_version ());
puts (_(Copyright));
puts (_(ReachingUs));
exit (0);
#include "mx.h"
#include "url.h"
+#include "reldate.h"
+#include "patches.h"
+
#ifdef USE_IMAP
#include "imap.h"
#endif
return mtime;
}
+
+const char *mutt_make_version (void)
+{
+ static char vstring[STRING];
+ const char *p = mutt_make_patches ();
+ snprintf (vstring, sizeof (vstring), "Mutt %s%s%s (%s)",
+ MUTT_VERSION, *p ? "+" : "", p, ReleaseDate);
+ return vstring;
+}
+
+const char *mutt_make_patches (void)
+{
+ return Patches;
+}
#endif /* HAVE_PGP */
char *mutt_make_date (char *, size_t);
+const char *mutt_make_version (void);
+const char *mutt_make_patches (void);
+
const char *mutt_fqdn(short);
void mutt_account_hook (const char* url);
#include "pager.h"
#include "charset.h"
+
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
if (mode == 0 && !privacy && option (OPTXMAILER))
{
+ const char *p = mutt_make_patches ();
/* Add a vanity header */
- fprintf (fp, "User-Agent: Mutt/%s\n", MUTT_VERSION);
+ fprintf (fp, "User-Agent: Mutt/%s%s%s\n", MUTT_VERSION, *p ? "+" : "",
+ p);
}
/* Add any user defined headers */