diff options
Diffstat (limited to 'xS/xS-gen-version.awk')
-rw-r--r-- | xS/xS-gen-version.awk | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/xS/xS-gen-version.awk b/xS/xS-gen-version.awk new file mode 100644 index 0000000..1312a63 --- /dev/null +++ b/xS/xS-gen-version.awk @@ -0,0 +1,14 @@ +# xS-gen-version.awk: extract version information from the CMake script +# +# Copyright (c) 2022, Přemysl Eric Janouch <p@janouch.name> +# SPDX-License-Identifier: 0BSD + +Command == "project" { + for (i = 2; i in Args; i++) + if (Args[i] == "VERSION") { + print "package main" + print "" + print "const projectVersion = `" Args[++i] "`" + exit + } +} |