summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-01-20 02:03:23 -0500
committerMike Frysinger <vapier@gentoo.org>2022-01-24 02:01:41 -0500
commit4c2c73bf72fdd060956dede8ece73504e8fc974f (patch)
treea30ec9eeda06aedf7a91f0f814466b60367a5399 /bin
parentec1a20a31e7b1aa56d9f747405bce47689f44237 (diff)
downloadautomake-4c2c73bf72fdd060956dede8ece73504e8fc974f.tar.gz
aclocal: add m4 search path info to --help
Add a short summary to --help of the current paths that will be searched. Make sure to omit this from the man page when running help2man since pre-inst-env specifically clears some and others to the current build directory. * bin/aclocal.in: Include m4 search paths in usage. * doc/local.mk: Run help2man with AUTOMAKE_HELP2MAN=true.
Diffstat (limited to 'bin')
-rw-r--r--bin/aclocal.in22
1 files changed, 20 insertions, 2 deletions
diff --git a/bin/aclocal.in b/bin/aclocal.in
index 857e85308..77fbfd7e4 100644
--- a/bin/aclocal.in
+++ b/bin/aclocal.in
@@ -1044,12 +1044,30 @@ Options:
third-party m4 files, then exit
--verbose don't be silent
--version print version number, then exit
- -W, --warnings=CATEGORY report the warnings falling in CATEGORY
+ -W, --warnings=CATEGORY report the warnings falling in CATEGORY,
+ defaults to $WARNINGS
+
EOF
print Automake::ChannelDefs::usage (), "\n";
+ # This output depends on the current environment, and when generating the man
+ # pages during Automake compilation, the environment is set to local values.
+ # So don't include it in the installed man page.
+ if (!$ENV{AUTOMAKE_HELP2MAN}) {
+ print <<"EOF";
+
+Current m4 search paths (in order):
+ -I dirs: @user_includes
+ --automake-acdir: @automake_includes
+ \$ACLOCAL_AUTOMAKE_DIR: $ENV{"ACLOCAL_AUTOMAKE_DIR"}
+ \$ACLOCAL_PATH: $ENV{"ACLOCAL_PATH"}
+ --system-acdir: @system_includes
+EOF
+ }
+
print <<'EOF';
+
Report bugs to <@PACKAGE_BUGREPORT@>.
GNU Automake home page: <@PACKAGE_URL@>.
General help using GNU software: <https://www.gnu.org/gethelp/>.
@@ -1169,7 +1187,7 @@ if (exists $ENV{"AUTOMAKE_UNINSTALLED"})
parse_WARNINGS; # Parse the WARNINGS environment variable.
parse_arguments;
-parse_ACLOCAL_PATH;
+parse_ACLOCAL_PATH; # Should come after parse arguments.
$configure_ac = require_configure_ac;
# We may have to rerun aclocal if some file have been installed, but