diff options
author | Todd Short <todd.short@me.com> | 2023-02-28 18:42:56 -0500 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2023-03-06 08:00:58 +1100 |
commit | d108082377aa5f1c5420ec76ca2e9a5b8fb12a32 (patch) | |
tree | 972aecdda41bc290f2ceafd19b68a287a55b4085 /util | |
parent | 08a11ba20461ce14b0a6b9c9e374fbea91fbd8cf (diff) | |
download | openssl-new-d108082377aa5f1c5420ec76ca2e9a5b8fb12a32.tar.gz |
Add "make help" option
Based on kubernetes controller Makefile help.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20407)
Diffstat (limited to 'util')
-rwxr-xr-x | util/help.pl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/util/help.pl b/util/help.pl new file mode 100755 index 0000000000..a1614fe8a9 --- /dev/null +++ b/util/help.pl @@ -0,0 +1,25 @@ +#! /usr/bin/env perl +# Copyright 2023 The OpenSSL Project Authors. All Rights Reserved. +# +# Licensed under the Apache License 2.0 (the "License"). You may not use +# this file except in compliance with the License. You can obtain a copy +# in the file LICENSE in the source distribution or at +# https://www.openssl.org/source/license.html + +die "No input files" if scalar @ARGV == 0; +$FS = ':.*##'; +printf "\nUsage:\n make <OPTIONS> \033[36m<target>\033[0m\n"; + +while (<>) { + chomp; # strip record separator + @Fld = split($FS, $_, -1); + if (/^[a-zA-Z0-9_\-]+:.*?##/) { + printf " \033[36m%-15s\033[0m %s\n", $Fld[0], $Fld[1] + } + if (/^##@/) { + printf "\n\033[1m%s\033[0m\n", substr($Fld[$_], (5)-1); + } +} + +printf "\nNote: This list is not all-inclusive\n"; + |