aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile6
-rw-r--r--src/host/genversion.lua6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/Makefile b/src/Makefile
index 8c47a16b..79340a96 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -475,7 +475,11 @@ DASM_FLAGS= $(DASM_XFLAGS) $(DASM_AFLAGS)
475DASM_DASC= vm_$(DASM_ARCH).dasc 475DASM_DASC= vm_$(DASM_ARCH).dasc
476 476
477GIT= git 477GIT= git
478GIT_RELVER= [ -e ../.git ] && $(GIT) show -s --format=%ct >luajit_relver.txt 2>/dev/null || cat ../.relver >luajit_relver.txt 2>/dev/null || : 478ifeq (Windows,$(HOST_SYS)$(HOST_MSYS))
479 GIT_RELVER= if exist ..\.git ( $(GIT) show -s --format=%%ct >luajit_relver.txt ) else ( type ..\.relver >luajit_relver.txt )
480else
481 GIT_RELVER= [ -e ../.git ] && $(GIT) show -s --format=%ct >luajit_relver.txt 2>/dev/null || cat ../.relver >luajit_relver.txt 2>/dev/null || :
482endif
479GIT_DEP= $(wildcard ../.git/HEAD ../.git/refs/heads/*) 483GIT_DEP= $(wildcard ../.git/HEAD ../.git/refs/heads/*)
480 484
481BUILDVM_O= host/buildvm.o host/buildvm_asm.o host/buildvm_peobj.o \ 485BUILDVM_O= host/buildvm.o host/buildvm_asm.o host/buildvm_peobj.o \
diff --git a/src/host/genversion.lua b/src/host/genversion.lua
index 42b5e6fe..5ead4c2b 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
8local FILE_ROLLING_H = "luajit_rolling.h" 8local FILE_ROLLING_H = arg[1] or "luajit_rolling.h"
9local FILE_RELVER_TXT = "luajit_relver.txt" 9local FILE_RELVER_TXT = arg[2] or "luajit_relver.txt"
10local FILE_LUAJIT_H = "luajit.h" 10local FILE_LUAJIT_H = arg[3] or "luajit.h"
11 11
12local function file_read(file) 12local 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")