1# This script reads the contents of Versions.all and outputs a definition
2# of variable have-VERSION for each symbol version VERSION which is
3# defined.
4#
5# The have-VERSION variables can be used to check that a port supports a
6# particular symbol version in makefiles due to its base version.  A test
7# for a compatibility symbol which was superseded with a GLIBC_2.15
8# version could be tested like this:
9#
10# ifdef HAVE-GLIBC_2.14
11# tests += tst-spawn4-compat
12# endif # HAVE-GLIBC_2.14
13#
14# (NB: GLIBC_2.14 is the symbol version that immediately precedes
15# GLIBC_2.15.)
16
17NF == 1 && $1 != "}" {
18  haveversion[$1] = 1
19}
20END {
21  for (i in haveversion)
22    printf "have-%s = yes\n", i
23}
24