diff options
author | Mike Pall <mike> | 2023-08-28 22:02:06 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2023-08-28 22:02:06 +0200 |
commit | 238a2a80bb17187e2cc439f99a6225953b577b3e (patch) | |
tree | 5ff031ef7f6e048088fc714cadd2f96844a2eafe /src/host | |
parent | 631a45f73b0ff61ab4184816c319c1d9a071a538 (diff) | |
parent | 6a3111a57f817cb00ef2ab6f2553cd887ec36462 (diff) | |
download | luajit-238a2a80bb17187e2cc439f99a6225953b577b3e.tar.gz luajit-238a2a80bb17187e2cc439f99a6225953b577b3e.tar.bz2 luajit-238a2a80bb17187e2cc439f99a6225953b577b3e.zip |
Merge branch 'master' into v2.1
Diffstat (limited to 'src/host')
-rw-r--r-- | src/host/genversion.lua | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/host/genversion.lua b/src/host/genversion.lua index a38cec56..42b5e6fe 100644 --- a/src/host/genversion.lua +++ b/src/host/genversion.lua | |||
@@ -5,9 +5,9 @@ | |||
5 | -- Released under the MIT license. See Copyright Notice in luajit.h | 5 | -- Released under the MIT license. See Copyright Notice in luajit.h |
6 | ---------------------------------------------------------------------------- | 6 | ---------------------------------------------------------------------------- |
7 | 7 | ||
8 | local FILE_INPUT_H = "luajit_rolling.h" | 8 | local FILE_ROLLING_H = "luajit_rolling.h" |
9 | local FILE_INPUT_R = "luajit_relver.txt" | 9 | local FILE_RELVER_TXT = "luajit_relver.txt" |
10 | local FILE_OUTPUT_H = "luajit.h" | 10 | local FILE_LUAJIT_H = "luajit.h" |
11 | 11 | ||
12 | local function file_read(file) | 12 | local function file_read(file) |
13 | local fp = assert(io.open(file, "rb"), "run from the wrong directory") | 13 | local fp = assert(io.open(file, "rb"), "run from the wrong directory") |
@@ -28,8 +28,8 @@ local function file_write_mod(file, data) | |||
28 | assert(fp:close()) | 28 | assert(fp:close()) |
29 | end | 29 | end |
30 | 30 | ||
31 | local text = file_read(FILE_INPUT_H) | 31 | local text = file_read(FILE_ROLLING_H) |
32 | local relver = file_read(FILE_INPUT_R):match("(%d+)") | 32 | local relver = file_read(FILE_RELVER_TXT):match("(%d+)") |
33 | 33 | ||
34 | if relver then | 34 | if relver then |
35 | text = text:gsub("ROLLING", relver) | 35 | text = text:gsub("ROLLING", relver) |
@@ -38,6 +38,7 @@ else | |||
38 | **** WARNING Cannot determine rolling release version from git log. | 38 | **** WARNING Cannot determine rolling release version from git log. |
39 | **** WARNING The 'git' command must be available during the build. | 39 | **** WARNING The 'git' command must be available during the build. |
40 | ]]) | 40 | ]]) |
41 | file_write_mod(FILE_RELVER_TXT, "ROLLING\n") -- Fallback for install target. | ||
41 | end | 42 | end |
42 | 43 | ||
43 | file_write_mod(FILE_OUTPUT_H, text) | 44 | file_write_mod(FILE_LUAJIT_H, text) |