Back to home page

OSCL-LXR

 
 

    


0001 #!/bin/sh
0002 # SPDX-License-Identifier: GPL-2.0
0003 
0004 echo "/* Automatically generated by $0 */
0005 struct cmdname_help
0006 {
0007     char name[16];
0008     char help[80];
0009 };
0010 
0011 static struct cmdname_help common_cmds[] = {"
0012 
0013 sed -n -e 's/^perf-\([^         ]*\)[   ].* common.*/\1/p' command-list.txt |
0014 sort |
0015 while read cmd
0016 do
0017      sed -n '
0018      /^NAME/,/perf-'"$cmd"'/H
0019      ${
0020             x
0021             s/.*perf-'"$cmd"' - \(.*\)/  {"'"$cmd"'", "\1"},/
0022             p
0023      }' "Documentation/perf-$cmd.txt"
0024 done
0025 
0026 echo "#ifdef HAVE_LIBELF_SUPPORT"
0027 sed -n -e 's/^perf-\([^         ]*\)[   ].* full.*/\1/p' command-list.txt |
0028 sort |
0029 while read cmd
0030 do
0031      sed -n '
0032      /^NAME/,/perf-'"$cmd"'/H
0033      ${
0034             x
0035             s/.*perf-'"$cmd"' - \(.*\)/  {"'"$cmd"'", "\1"},/
0036             p
0037      }' "Documentation/perf-$cmd.txt"
0038 done
0039 echo "#endif /* HAVE_LIBELF_SUPPORT */"
0040 
0041 echo "#if defined(HAVE_LIBAUDIT_SUPPORT) || defined(HAVE_SYSCALL_TABLE_SUPPORT)"
0042 sed -n -e 's/^perf-\([^         ]*\)[   ].* audit*/\1/p' command-list.txt |
0043 sort |
0044 while read cmd
0045 do
0046      sed -n '
0047      /^NAME/,/perf-'"$cmd"'/H
0048      ${
0049             x
0050             s/.*perf-'"$cmd"' - \(.*\)/  {"'"$cmd"'", "\1"},/
0051             p
0052      }' "Documentation/perf-$cmd.txt"
0053 done
0054 echo "#endif /* HAVE_LIBELF_SUPPORT */"
0055 echo "};"