Permalink
Browse files

Make bug-reporting address more configurable.

Based on a patch by Joseph S. Myers in
<http://mm.icann.org/pipermail/tz/2012-November/018452.html>.
* Makefile (BUGEMAIL): New macro.
(version.h, tzselect): Use it to define REPORT_BUGS_TO.
* tzselect.ksh (REPORT_BUGS_TO): New variable, used for --help.
* zdump.c, zic.c (usage): Use REPORT_BUGS_TO for --help.
  • Loading branch information...
1 parent dec96c0 commit a435f9f0ecafa56d9e0263835836bd0c64cd7307 @eggert committed Nov 13, 2012
Showing with 12 additions and 6 deletions.
  1. +6 −1 Makefile
  2. +2 −1 tzselect.ksh
  3. +2 −2 zdump.c
  4. +2 −2 zic.c
View
@@ -8,6 +8,9 @@ PACKAGE= tzcode
# Version numbers of the code and data distributions.
VERSION= 2012j
+# Email address for bug reports.
+BUGEMAIL= tz@iana.org
+
# Change the line below for your time zone (after finding the zone you want in
# the time zone files, or adding it to a time zone file).
# Alternately, if you discover you've got the wrong time zone, you can just
@@ -344,7 +347,8 @@ INSTALL: ALL install date.1
version.h:
(echo 'static char const PKGVERSION[]="($(PACKAGE)) ";' && \
- echo 'static char const TZVERSION[]="$(VERSION)";') >$@
+ echo 'static char const TZVERSION[]="$(VERSION)";' && \
+ echo 'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";') >$@
zdump: $(TZDOBJS)
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZDOBJS) $(LDLIBS)
@@ -396,6 +400,7 @@ tzselect: tzselect.ksh
-e 's|#!/bin/bash|#!$(KSHELL)|g' \
-e 's|AWK=[^}]*|AWK=$(AWK)|g' \
-e 's|\(PKGVERSION\)=.*|\1='\''($(PACKAGE)) '\''|' \
+ -e 's|\(REPORT_BUGS_TO\)=.*|\1=$(BUGEMAIL)|' \
-e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \
-e 's|\(TZVERSION\)=.*|\1=$(VERSION)|' \
<$? >$@
View
@@ -2,6 +2,7 @@
PKGVERSION='(tzcode) '
TZVERSION=see_Makefile
+REPORT_BUGS_TO=tz@iana.org
# Ask the user about the time zone, and output the resulting TZ value to stdout.
# Interact with the user via stderr and stdin.
@@ -44,7 +45,7 @@ if [ "$1" = "--help" ]; then
Usage: tzselect
Select a time zone interactively.
-Report bugs to tz@iana.org.
+Report bugs to $REPORT_BUGS_TO.
EOF
exit
elif [ "$1" = "--version" ]; then
View
@@ -272,8 +272,8 @@ usage(FILE * const stream, const int status)
(void) fprintf(stream,
_("%s: usage is %s [ --version ] [ --help ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n\
\n\
-Report bugs to tz@iana.org.\n"),
- progname, progname);
+Report bugs to %s.\n"),
+ progname, progname, REPORT_BUGS_TO);
exit(status);
}
View
4 zic.c
@@ -426,8 +426,8 @@ usage(FILE *stream, int status)
[ --version ] [ --help ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n\
\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n\
\n\
-Report bugs to tz@iana.org.\n"),
- progname, progname);
+Report bugs to %s.\n"),
+ progname, progname, REPORT_BUGS_TO);
exit(status);
}

0 comments on commit a435f9f

Please sign in to comment.