opnsense-src/usr.bin/lex/version.awk
Franco Fichtner 402e7dde73 src: initial commit based on FreeBSD-10.0
Taken from:	https://github.com/freebsd/freebsd.git
Commit id:	d44ce30d3054a38723f89a161c5e003e64d1aaae
2014-11-09 09:30:14 +01:00

13 lines
227 B
Awk

# $FreeBSD$
BEGIN {
FS = "[ \t\.\"]+"
}
{
if ($1 ~ /^#define$/ && $2 ~ /^VERSION$/) {
printf("-DFLEX_MAJOR_VERSION=%s\n", $3);
printf("-DFLEX_MINOR_VERSION=%s\n", $4);
printf("-DFLEX_SUBMINOR_VERSION=%s\n", $5);
}
}