Ensure all lines that should be omitted from public includes are marked
[AROS.git] / arch / all-pc / boot / grub2-aros / grub-core / gensyminfo.sh.in
blob8ca2bcd43de94dc8721dc8d6ed6cdf9a21b02393
1 #! /bin/sh -e
3 # Copyright (C) 2010 Free Software Foundation, Inc.
5 # This gensymlist.sh is free software; the author
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
15 # Example:
17 # gensyms.sh normal.module
20 module=$1
21 modname=`echo $module | sed -e 's@\.module.*$@@'`
23 # Print all symbols defined by module
24 if test x@TARGET_APPLE_CC@ = x1; then
25 @TARGET_NM@ -g -P -p $module | \
26 grep -E '^[a-zA-Z0-9_]* [TDS]' | \
27 sed "s@^\([^ ]*\).*@defined $modname \1@g"
28 else
29 @TARGET_NM@ -g --defined-only -P -p $module | \
30 sed "s@^\([^ ]*\).*@defined $modname \1@g"
33 # Print all undefined symbols used by module
34 @TARGET_NM@ -u -P -p $module | sed "s@^\([^ ]*\).*@undefined $modname \1@g"