1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00

Support --with-pkgversion and --with-bugurl.

This commit is contained in:
Joseph Myers
2012-11-09 22:13:45 +00:00
parent 92e4b6a927
commit 8b748aed2a
42 changed files with 470 additions and 119 deletions

View File

@@ -126,13 +126,17 @@ sLIBdir := $(shell echo $(slibdir) | sed 's,lib\(\|64\)$$,\\\\$$LIB,')
$(objpfx)mtrace: mtrace.pl
rm -f $@.new
sed -e 's|@PERL@|$(PERL)|' -e 's|@XXX@|$(address-width)|' \
-e 's|@VERSION@|$(version)|' $^ > $@.new \
-e 's|@VERSION@|$(version)|' \
-e 's|@PKGVERSION@|$(PKGVERSION)|' \
-e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
&& rm -f $@ && mv $@.new $@ && chmod +x $@
$(objpfx)memusage: memusage.sh
rm -f $@.new
sed -e 's|@BASH@|$(BASH)|' -e 's|@VERSION@|$(version)|' \
-e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' $^ > $@.new \
-e 's|@SLIBDIR@|$(sLIBdir)|' -e 's|@BINDIR@|$(bindir)|' \
-e 's|@PKGVERSION@|$(PKGVERSION)|' \
-e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
&& rm -f $@ && mv $@.new $@ && chmod +x $@

View File

@@ -61,14 +61,13 @@ Mandatory arguments to long options are also mandatory for any corresponding
short options.
"
echo $"For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
"
printf $"For bug reporting instructions, please see:\\n%s.\\n" \
"@REPORT_BUGS_TO@"
exit 0
}
do_version() {
echo 'memusage (GNU libc) @VERSION@'
echo 'memusage @PKGVERSION@@VERSION@'
printf $"Copyright (C) %s Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

View File

@@ -528,20 +528,17 @@ parse_opt (int key, char *arg, struct argp_state *state)
static char *
more_help (int key, const char *text, void *input)
{
char *orig;
char *cp;
char *tp;
switch (key)
{
case ARGP_KEY_HELP_EXTRA:
/* We print some extra information. */
orig = gettext ("\
if (asprintf (&tp, gettext ("\
For bug reporting instructions, please see:\n\
<http://www.gnu.org/software/libc/bugs.html>.\n");
cp = strdup (orig);
if (cp == NULL)
cp = orig;
return cp;
%s.\n"), REPORT_BUGS_TO) < 0)
return NULL;
return tp;
default:
break;
}
@@ -552,7 +549,7 @@ For bug reporting instructions, please see:\n\
static void
print_version (FILE *stream, struct argp_state *state)
{
fprintf (stream, "memusagestat (GNU %s) %s\n", PACKAGE, VERSION);
fprintf (stream, "memusagestat %s%s\n", PKGVERSION, VERSION);
fprintf (stream, gettext ("\
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\

View File

@@ -21,7 +21,8 @@ eval "exec @PERL@ -S $0 $@"
# <http://www.gnu.org/licenses/>.
$VERSION = "@VERSION@";
$PACKAGE = "libc";
$PKGVERSION = "@PKGVERSION@";
$REPORT_BUGS_TO = '@REPORT_BUGS_TO@';
$progname = $0;
sub usage {
@@ -30,7 +31,7 @@ sub usage {
print " --version print version number, then exit\n";
print "\n";
print "For bug reporting instructions, please see:\n";
print "<http://www.gnu.org/software/libc/bugs.html>.\n";
print "$REPORT_BUGS_TO.\n";
exit 0;
}
@@ -43,7 +44,7 @@ arglist: while (@ARGV) {
if ($ARGV[0] eq "--v" || $ARGV[0] eq "--ve" || $ARGV[0] eq "--ver" ||
$ARGV[0] eq "--vers" || $ARGV[0] eq "--versi" ||
$ARGV[0] eq "--versio" || $ARGV[0] eq "--version") {
print "mtrace (GNU $PACKAGE) $VERSION\n";
print "mtrace $PKGVERSION$VERSION\n";
print "Copyright (C) 2012 Free Software Foundation, Inc.\n";
print "This is free software; see the source for copying conditions. There is NO\n";
print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";