Skip to content

Instantly share code, notes, and snippets.

@marcelhollerbach
Last active December 22, 2017 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcelhollerbach/f190899be24d92f429f95660f399ec8a to your computer and use it in GitHub Desktop.
Save marcelhollerbach/f190899be24d92f429f95660f399ec8a to your computer and use it in GitHub Desktop.
Commands of D00m
find -name '*.build' > meson_list_of_files
#grep for everything where we have something like HAVE in defined of ifdef
for file in $(cat meson_list_of_files) ; do
grep "$file" -e "HAVE_"
done > meson_have_occ
#now only get the HAVE_ thingy
grep -o '[A-Z_0-9]*' < meson_have_occ > meson_needed_symbols
sort -u meson_needed_symbols > meson_symbols
meson_
find -name '*.c' > list_of_c_files
#grep for everything where we have something like HAVE in defined of ifdef
for file in $(cat list_of_c_files) ; do
grep "$file" -e "ifdef HAVE_"
done > have_occ
for file in $(cat list_of_c_files) ; do
grep "$file" -e "defined(HAVE_"
done >> have_occ
#now only get the HAVE_ thingy
grep -o '[A-Z_0-9]*' < have_occ > needed_symbols
sort -u needed_symbols > symbols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment