From 9f59f7bb949d35be6f4003a367deacced6e059a4 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 31 Mar 2019 20:45:13 +0200 Subject: [PATCH] Rearrange description of options in the help text into sections Also sorted options according to their long form. --- doc/MANUAL.adoc | 18 +++++++++--------- src/ccache.c | 36 ++++++++++++++++++++---------------- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/doc/MANUAL.adoc b/doc/MANUAL.adoc index 23d7b4902..cda6638f4 100644 --- a/doc/MANUAL.adoc +++ b/doc/MANUAL.adoc @@ -115,16 +115,16 @@ compiler options apply and you should refer to the compiler's documentation. Clear the entire cache, removing all cached files, but keeping the configuration file. +*`-h, --help`*:: + + Print an options summary page. + *`-F, --max-files`*=_N_:: Set the maximum number of files allowed in the cache. Use 0 for no limit. The value is stored in a configuration file in the cache directory and applies to all future compilations. -*`-h, --help`*:: - - Print an options summary page. - *`-M, --max-size`*=_SIZE_:: Set the maximum size of the files stored in the cache. _SIZE_ should be a @@ -133,16 +133,16 @@ compiler options apply and you should refer to the compiler's documentation. stored in a configuration file in the cache directory and applies to all future compilations. -*`-o, --set-config`*=_KEY=VALUE_:: - - Set configuration _KEY_ to _VALUE_. See <<_configuration,CONFIGURATION>> - for more information. - *`-p, --print-config`*:: Print current configuration options and from where they originate (environment variable, configuration file or compile-time default). +*`-o, --set-config`*=_KEY=VALUE_:: + + Set configuration _KEY_ to _VALUE_. See <<_configuration,CONFIGURATION>> + for more information. + *`-s, --show-stats`*:: Print the current statistics summary for the cache. diff --git a/src/ccache.c b/src/ccache.c index c33db9c8e..2d3f464eb 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -60,23 +60,27 @@ static const char USAGE_TEXT[] = " " MYNAME " compiler [compiler options]\n" " compiler [compiler options] (via symbolic link)\n" "\n" - "Options:\n" - " -c, --cleanup delete old files and recalculate size counters\n" - " (normally not needed as this is done automatically)\n" - " -C, --clear clear the cache completely (except configuration)\n" - " -F, --max-files=N set maximum number of files in cache to N (use 0 for\n" - " no limit)\n" - " -k, --get-config=K get the value of the configuration key K\n" - " -M, --max-size=SIZE set maximum size of cache to SIZE (use 0 for no\n" - " limit); available suffixes: k, M, G, T (decimal) and\n" - " Ki, Mi, Gi, Ti (binary); default suffix: G\n" - " -o, --set-config=K=V set configuration key K to value V\n" - " -p, --print-config print current configuration options\n" - " -s, --show-stats show statistics summary\n" - " -z, --zero-stats zero statistics counters\n" + "Common options:\n" + " -c, --cleanup delete old files and recalculate size counters\n" + " (normally not needed as this is done\n" + " automatically)\n" + " -C, --clear clear the cache completely (except configuration)\n" + " -F, --max-files=N set maximum number of files in cache to N (use 0\n" + " for no limit)\n" + " -M, --max-size=SIZE set maximum size of cache to SIZE (use 0 for no\n" + " limit); available suffixes: k, M, G, T (decimal)\n" + " and Ki, Mi, Gi, Ti (binary); default suffix: G\n" + " -s, --show-stats show summary of configuration and statistics\n" + " counters in human-readable format\n" + " -z, --zero-stats zero statistics counters\n" "\n" - " -h, --help print this help text\n" - " -V, --version print version and copyright information\n" + " -h, --help print this help text\n" + " -V, --version print version and copyright information\n" + "\n" + "Options for scripting or debugging:\n" + " -k, --get-config=K get the value of configuration key K\n" + " -p, --print-config print current configuration options\n" + " -o, --set-config=K=V set configuration item K to value V\n" "\n" "See also .\n"; -- 2.47.2