fixes for compiling rrdtool with win32 mingw and netware -- Guenter Knauf <gk with...
[rrdtool.git] / src / get_ver.awk
1 # fetch rrdtool version number from input file and write them to STDOUT\r
2 BEGIN {\r
3   while ((getline < ARGV[1]) > 0) {\r
4     if (match ($0, /^PACKAGE_VERSION=/)) {\r
5       split($1, t, "=");\r
6       my_ver_str = substr(t[2],2,length(t[2])-2);\r
7       split(my_ver_str, v, ".");\r
8       my_ver = v[1] "," v[2] "," v[3];\r
9     }\r
10     if (match ($0, /^NUMVERS=/)) {\r
11       split($1, t, "=");\r
12       my_num_ver = t[2];\r
13     }\r
14   }\r
15   print "RRD_VERSION = " my_ver "";\r
16   print "RRD_VERSION_STR = " my_ver_str "";\r
17   print "RRD_NUMVERS = " my_num_ver "";\r
18 }\r