* locate/Makefile.am (updatedb): Substitute PACKAGE_BUGREPORT, PACKAGE_BUGREPORT_URL and PACKAGE_URL. We do this in the Makefile directly since updatedb.sh is not an output file generated directly by configure (instead, it's generated by the Makefile itself). * configure.ac (PACKAGE_BUGREPORT_URL): AC_DEFINE defines only a preprocessor macro. In order to get a similar effect for substituted output files, we need to use AC_SUBST. Hence introduce a shell variable $bugreport_url which we pass to both AC_SUBST and AC_DEFINE_UNQUOTED (replacing the previous call to AC_DEFINE). * locate/updatedb.sh (usage): Use PACKAGE_URL and PACKAGE_BUGREPORT_URL. --- configure.ac | 16 +++++++++++++--- locate/Makefile.am | 3 +++ locate/updatedb.sh | 5 +++-- 3 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac index 0a60a26..528d442 100644 --- a/configure.ac +++ b/configure.ac @@ -20,13 +20,23 @@ dnl Written by James Youngman. dnl Process this file with autoconf to produce a configure script. AC_INIT([GNU findutils], 4.7.0-git, [bug-findutils@gnu.org]) + +dnl Set the bug-report URL +dnl dnl The call to AC_INIT causes AC_PACKAGE_BUGREPORT to be defined dnl and we've used an email address. However, we would also like to dnl specify at URL at which to report bugs (and in fact we prefer dnl people to use that). Se we define that here, too. -AC_DEFINE([PACKAGE_BUGREPORT_URL], - ["https://savannah.gnu.org/bugs/?group=findutils"], - [URL at which bugs should be reported]) +bugreport_url='https://savannah.gnu.org/bugs/?group=findutils' +dnl Ensure that PACKAGE_BUGREPORT_URL shows up n config.h so that +dnl it can be picked up by bugreport.c. +AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT_URL], ["$bugreport_url"], + [URL at which bugs should be reported]) +dnl Also ensure that it is substituted in output files so that it +dnl turns up in locate/Makefile so that we can generate the correct +dnl content in the updatedb script. +AC_SUBST([PACKAGE_BUGREPORT_URL],[$bugreport_url]) + AC_CONFIG_AUX_DIR(build-aux) AM_INIT_AUTOMAKE diff --git a/locate/Makefile.am b/locate/Makefile.am index ba30d01..97401bf 100644 --- a/locate/Makefile.am +++ b/locate/Makefile.am @@ -42,6 +42,9 @@ updatedb: updatedb.sh Makefile -e "s,@""LOCATE_DB""@,$(LOCATE_DB)," \ -e "s,@""VERSION""@,$(VERSION)," \ -e "s,@""PACKAGE_NAME""@,$(PACKAGE_NAME)," \ + -e "s,@""PACKAGE_BUGREPORT""@,$(PACKAGE_BUGREPORT)," \ + -e "s,@""PACKAGE_BUGREPORT_URL""@,$(PACKAGE_BUGREPORT_URL)," \ + -e "s,@""PACKAGE_URL""@,$(PACKAGE_URL)," \ -e "s,@""find""@,$${find}," \ -e "s,@""frcode""@,$${frcode}," \ -e "s,@""bigram""@,$${bigram}," \ diff --git a/locate/updatedb.sh b/locate/updatedb.sh index 20feb01..80da575 100644 --- a/locate/updatedb.sh +++ b/locate/updatedb.sh @@ -54,10 +54,11 @@ Usage: $0 [--findoptions='-option1 -option2...'] [--output=dbfile] [--netuser=user] [--localuser=user] [--old-format] [--dbformat] [--version] [--help] +Please see also the documentation at @PACKAGE_URL@. Report (and track progress on fixing) bugs in the updatedb program via the @PACKAGE_NAME@ bug-reporting page at -http://savannah.gnu.org/bugs/?group=findutils or, if -you have no web access, by sending email to @PACKAGE_BUGREPORT@. +@PACKAGE_BUGREPORT_URL@ or, if +you have no web access, by sending email to <@PACKAGE_BUGREPORT@>. " changeto=/ old=no -- 2.1.4