diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2020-02-28 08:54:49 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2020-02-28 13:12:21 +0100 |
commit | 1933ae629e7b706c6c23673a381e778819db307d (patch) | |
tree | 1075d45bcb23ae61685fe45ab1578cbeeb069a15 /src | |
parent | 864934131ef72dc3a403ad1375a94543fcc04206 (diff) | |
download | postgresql-1933ae629e7b706c6c23673a381e778819db307d.tar.gz postgresql-1933ae629e7b706c6c23673a381e778819db307d.zip |
Add PostgreSQL home page to --help output
Per emerging standard in GNU programs and elsewhere. Autoconf already
has support for specifying a home page, so we can just that.
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://www.postgresql.org/message-id/flat/8d389c5f-7fb5-8e48-9a4a-68cec44786fa%402ndquadrant.com
Diffstat (limited to 'src')
32 files changed, 43 insertions, 9 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in index e4db3e80af3..b2434437701 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -40,6 +40,8 @@ VERSION = @PACKAGE_VERSION@ MAJORVERSION = @PG_MAJORVERSION@ VERSION_NUM = @PG_VERSION_NUM@ +PACKAGE_URL = @PACKAGE_URL@ + # Set top_srcdir, srcdir, and VPATH. ifdef PGXS top_srcdir = $(top_builddir) diff --git a/src/Makefile.shlib b/src/Makefile.shlib index 526361f31bb..29a7f6d38c8 100644 --- a/src/Makefile.shlib +++ b/src/Makefile.shlib @@ -389,7 +389,7 @@ endif # PORTNAME == cygwin || PORTNAME == win32 %.pc: $(MAKEFILE_LIST) echo 'Name: lib$(NAME)' >$@ echo 'Description: PostgreSQL lib$(NAME) library' >>$@ - echo 'Url: http://www.postgresql.org/' >>$@ + echo 'Url: $(PACKAGE_URL)' >>$@ echo 'Version: $(VERSION)' >>$@ echo 'Requires: ' >>$@ echo 'Requires.private: $(PKG_CONFIG_REQUIRES_PRIVATE)' >>$@ diff --git a/src/backend/main/main.c b/src/backend/main/main.c index 1bb4ae03b8a..da3dae9e250 100644 --- a/src/backend/main/main.c +++ b/src/backend/main/main.c @@ -360,6 +360,7 @@ help(const char *progname) "configuration settings and how to set them on the command line or in\n" "the configuration file.\n\n" "Report bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 12dd83c230d..a6577486ce9 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -2323,6 +2323,7 @@ usage(const char *progname) printf(_("\nIf the data directory is not specified, the environment variable PGDATA\n" "is used.\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } static void diff --git a/src/bin/pg_archivecleanup/pg_archivecleanup.c b/src/bin/pg_archivecleanup/pg_archivecleanup.c index aef99eba30e..e454bae767d 100644 --- a/src/bin/pg_archivecleanup/pg_archivecleanup.c +++ b/src/bin/pg_archivecleanup/pg_archivecleanup.c @@ -270,6 +270,7 @@ usage(void) "e.g.\n" " pg_archivecleanup /mnt/server/archiverdir 000000010000000000000010.00000020.backup\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } /*------------ MAIN ----------------------------------------*/ diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index b75b6d4da25..48bd838803b 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -397,6 +397,7 @@ usage(void) printf(_(" -w, --no-password never prompt for password\n")); printf(_(" -W, --password force password prompt (should happen automatically)\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c index 808078e6b73..cd05f5fede1 100644 --- a/src/bin/pg_basebackup/pg_receivewal.c +++ b/src/bin/pg_basebackup/pg_receivewal.c @@ -103,6 +103,7 @@ usage(void) printf(_(" --create-slot create a new replication slot (for the slot's name see --slot)\n")); printf(_(" --drop-slot drop the replication slot (for the slot's name see --slot)\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } static bool diff --git a/src/bin/pg_basebackup/pg_recvlogical.c b/src/bin/pg_basebackup/pg_recvlogical.c index ef2d806fb39..0da32771184 100644 --- a/src/bin/pg_basebackup/pg_recvlogical.c +++ b/src/bin/pg_basebackup/pg_recvlogical.c @@ -104,6 +104,7 @@ usage(void) printf(_(" -w, --no-password never prompt for password\n")); printf(_(" -W, --password force password prompt (should happen automatically)\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } /* diff --git a/src/bin/pg_checksums/pg_checksums.c b/src/bin/pg_checksums/pg_checksums.c index b4578660484..9aa9f756f66 100644 --- a/src/bin/pg_checksums/pg_checksums.c +++ b/src/bin/pg_checksums/pg_checksums.c @@ -89,6 +89,7 @@ usage(void) printf(_("\nIf no data directory (DATADIR) is specified, " "the environment variable PGDATA\nis used.\n\n")); printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } /* diff --git a/src/bin/pg_config/pg_config.c b/src/bin/pg_config/pg_config.c index 9ff56e2fca4..f5410f64187 100644 --- a/src/bin/pg_config/pg_config.c +++ b/src/bin/pg_config/pg_config.c @@ -103,6 +103,7 @@ help(void) printf(_(" -?, --help show this help, then exit\n")); printf(_("\nWith no arguments, all known items are shown.\n\n")); printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } static void diff --git a/src/bin/pg_controldata/pg_controldata.c b/src/bin/pg_controldata/pg_controldata.c index a53794b9e66..e73639df744 100644 --- a/src/bin/pg_controldata/pg_controldata.c +++ b/src/bin/pg_controldata/pg_controldata.c @@ -42,6 +42,7 @@ usage(const char *progname) printf(_("\nIf no data directory (DATADIR) is specified, " "the environment variable PGDATA\nis used.\n\n")); printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c index 72f095fd0d6..f41084d2dba 100644 --- a/src/bin/pg_ctl/pg_ctl.c +++ b/src/bin/pg_ctl/pg_ctl.c @@ -2096,6 +2096,7 @@ do_help(void) #endif printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index d368f00d1df..ef1539044fd 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -1048,6 +1048,7 @@ help(const char *progname) printf(_("\nIf no database name is supplied, then the PGDATABASE environment\n" "variable value is used.\n\n")); printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } static void diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index de311b6ad10..0b25526d48f 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -671,6 +671,7 @@ help(void) printf(_("\nIf -f/--file is not used, then the SQL script will be written to the standard\n" "output.\n\n")); printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c index 3749454b977..544ae3bc5cd 100644 --- a/src/bin/pg_dump/pg_restore.c +++ b/src/bin/pg_dump/pg_restore.c @@ -520,4 +520,5 @@ usage(const char *progname) "multiple times to select multiple objects.\n")); printf(_("\nIf no input file name is supplied, then standard input is used.\n\n")); printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c index 1f043c918fb..233441837f8 100644 --- a/src/bin/pg_resetwal/pg_resetwal.c +++ b/src/bin/pg_resetwal/pg_resetwal.c @@ -1224,4 +1224,5 @@ usage(void) printf(_(" --wal-segsize=SIZE size of WAL segments, in megabytes\n")); printf(_(" -?, --help show this help, then exit\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 2d9cf6075ab..bf2d2983e7e 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -88,6 +88,7 @@ usage(const char *progname) printf(_(" -V, --version output version information, then exit\n")); printf(_(" -?, --help show this help, then exit\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/pg_upgrade/option.c b/src/bin/pg_upgrade/option.c index c753a75fa03..4ef2036ecd6 100644 --- a/src/bin/pg_upgrade/option.c +++ b/src/bin/pg_upgrade/option.c @@ -337,6 +337,7 @@ usage(void) " C:\\> pg_upgrade\n")); #endif printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/pg_waldump/pg_waldump.c b/src/bin/pg_waldump/pg_waldump.c index 906f7e1f089..279acfa0440 100644 --- a/src/bin/pg_waldump/pg_waldump.c +++ b/src/bin/pg_waldump/pg_waldump.c @@ -731,6 +731,7 @@ usage(void) " (optionally, show per-record statistics)\n")); printf(_(" -?, --help show this help, then exit\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } int diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 978fca0f471..b8864c6ae53 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -681,8 +681,9 @@ usage(void) " -V, --version output version information, then exit\n" " -?, --help show this help, then exit\n" "\n" - "Report bugs to <%s>.\n", - progname, progname, PACKAGE_BUGREPORT); + "Report bugs to <%s>.\n" + "%s home page: <%s>\n", + progname, progname, PACKAGE_BUGREPORT, PACKAGE_NAME, PACKAGE_URL); } /* return whether str matches "^\s*[-+]?[0-9]+$" */ diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index 777d54f0858..1f1f7784261 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -145,6 +145,7 @@ usage(unsigned short int pager) "commands) from within psql, or consult the psql section in the PostgreSQL\n" "documentation.\n\n")); fprintf(output, _("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT); + fprintf(output, _("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); ClosePager(output); } diff --git a/src/bin/scripts/clusterdb.c b/src/bin/scripts/clusterdb.c index d9761b39b26..12972de0e91 100644 --- a/src/bin/scripts/clusterdb.c +++ b/src/bin/scripts/clusterdb.c @@ -292,4 +292,5 @@ help(const char *progname) printf(_(" --maintenance-db=DBNAME alternate maintenance database\n")); printf(_("\nRead the description of the SQL command CLUSTER for details.\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/scripts/createdb.c b/src/bin/scripts/createdb.c index 9fd46a679aa..1353af97c49 100644 --- a/src/bin/scripts/createdb.c +++ b/src/bin/scripts/createdb.c @@ -278,4 +278,5 @@ help(const char *progname) printf(_(" --maintenance-db=DBNAME alternate maintenance database\n")); printf(_("\nBy default, a database with the same name as the current user is created.\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/scripts/createuser.c b/src/bin/scripts/createuser.c index a658701dd24..cf32fbe1bc8 100644 --- a/src/bin/scripts/createuser.c +++ b/src/bin/scripts/createuser.c @@ -376,4 +376,5 @@ help(const char *progname) printf(_(" -w, --no-password never prompt for password\n")); printf(_(" -W, --password force password prompt\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/scripts/dropdb.c b/src/bin/scripts/dropdb.c index 1b26f9e6de2..3d6be80ffdc 100644 --- a/src/bin/scripts/dropdb.c +++ b/src/bin/scripts/dropdb.c @@ -178,4 +178,5 @@ help(const char *progname) printf(_(" -W, --password force password prompt\n")); printf(_(" --maintenance-db=DBNAME alternate maintenance database\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/scripts/dropuser.c b/src/bin/scripts/dropuser.c index a81d4868c4a..fee270d4f6d 100644 --- a/src/bin/scripts/dropuser.c +++ b/src/bin/scripts/dropuser.c @@ -176,4 +176,5 @@ help(const char *progname) printf(_(" -w, --no-password never prompt for password\n")); printf(_(" -W, --password force password prompt\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/scripts/pg_isready.c b/src/bin/scripts/pg_isready.c index ead88a9b5a5..f3971129064 100644 --- a/src/bin/scripts/pg_isready.c +++ b/src/bin/scripts/pg_isready.c @@ -236,4 +236,5 @@ help(const char *progname) printf(_(" -t, --timeout=SECS seconds to wait when attempting connection, 0 disables (default: %s)\n"), DEFAULT_CONNECT_TIMEOUT); printf(_(" -U, --username=USERNAME user name to connect as\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/scripts/reindexdb.c b/src/bin/scripts/reindexdb.c index f680c0d6bdd..54e46181fe7 100644 --- a/src/bin/scripts/reindexdb.c +++ b/src/bin/scripts/reindexdb.c @@ -775,4 +775,5 @@ help(const char *progname) printf(_(" --maintenance-db=DBNAME alternate maintenance database\n")); printf(_("\nRead the description of the SQL command REINDEX for details.\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/bin/scripts/vacuumdb.c b/src/bin/scripts/vacuumdb.c index d3952f41506..154084a086e 100644 --- a/src/bin/scripts/vacuumdb.c +++ b/src/bin/scripts/vacuumdb.c @@ -950,4 +950,5 @@ help(const char *progname) printf(_(" --maintenance-db=DBNAME alternate maintenance database\n")); printf(_("\nRead the description of the SQL command VACUUM for details.\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c index a8c93d49345..44a6d5119b2 100644 --- a/src/interfaces/ecpg/preproc/ecpg.c +++ b/src/interfaces/ecpg/preproc/ecpg.c @@ -59,6 +59,7 @@ help(const char *progname) printf(_("\nIf no output file is specified, the name is formed by adding .c to the\n" "input file name, after stripping off .pgc if present.\n")); printf(_("\nReport bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } static void diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c index 9270977393d..a53e4a6243b 100644 --- a/src/test/regress/pg_regress.c +++ b/src/test/regress/pg_regress.c @@ -2072,6 +2072,7 @@ help(void) printf(_("if the tests could not be run for some reason.\n")); printf(_("\n")); printf(_("Report bugs to <%s>.\n"), PACKAGE_BUGREPORT); + printf(_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL); } int diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 6b4a6eec2a4..9bb8f57150a 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -146,20 +146,26 @@ sub GenerateFiles { my $self = shift; my $bits = $self->{platform} eq 'Win32' ? 32 : 64; + my $ac_init_found = 0; my $package_name; my $package_version; my $package_bugreport; + my $package_url; # Parse configure.in to get version numbers open(my $c, '<', "configure.in") || confess("Could not open configure.in for reading\n"); while (<$c>) { - if (/^AC_INIT\(\[([^\]]+)\], \[([^\]]+)\], \[([^\]]+)\]/) + if (/^AC_INIT\(\[([^\]]+)\], \[([^\]]+)\], \[([^\]]+)\], \[([^\]]*)\], \[([^\]]+)\]/) { + $ac_init_found = 1; + $package_name = $1; $package_version = $2; $package_bugreport = $3; + #$package_tarname = $4; + $package_url = $5; if ($package_version !~ /^(\d+)(?:\.(\d+))?/) { @@ -171,10 +177,7 @@ sub GenerateFiles } close($c); confess "Unable to parse configure.in for all variables!" - if ( $package_name eq '' - || $package_version eq '' - || $self->{numver} eq '' - || $package_bugreport eq ''); + unless $ac_init_found; if (IsNewer("src/include/pg_config_os.h", "src/include/port/win32.h")) { @@ -431,7 +434,7 @@ sub GenerateFiles PACKAGE_NAME => qq{"$package_name"}, PACKAGE_STRING => qq{"$package_name $package_version"}, PACKAGE_TARNAME => lc qq{"$package_name"}, - PACKAGE_URL => undef, + PACKAGE_URL => qq{"$package_url"}, PACKAGE_VERSION => qq{"$package_version"}, PG_INT128_TYPE => undef, PG_INT64_TYPE => 'long long int', |