bin_SCRIPTS = muttbug flea
-BUILT_SOURCES = keymap_defs.h patches.h
+BUILT_SOURCES = keymap_defs.h patchlist.c
bin_PROGRAMS = mutt @DOTLOCK_TARGET@ @PGPAUX_TARGET@
mutt_SOURCES = $(BUILT_SOURCES) \
cp $(srcdir)/dotlock.c mutt_dotlock.c
CLEANFILES = mutt_dotlock.c stamp-doc-rc makedoc \
- keymap_alldefs.h keymap_defs.h patches.h
+ keymap_alldefs.h keymap_defs.h patchlist.c
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/\+$$//'`\";" > $@
+patchlist.c: $(srcdir)/PATCHES $(srcdir)/patchlist.sh
+ $(srcdir)/patchlist.sh < $< > $@
install-exec-local:
if test -f $(DESTDIR)$(bindir)/mutt.dotlock && test -f $(DESTDIR)$(bindir)/mutt_dotlock ; then \
-Date: Tue, 6 Nov 2001 20:10:13 +0100
+From roessler@does-not-exist.org Wed Nov 7 11:49:56 2001
+Date: Wed, 7 Nov 2001 11:49:56 +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
+Subject: To those shipping patches (v2)
+MIME-Version: 1.0
+Content-Type: text/plain; format=flowed
+Status: RO
+Content-Length: 1273
+Lines: 34
-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.
+You folks have convinced me that the old patchlist was almost the
+right way to go for mutt identifying what patches have been 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.
+Thus, I've implemented this scheme (and will commit it to the CVS
+in a moment): 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.
+the same as the file names used for distributing patches. The
+format for these file names should be this:
-In order to properly construct this file, please include the
-following chunk with your patch, replacing <your-id-here> by your
-patch ID.
+ patch-<version>.<initials>.<patch-description>.<patchlevel>
+
+That is, Vsevolod's NNTP patch for mutt-1.3.42 could be named like
+this:
+
+ patch-1.3.42.vvv.nntp.1
+
+ From PATCHES, patchlist.c will be automatically generated. In
+order to properly construct PATCHES, 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
+<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.
+The patch IDs will be displayed when mutt is run with the 'v'
+command line switch.
--
Thomas Roessler http://log.does-not-exist.org/
#else
puts ("-MIXMASTER");
#endif
-
+
puts(_(ReachingUs));
+ mutt_print_patchlist();
+
exit (0);
}
#include "url.h"
#include "reldate.h"
-#include "patches.h"
#ifdef USE_IMAP
#include "imap.h"
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);
+ snprintf (vstring, sizeof (vstring), "Mutt %s (%s)",
+ MUTT_VERSION, ReleaseDate);
return vstring;
}
-const char *mutt_make_patches (void)
-{
- return Patches;
-}
--- /dev/null
+#!/bin/sh --
+
+cat <<EOF
+/* this is an autogenerated file. do not edit. */
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "mutt.h"
+
+void mutt_print_patchlist (void)
+{
+EOF
+
+while read patch ; do
+ echo " puts (\"${patch}\");"
+done
+
+echo "}"
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_pretty_size (char *, size_t, long);
void mutt_pipe_message (HEADER *);
void mutt_print_message (HEADER *);
+void mutt_print_patchlist (void);
void mutt_query_exit (void);
void mutt_query_menu (char *, size_t);
void mutt_safe_path (char *s, size_t l, ADDRESS *a);
if (mode == 0 && !privacy && option (OPTXMAILER))
{
- const char *p = mutt_make_patches ();
/* Add a vanity header */
- fprintf (fp, "User-Agent: Mutt/%s%s%s\n", MUTT_VERSION, *p ? "+" : "",
- p);
+ fprintf (fp, "User-Agent: Mutt/%s\n", MUTT_VERSION);
}
/* Add any user defined headers */