aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-07-02 19:27:48 -0300
committerHisham Muhammad <hisham@gobolinux.org>2018-07-02 19:27:48 -0300
commit8dd1e1460282f5fc992d838ec2411f4d1bc7b2b7 (patch)
tree5b6e88d37869bad4a23cfd52424e91fa34d34176 /Makefile
parent672b4f191ac5723ee460e469d58fff2ca2cb386b (diff)
downloadluarocks-8dd1e1460282f5fc992d838ec2411f4d1bc7b2b7.tar.gz
luarocks-8dd1e1460282f5fc992d838ec2411f4d1bc7b2b7.tar.bz2
luarocks-8dd1e1460282f5fc992d838ec2411f4d1bc7b2b7.zip
Experimental Windows cross-compiled binary build
This commit consolidates the work that has been ongoing over the last few weeks in producing the single-binary builds of LuaRocks based on the new distribution model described in https://github.com/luarocks/luarocks/wiki/Project:-LuaRocks-new-distribution-model The single-binary build is in a good shape for Linux, it's a work-in-progress for Windows (binaries do build, but some work on the dependencies is still necessary), and is untested in macOS.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 18 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 4e528db8..8f772dae 100644
--- a/Makefile
+++ b/Makefile
@@ -64,13 +64,15 @@ $(SYSCONFDIR)/config-$(LUA_VERSION).lua: config-$(LUA_VERSION).lua.in
64# Binary build 64# Binary build
65# ---------------------------------------- 65# ----------------------------------------
66 66
67binary: build-binary/luarocks.exe build-binary/luarocks-admin.exe 67BINARY_TARGET=build-binary
68 68
69build-binary/luarocks.exe: ./luarocks 69binary: $(BINARY_TARGET)/luarocks.exe $(BINARY_TARGET)/luarocks-admin.exe
70 LUA_PATH="$(PWD)/src/?.lua;;" "$(LUA_BINDIR)/$(LUA_INTERPRETER)" ./all_in_one "src/bin/luarocks" "$(LUA_DIR)" "^src/luarocks/admin/" "$(SYSCONFDIR)" "build-binary"
71 70
72build-binary/luarocks-admin.exe: ./luarocks 71$(BINARY_TARGET)/luarocks.exe: ./luarocks
73 LUA_PATH="$(PWD)/src/?.lua;;" "$(LUA_BINDIR)/$(LUA_INTERPRETER)" ./all_in_one "src/bin/luarocks-admin" "$(LUA_DIR)" "^src/luarocks/cmd/" "$(SYSCONFDIR)" "build-binary" 72 LUA_PATH="$(PWD)/src/?.lua;;" "$(LUA_BINDIR)/$(LUA_INTERPRETER)" binary/all_in_one "src/bin/luarocks" "$(LUA_DIR)" "^src/luarocks/admin/" "$(SYSCONFDIR)" $(BINARY_TARGET) $(BINARY_PLATFORM) $(BINARY_CC) $(BINARY_NM) $(BINARY_SYSROOT)
73
74$(BINARY_TARGET)/luarocks-admin.exe: ./luarocks
75 LUA_PATH="$(PWD)/src/?.lua;;" "$(LUA_BINDIR)/$(LUA_INTERPRETER)" binary/all_in_one "src/bin/luarocks-admin" "$(LUA_DIR)" "^src/luarocks/cmd/" "$(SYSCONFDIR)" $(BINARY_TARGET) $(BINARY_PLATFORM) $(BINARY_CC) $(BINARY_NM) $(BINARY_SYSROOT)
74 76
75# ---------------------------------------- 77# ----------------------------------------
76# Binary install 78# Binary install
@@ -94,6 +96,16 @@ bootstrap: ./luarocks $(SYSCONFDIR)/config-$(LUA_VERSION).lua
94 ./luarocks make --tree="$(ROCKS_TREE)" 96 ./luarocks make --tree="$(ROCKS_TREE)"
95 97
96# ---------------------------------------- 98# ----------------------------------------
99# Windows binary build
100# ----------------------------------------
101
102windows-binary: ./luarocks
103 make -f binary/Makefile.windows windows-binary
104
105windows-clean:
106 make -f binary/Makefile.windows windows-clean
107
108# ----------------------------------------
97# Clean 109# Clean
98# ---------------------------------------- 110# ----------------------------------------
99 111
@@ -105,4 +117,4 @@ clean:
105 rm -rf ./.luarocks 117 rm -rf ./.luarocks
106 rm -rf ./lua_modules 118 rm -rf ./lua_modules
107 119
108.PHONY: all build install binary install-binary bootstrap clean 120.PHONY: all build install binary install-binary bootstrap clean windows-binary windows-clean