mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
refine makefile
This commit is contained in:
parent
1058593a3e
commit
b3a1343541
18
Makefile
18
Makefile
@ -1,16 +1,8 @@
|
||||
LUA ?= lua5.1
|
||||
LUAROCKS ?= luarocks
|
||||
|
||||
ifneq ($(LUA),lua)
|
||||
LUA_VERSION = $(shell echo $(LUA) | sed -e "s/lua\(.*\)/\1/")
|
||||
LUAROCKS = luarocks-$(LUA_VERSION)
|
||||
LUA_PATH_MAKE = $(shell echo "$$LUA_PATH" | sed -e "s/[0-9]\.[0-9]/$(LUA_VERSION)/g")
|
||||
LUA_CPATH_MAKE = $(shell echo "$$LUA_CPATH" | sed -e "s/[0-9]\.[0-9]/$(LUA_VERSION)/g")
|
||||
endif
|
||||
|
||||
ifeq ($(LUA),luajit)
|
||||
LUAROCKS = luarocks-5.1
|
||||
endif
|
||||
LUA ?= lua5.1
|
||||
LUA_VERSION = $(shell $(LUA) -e 'print(_VERSION:match("%d%.%d"))')
|
||||
LUAROCKS = luarocks-$(LUA_VERSION)
|
||||
LUA_PATH_MAKE = $(shell $(LUAROCKS) path --lr-path)
|
||||
LUA_CPATH_MAKE = $(shell $(LUAROCKS) path --lr-cpath)
|
||||
|
||||
.PHONY: test local compile compile_system watch lint count show
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user