diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2011-09-16 15:16:18 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2011-09-16 15:16:18 -0300 |
commit | 4f983c3fc840e6d3bf4b4980bdfd04e9dcd265e0 (patch) | |
tree | 6edde98b00a353217611540f3f7262aa5ad0a9f6 | |
parent | 1eb33f04bea27b8da82903519e63fde50efa288a (diff) | |
download | luarocks-4f983c3fc840e6d3bf4b4980bdfd04e9dcd265e0.tar.gz luarocks-4f983c3fc840e6d3bf4b4980bdfd04e9dcd265e0.tar.bz2 luarocks-4f983c3fc840e6d3bf4b4980bdfd04e9dcd265e0.zip |
Rename luarocks.config to luarocks.site_config, to avoid confusion with the system-wide configuration file. Thanks to Ignacio for the investigation. Closes #41.
-rw-r--r-- | Makefile | 42 | ||||
-rw-r--r-- | install.bat | 34 | ||||
-rw-r--r-- | src/luarocks/cfg.lua | 54 |
3 files changed, 65 insertions, 65 deletions
@@ -26,45 +26,45 @@ CONFIG_FILE = $(SYSCONFDIR)/config.lua | |||
26 | 26 | ||
27 | all: built | 27 | all: built |
28 | 28 | ||
29 | src/luarocks/config.lua: config.unix | 29 | src/luarocks/site_config.lua: config.unix |
30 | rm -f src/luarocks/config.lua | 30 | rm -f src/luarocks/site_config.lua |
31 | echo 'module("luarocks.config")' >> src/luarocks/config.lua | 31 | echo 'module("luarocks.site_config")' >> src/luarocks/site_config.lua |
32 | if [ -n "$(PREFIX)" ] ;\ | 32 | if [ -n "$(PREFIX)" ] ;\ |
33 | then \ | 33 | then \ |
34 | echo "LUAROCKS_PREFIX=[[$(PREFIX)]]" >> src/luarocks/config.lua ;\ | 34 | echo "LUAROCKS_PREFIX=[[$(PREFIX)]]" >> src/luarocks/site_config.lua ;\ |
35 | fi | 35 | fi |
36 | if [ -n "$(LUA_INCDIR)" ] ;\ | 36 | if [ -n "$(LUA_INCDIR)" ] ;\ |
37 | then \ | 37 | then \ |
38 | echo "LUA_INCDIR=[[$(LUA_INCDIR)]]" >> src/luarocks/config.lua ;\ | 38 | echo "LUA_INCDIR=[[$(LUA_INCDIR)]]" >> src/luarocks/site_config.lua ;\ |
39 | fi | 39 | fi |
40 | if [ -n "$(LUA_LIBDIR)" ] ;\ | 40 | if [ -n "$(LUA_LIBDIR)" ] ;\ |
41 | then \ | 41 | then \ |
42 | echo "LUA_LIBDIR=[[$(LUA_LIBDIR)]]" >> src/luarocks/config.lua ;\ | 42 | echo "LUA_LIBDIR=[[$(LUA_LIBDIR)]]" >> src/luarocks/site_config.lua ;\ |
43 | fi | 43 | fi |
44 | if [ -n "$(LUA_BINDIR)" ] ;\ | 44 | if [ -n "$(LUA_BINDIR)" ] ;\ |
45 | then \ | 45 | then \ |
46 | echo "LUA_BINDIR=[[$(LUA_BINDIR)]]" >> src/luarocks/config.lua ;\ | 46 | echo "LUA_BINDIR=[[$(LUA_BINDIR)]]" >> src/luarocks/site_config.lua ;\ |
47 | fi | 47 | fi |
48 | if [ -n "$(LUA_SUFFIX)" ] ;\ | 48 | if [ -n "$(LUA_SUFFIX)" ] ;\ |
49 | then \ | 49 | then \ |
50 | echo "LUA_INTERPRETER=[[lua$(LUA_SUFFIX)]]" >> src/luarocks/config.lua ;\ | 50 | echo "LUA_INTERPRETER=[[lua$(LUA_SUFFIX)]]" >> src/luarocks/site_config.lua ;\ |
51 | fi | 51 | fi |
52 | if [ -n "$(SYSCONFDIR)" ] ;\ | 52 | if [ -n "$(SYSCONFDIR)" ] ;\ |
53 | then \ | 53 | then \ |
54 | echo "LUAROCKS_SYSCONFIG=[[$(SYSCONFDIR)/config.lua]]" >> src/luarocks/config.lua ;\ | 54 | echo "LUAROCKS_SYSCONFIG=[[$(SYSCONFDIR)/config.lua]]" >> src/luarocks/site_config.lua ;\ |
55 | fi | 55 | fi |
56 | if [ -n "$(ROCKS_TREE)" ] ;\ | 56 | if [ -n "$(ROCKS_TREE)" ] ;\ |
57 | then \ | 57 | then \ |
58 | echo "LUAROCKS_ROCKS_TREE=[[$(ROCKS_TREE)]]" >> src/luarocks/config.lua ;\ | 58 | echo "LUAROCKS_ROCKS_TREE=[[$(ROCKS_TREE)]]" >> src/luarocks/site_config.lua ;\ |
59 | fi | 59 | fi |
60 | if [ -n "$(FORCE_CONFIG)" ] ;\ | 60 | if [ -n "$(FORCE_CONFIG)" ] ;\ |
61 | then \ | 61 | then \ |
62 | echo "LUAROCKS_FORCE_CONFIG=true" >> src/luarocks/config.lua ;\ | 62 | echo "LUAROCKS_FORCE_CONFIG=true" >> src/luarocks/site_config.lua ;\ |
63 | fi | 63 | fi |
64 | echo "LUAROCKS_UNAME_S=[[$(LUAROCKS_UNAME_S)]]" >> src/luarocks/config.lua | 64 | echo "LUAROCKS_UNAME_S=[[$(LUAROCKS_UNAME_S)]]" >> src/luarocks/site_config.lua |
65 | echo "LUAROCKS_UNAME_M=[[$(LUAROCKS_UNAME_M)]]" >> src/luarocks/config.lua | 65 | echo "LUAROCKS_UNAME_M=[[$(LUAROCKS_UNAME_M)]]" >> src/luarocks/site_config.lua |
66 | echo "LUAROCKS_DOWNLOADER=[[$(LUAROCKS_DOWNLOADER)]]" >> src/luarocks/config.lua | 66 | echo "LUAROCKS_DOWNLOADER=[[$(LUAROCKS_DOWNLOADER)]]" >> src/luarocks/site_config.lua |
67 | echo "LUAROCKS_MD5CHECKER=[[$(LUAROCKS_MD5CHECKER)]]" >> src/luarocks/config.lua | 67 | echo "LUAROCKS_MD5CHECKER=[[$(LUAROCKS_MD5CHECKER)]]" >> src/luarocks/site_config.lua |
68 | 68 | ||
69 | build_bins: | 69 | build_bins: |
70 | for f in $(BIN_FILES) ;\ | 70 | for f in $(BIN_FILES) ;\ |
@@ -76,7 +76,7 @@ build_bins: | |||
76 | rm src/bin/$$f.bak ;\ | 76 | rm src/bin/$$f.bak ;\ |
77 | done | 77 | done |
78 | 78 | ||
79 | built: cleanup_bins src/luarocks/config.lua build_bins | 79 | built: cleanup_bins src/luarocks/site_config.lua build_bins |
80 | touch built | 80 | touch built |
81 | @echo | 81 | @echo |
82 | @echo "Done. Type 'make install' to install into $(PREFIX)." | 82 | @echo "Done. Type 'make install' to install into $(PREFIX)." |
@@ -106,7 +106,7 @@ cleanup_bins: | |||
106 | done | 106 | done |
107 | 107 | ||
108 | clean: cleanup_bins | 108 | clean: cleanup_bins |
109 | rm -f src/luarocks/config.lua | 109 | rm -f src/luarocks/site_config.lua |
110 | rm -f built | 110 | rm -f built |
111 | 111 | ||
112 | install_bins: | 112 | install_bins: |
@@ -117,9 +117,9 @@ install_luas: | |||
117 | mkdir -p "$(DESTDIR)$(LUADIR)/luarocks" | 117 | mkdir -p "$(DESTDIR)$(LUADIR)/luarocks" |
118 | cd src/luarocks && for f in $(LUAROCKS_FILES); do d="$(DESTDIR)$(LUADIR)/luarocks"/`dirname "$$f"`; mkdir -p "$$d"; cp "$$f" "$$d"; done | 118 | cd src/luarocks && for f in $(LUAROCKS_FILES); do d="$(DESTDIR)$(LUADIR)/luarocks"/`dirname "$$f"`; mkdir -p "$$d"; cp "$$f" "$$d"; done |
119 | 119 | ||
120 | install_config: | 120 | install_site_config: |
121 | mkdir -p "$(DESTDIR)$(LUADIR)/luarocks" | 121 | mkdir -p "$(DESTDIR)$(LUADIR)/luarocks" |
122 | cd src/luarocks && cp config.lua "$(DESTDIR)$(LUADIR)/luarocks" | 122 | cd src/luarocks && cp site_config.lua "$(DESTDIR)$(LUADIR)/luarocks" |
123 | 123 | ||
124 | write_sysconfig: | 124 | write_sysconfig: |
125 | mkdir -p "$(DESTDIR)$(ROCKS_TREE)" | 125 | mkdir -p "$(DESTDIR)$(ROCKS_TREE)" |
@@ -138,9 +138,9 @@ write_sysconfig: | |||
138 | echo '}' >> "$(DESTDIR)$(CONFIG_FILE)" ;\ | 138 | echo '}' >> "$(DESTDIR)$(CONFIG_FILE)" ;\ |
139 | fi | 139 | fi |
140 | 140 | ||
141 | install: built install_bins install_luas install_config write_sysconfig | 141 | install: built install_bins install_luas install_site_config write_sysconfig |
142 | 142 | ||
143 | bootstrap: src/luarocks/config.lua install_config write_sysconfig | 143 | bootstrap: src/luarocks/site_config.lua install_site_config write_sysconfig |
144 | LUA_PATH="$$PWD/src/?.lua;$$LUA_PATH" src/bin/luarocks make rockspec | 144 | LUA_PATH="$$PWD/src/?.lua;$$LUA_PATH" src/bin/luarocks make rockspec |
145 | 145 | ||
146 | install_rock: install_bins install_luas | 146 | install_rock: install_bins install_luas |
diff --git a/install.bat b/install.bat index df2a18d8..3b5742ee 100644 --- a/install.bat +++ b/install.bat | |||
@@ -269,27 +269,27 @@ IF ERRORLEVEL 1 GOTO ERROR | |||
269 | XCOPY /S src\luarocks\*.* "%LUADIR%\luarocks" >NUL | 269 | XCOPY /S src\luarocks\*.* "%LUADIR%\luarocks" >NUL |
270 | IF ERRORLEVEL 1 GOTO ERROR | 270 | IF ERRORLEVEL 1 GOTO ERROR |
271 | 271 | ||
272 | IF EXIST "%LUADIR%\luarocks\config.lua" RENAME "%LUADIR%\luarocks\config.lua" config.lua.bak | 272 | IF EXIST "%LUADIR%\luarocks\site_config.lua" RENAME "%LUADIR%\luarocks\site_config.lua" site_config.lua.bak |
273 | ECHO module("luarocks.config")>> "%LUADIR%\luarocks\config.lua" | 273 | ECHO module("luarocks.site_config")>> "%LUADIR%\luarocks\site_config.lua" |
274 | ECHO LUA_INCDIR=[[%LUA_INCDIR%]]>> "%LUADIR%\luarocks\config.lua" | 274 | ECHO LUA_INCDIR=[[%LUA_INCDIR%]]>> "%LUADIR%\luarocks\site_config.lua" |
275 | ECHO LUA_LIBDIR=[[%LUA_LIBDIR%]]>> "%LUADIR%\luarocks\config.lua" | 275 | ECHO LUA_LIBDIR=[[%LUA_LIBDIR%]]>> "%LUADIR%\luarocks\site_config.lua" |
276 | ECHO LUA_BINDIR=[[%LUA_BINDIR%]]>> "%LUADIR%\luarocks\config.lua" | 276 | ECHO LUA_BINDIR=[[%LUA_BINDIR%]]>> "%LUADIR%\luarocks\site_config.lua" |
277 | ECHO LUA_INTERPRETER=[[%LUA_INTERPRETER%]]>> "%LUADIR%\luarocks\config.lua" | 277 | ECHO LUA_INTERPRETER=[[%LUA_INTERPRETER%]]>> "%LUADIR%\luarocks\site_config.lua" |
278 | IF [%USE_MINGW%]==[ON] ( | 278 | IF [%USE_MINGW%]==[ON] ( |
279 | ECHO LUAROCKS_UNAME_S=[[MINGW]]>> "%LUADIR%\luarocks\config.lua" | 279 | ECHO LUAROCKS_UNAME_S=[[MINGW]]>> "%LUADIR%\luarocks\site_config.lua" |
280 | ) ELSE ( | 280 | ) ELSE ( |
281 | ECHO LUAROCKS_UNAME_S=[[WindowsNT]]>> "%LUADIR%\luarocks\config.lua" | 281 | ECHO LUAROCKS_UNAME_S=[[WindowsNT]]>> "%LUADIR%\luarocks\site_config.lua" |
282 | ) | 282 | ) |
283 | ECHO LUAROCKS_UNAME_M=[[x86]]>> "%LUADIR%\luarocks\config.lua" | 283 | ECHO LUAROCKS_UNAME_M=[[x86]]>> "%LUADIR%\luarocks\site_config.lua" |
284 | ECHO LUAROCKS_SYSCONFIG=[[%SYSCONFDIR%/config.lua]]>> "%LUADIR%\luarocks\config.lua" | 284 | ECHO LUAROCKS_SYSCONFIG=[[%SYSCONFDIR%/config.lua]]>> "%LUADIR%\luarocks\site_config.lua" |
285 | ECHO LUAROCKS_ROCKS_TREE=[[%ROCKS_TREE%]]>> "%LUADIR%\luarocks\config.lua" | 285 | ECHO LUAROCKS_ROCKS_TREE=[[%ROCKS_TREE%]]>> "%LUADIR%\luarocks\site_config.lua" |
286 | ECHO LUAROCKS_PREFIX=[[%PREFIX%]]>> "%LUADIR%\luarocks\config.lua" | 286 | ECHO LUAROCKS_PREFIX=[[%PREFIX%]]>> "%LUADIR%\luarocks\site_config.lua" |
287 | ECHO LUAROCKS_DOWNLOADER=[[curl]]>> "%LUADIR%\luarocks\config.lua" | 287 | ECHO LUAROCKS_DOWNLOADER=[[curl]]>> "%LUADIR%\luarocks\site_config.lua" |
288 | ECHO LUAROCKS_MD5CHECKER=[[md5sum]]>> "%LUADIR%\luarocks\config.lua" | 288 | ECHO LUAROCKS_MD5CHECKER=[[md5sum]]>> "%LUADIR%\luarocks\site_config.lua" |
289 | IF NOT [%FORCE_CONFIG%]==[] ECHO local LUAROCKS_FORCE_CONFIG=true>> "%LUADIR%\luarocks\config.lua" | 289 | IF NOT [%FORCE_CONFIG%]==[] ECHO local LUAROCKS_FORCE_CONFIG=true>> "%LUADIR%\luarocks\site_config.lua" |
290 | IF EXIST "%LUADIR%\luarocks\config.lua.bak" TYPE "%LUADIR%\luarocks\config.lua.bak">> "%LUADIR%\luarocks\config.lua" | 290 | IF EXIST "%LUADIR%\luarocks\site_config.lua.bak" TYPE "%LUADIR%\luarocks\site_config.lua.bak">> "%LUADIR%\luarocks\site_config.lua" |
291 | 291 | ||
292 | IF EXIST "%LUADIR%\luarocks\config.lua.bak" DEL /F /Q "%LUADIR%\luarocks\config.lua.bak" | 292 | IF EXIST "%LUADIR%\luarocks\site_config.lua.bak" DEL /F /Q "%LUADIR%\luarocks\site_config.lua.bak" |
293 | 293 | ||
294 | SET CONFIG_FILE=%SYSCONFDIR%\config.lua | 294 | SET CONFIG_FILE=%SYSCONFDIR%\config.lua |
295 | 295 | ||
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua index d2858cca..476bfbc3 100644 --- a/src/luarocks/cfg.lua +++ b/src/luarocks/cfg.lua | |||
@@ -10,19 +10,19 @@ local rawset, next, table, pairs, require, io, os, setmetatable, pcall, ipairs, | |||
10 | -- | 10 | -- |
11 | -- End-users shouldn't edit this file. They can override any defaults | 11 | -- End-users shouldn't edit this file. They can override any defaults |
12 | -- set in this file using their system-wide $LUAROCKS_SYSCONFIG file | 12 | -- set in this file using their system-wide $LUAROCKS_SYSCONFIG file |
13 | -- (see luarocks.config) or their user-specific configuration file | 13 | -- (see luarocks.site_config) or their user-specific configuration file |
14 | -- (~/.luarocks/config.lua on Unix or %APPDATA%/luarocks/config.lua on | 14 | -- (~/.luarocks/config.lua on Unix or %APPDATA%/luarocks/config.lua on |
15 | -- Windows). | 15 | -- Windows). |
16 | module("luarocks.cfg") | 16 | module("luarocks.cfg") |
17 | 17 | ||
18 | -- Load site-local global configurations | 18 | -- Load site-local global configurations |
19 | local ok, config = pcall(require, "luarocks.config") | 19 | local ok, site_config = pcall(require, "luarocks.site_config") |
20 | if not ok then | 20 | if not ok then |
21 | io.stderr:write("Site-local luarocks/config.lua file not found. Incomplete installation?\n") | 21 | io.stderr:write("Site-local luarocks/site_config.lua file not found. Incomplete installation?\n") |
22 | config = {} | 22 | site_config = {} |
23 | end | 23 | end |
24 | 24 | ||
25 | _M.config = config | 25 | _M.site_config = site_config |
26 | 26 | ||
27 | program_version = "2.0.5" | 27 | program_version = "2.0.5" |
28 | user_agent = "LuaRocks/"..program_version | 28 | user_agent = "LuaRocks/"..program_version |
@@ -46,12 +46,12 @@ local detected = {} | |||
46 | local system,proc | 46 | local system,proc |
47 | 47 | ||
48 | -- A proper installation of LuaRocks will hardcode the system | 48 | -- A proper installation of LuaRocks will hardcode the system |
49 | -- and proc values with config.LUAROCKS_UNAME_S and config.LUAROCKS_UNAME_M, | 49 | -- and proc values with site_config.LUAROCKS_UNAME_S and site_config.LUAROCKS_UNAME_M, |
50 | -- so that this detection does not run every time. When it is | 50 | -- so that this detection does not run every time. When it is |
51 | -- performed, we use the Unix way to identify the system, | 51 | -- performed, we use the Unix way to identify the system, |
52 | -- even on Windows (assuming UnxUtils or Cygwin). | 52 | -- even on Windows (assuming UnxUtils or Cygwin). |
53 | system = config.LUAROCKS_UNAME_S or io.popen("uname -s"):read("*l") | 53 | system = site_config.LUAROCKS_UNAME_S or io.popen("uname -s"):read("*l") |
54 | proc = config.LUAROCKS_UNAME_M or io.popen("uname -m"):read("*l") | 54 | proc = site_config.LUAROCKS_UNAME_M or io.popen("uname -m"):read("*l") |
55 | if proc:match("i[%d]86") then | 55 | if proc:match("i[%d]86") then |
56 | proc = "x86" | 56 | proc = "x86" |
57 | elseif proc:match("amd64") or proc:match("x86_64") then | 57 | elseif proc:match("amd64") or proc:match("x86_64") then |
@@ -105,9 +105,9 @@ end | |||
105 | variables = {} | 105 | variables = {} |
106 | rocks_trees = {} | 106 | rocks_trees = {} |
107 | 107 | ||
108 | persist.load_into_table(config.LUAROCKS_SYSCONFIG or sys_config_file, _M) | 108 | persist.load_into_table(site_config.LUAROCKS_SYSCONFIG or sys_config_file, _M) |
109 | 109 | ||
110 | if not config.LUAROCKS_FORCE_CONFIG then | 110 | if not site_config.LUAROCKS_FORCE_CONFIG then |
111 | home_config_file = os.getenv("LUAROCKS_CONFIG") or home_config_file | 111 | home_config_file = os.getenv("LUAROCKS_CONFIG") or home_config_file |
112 | local home_overrides = persist.load_into_table(home_config_file, { home = home }) | 112 | local home_overrides = persist.load_into_table(home_config_file, { home = home }) |
113 | if home_overrides then | 113 | if home_overrides then |
@@ -120,8 +120,8 @@ if not next(rocks_trees) then | |||
120 | if home_tree then | 120 | if home_tree then |
121 | table.insert(rocks_trees, home_tree) | 121 | table.insert(rocks_trees, home_tree) |
122 | end | 122 | end |
123 | if config.LUAROCKS_ROCKS_TREE then | 123 | if site_config.LUAROCKS_ROCKS_TREE then |
124 | table.insert(rocks_trees, config.LUAROCKS_ROCKS_TREE) | 124 | table.insert(rocks_trees, site_config.LUAROCKS_ROCKS_TREE) |
125 | end | 125 | end |
126 | end | 126 | end |
127 | 127 | ||
@@ -146,9 +146,9 @@ local defaults = { | |||
146 | }, | 146 | }, |
147 | 147 | ||
148 | lua_extension = "lua", | 148 | lua_extension = "lua", |
149 | lua_interpreter = config.LUA_INTERPRETER or "lua", | 149 | lua_interpreter = site_config.LUA_INTERPRETER or "lua", |
150 | downloader = config.LUAROCKS_DOWNLOADER or "wget", | 150 | downloader = site_config.LUAROCKS_DOWNLOADER or "wget", |
151 | md5checker = config.LUAROCKS_MD5CHECKER or "md5sum", | 151 | md5checker = site_config.LUAROCKS_MD5CHECKER or "md5sum", |
152 | 152 | ||
153 | variables = { | 153 | variables = { |
154 | MAKE = "make", | 154 | MAKE = "make", |
@@ -213,15 +213,15 @@ if detected.windows then | |||
213 | defaults.external_lib_extension = "dll" | 213 | defaults.external_lib_extension = "dll" |
214 | defaults.obj_extension = "obj" | 214 | defaults.obj_extension = "obj" |
215 | defaults.external_deps_dirs = { "c:/external/" } | 215 | defaults.external_deps_dirs = { "c:/external/" } |
216 | defaults.variables.LUA_BINDIR = config.LUA_BINDIR and config.LUA_BINDIR:gsub("\\", "/") or "c:/lua5.1/bin" | 216 | defaults.variables.LUA_BINDIR = site_config.LUA_BINDIR and site_config.LUA_BINDIR:gsub("\\", "/") or "c:/lua5.1/bin" |
217 | defaults.variables.LUA_INCDIR = config.LUA_INCDIR and config.LUA_INCDIR:gsub("\\", "/") or "c:/lua5.1/include" | 217 | defaults.variables.LUA_INCDIR = site_config.LUA_INCDIR and site_config.LUA_INCDIR:gsub("\\", "/") or "c:/lua5.1/include" |
218 | defaults.variables.LUA_LIBDIR = config.LUA_LIBDIR and config.LUA_LIBDIR:gsub("\\", "/") or "c:/lua5.1/lib" | 218 | defaults.variables.LUA_LIBDIR = site_config.LUA_LIBDIR and site_config.LUA_LIBDIR:gsub("\\", "/") or "c:/lua5.1/lib" |
219 | defaults.cmake_generator = "MinGW Makefiles" | 219 | defaults.cmake_generator = "MinGW Makefiles" |
220 | defaults.makefile = "Makefile.win" | 220 | defaults.makefile = "Makefile.win" |
221 | defaults.variables.MAKE = "nmake" -- TODO: Split Windows flavors between mingw and msvc | 221 | defaults.variables.MAKE = "nmake" -- TODO: Split Windows flavors between mingw and msvc |
222 | defaults.variables.CC = "cl" | 222 | defaults.variables.CC = "cl" |
223 | defaults.variables.RC = "rc" | 223 | defaults.variables.RC = "rc" |
224 | defaults.variables.WRAPPER = config.LUAROCKS_PREFIX .. "\\2.0\\rclauncher.obj" | 224 | defaults.variables.WRAPPER = site_config.LUAROCKS_PREFIX .. "\\2.0\\rclauncher.obj" |
225 | defaults.variables.LD = "link" | 225 | defaults.variables.LD = "link" |
226 | defaults.variables.MT = "mt" | 226 | defaults.variables.MT = "mt" |
227 | defaults.variables.CFLAGS = "/MD /O2" | 227 | defaults.variables.CFLAGS = "/MD /O2" |
@@ -249,15 +249,15 @@ if detected.mingw32 then | |||
249 | defaults.external_lib_extension = "dll" | 249 | defaults.external_lib_extension = "dll" |
250 | defaults.obj_extension = "o" | 250 | defaults.obj_extension = "o" |
251 | defaults.external_deps_dirs = { "c:/external/" } | 251 | defaults.external_deps_dirs = { "c:/external/" } |
252 | defaults.variables.LUA_BINDIR = config.LUA_BINDIR and config.LUA_BINDIR:gsub("\\", "/") or "c:/lua5.1/bin" | 252 | defaults.variables.LUA_BINDIR = site_config.LUA_BINDIR and site_config.LUA_BINDIR:gsub("\\", "/") or "c:/lua5.1/bin" |
253 | defaults.variables.LUA_INCDIR = config.LUA_INCDIR and config.LUA_INCDIR:gsub("\\", "/") or "c:/lua5.1/include" | 253 | defaults.variables.LUA_INCDIR = site_config.LUA_INCDIR and site_config.LUA_INCDIR:gsub("\\", "/") or "c:/lua5.1/include" |
254 | defaults.variables.LUA_LIBDIR = config.LUA_LIBDIR and config.LUA_LIBDIR:gsub("\\", "/") or "c:/lua5.1/lib" | 254 | defaults.variables.LUA_LIBDIR = site_config.LUA_LIBDIR and site_config.LUA_LIBDIR:gsub("\\", "/") or "c:/lua5.1/lib" |
255 | defaults.cmake_generator = "MinGW Makefiles" | 255 | defaults.cmake_generator = "MinGW Makefiles" |
256 | defaults.make = "mingw32-make" -- TODO: Split Windows flavors between mingw and msvc | 256 | defaults.make = "mingw32-make" -- TODO: Split Windows flavors between mingw and msvc |
257 | defaults.makefile = "Makefile.win" | 257 | defaults.makefile = "Makefile.win" |
258 | defaults.variables.CC = "mingw32-gcc" | 258 | defaults.variables.CC = "mingw32-gcc" |
259 | defaults.variables.RC = "windres" | 259 | defaults.variables.RC = "windres" |
260 | defaults.variables.WRAPPER = config.LUAROCKS_PREFIX .. "\\2.0\\rclauncher.o" | 260 | defaults.variables.WRAPPER = site_config.LUAROCKS_PREFIX .. "\\2.0\\rclauncher.o" |
261 | defaults.variables.LD = "mingw32-gcc" | 261 | defaults.variables.LD = "mingw32-gcc" |
262 | defaults.variables.CFLAGS = "-O2" | 262 | defaults.variables.CFLAGS = "-O2" |
263 | defaults.variables.LIBFLAG = "-shared" | 263 | defaults.variables.LIBFLAG = "-shared" |
@@ -281,9 +281,9 @@ if detected.unix then | |||
281 | defaults.external_lib_extension = "so" | 281 | defaults.external_lib_extension = "so" |
282 | defaults.obj_extension = "o" | 282 | defaults.obj_extension = "o" |
283 | defaults.external_deps_dirs = { "/usr/local", "/usr" } | 283 | defaults.external_deps_dirs = { "/usr/local", "/usr" } |
284 | defaults.variables.LUA_BINDIR = config.LUA_BINDIR or "/usr/local/bin" | 284 | defaults.variables.LUA_BINDIR = site_config.LUA_BINDIR or "/usr/local/bin" |
285 | defaults.variables.LUA_INCDIR = config.LUA_INCDIR or "/usr/local/include" | 285 | defaults.variables.LUA_INCDIR = site_config.LUA_INCDIR or "/usr/local/include" |
286 | defaults.variables.LUA_LIBDIR = config.LUA_LIBDIR or "/usr/local/lib" | 286 | defaults.variables.LUA_LIBDIR = site_config.LUA_LIBDIR or "/usr/local/lib" |
287 | defaults.variables.CFLAGS = "-O2" | 287 | defaults.variables.CFLAGS = "-O2" |
288 | defaults.cmake_generator = "Unix Makefiles" | 288 | defaults.cmake_generator = "Unix Makefiles" |
289 | defaults.platforms = { "unix" } | 289 | defaults.platforms = { "unix" } |
@@ -356,7 +356,7 @@ end | |||
356 | defaults.variables.LUA = defaults.lua_interpreter | 356 | defaults.variables.LUA = defaults.lua_interpreter |
357 | defaults.variables.LIB_EXTENSION = defaults.lib_extension | 357 | defaults.variables.LIB_EXTENSION = defaults.lib_extension |
358 | defaults.variables.OBJ_EXTENSION = defaults.obj_extension | 358 | defaults.variables.OBJ_EXTENSION = defaults.obj_extension |
359 | defaults.variables.LUAROCKS_PREFIX = config.LUAROCKS_PREFIX | 359 | defaults.variables.LUAROCKS_PREFIX = site_config.LUAROCKS_PREFIX |
360 | 360 | ||
361 | -- Use defaults: | 361 | -- Use defaults: |
362 | 362 | ||