help.pl 776 B

12345678910111213141516171819202122232425
  1. #! /usr/bin/env perl
  2. # Copyright 2023 The OpenSSL Project Authors. All Rights Reserved.
  3. #
  4. # Licensed under the Apache License 2.0 (the "License"). You may not use
  5. # this file except in compliance with the License. You can obtain a copy
  6. # in the file LICENSE in the source distribution or at
  7. # https://www.openssl.org/source/license.html
  8. die "No input files" if scalar @ARGV == 0;
  9. $FS = ':.*##';
  10. printf "\nUsage:\n make <OPTIONS> \033[36m<target>\033[0m\n";
  11. while (<>) {
  12. chomp; # strip record separator
  13. @Fld = split($FS, $_, -1);
  14. if (/^[a-zA-Z0-9_\-]+:.*?##/) {
  15. printf " \033[36m%-15s\033[0m %s\n", $Fld[0], $Fld[1]
  16. }
  17. if (/^##@/) {
  18. printf "\n\033[1m%s\033[0m\n", substr($Fld[$_], (5)-1);
  19. }
  20. }
  21. printf "\nNote: This list is not all-inclusive\n";