aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2015-03-17 22:31:13 -0300
committerHisham Muhammad <hisham@gobolinux.org>2015-03-17 22:31:13 -0300
commitccab32f2a64f990c75023cad39d6b3966e9aeabb (patch)
tree5744a751a391e80048371bfac1e67436d08ec3ee /Makefile
parentff6fdfcbe7b62a61840359ac9ae472cba1989364 (diff)
parent855259b52e0e7c5ed81539c975dcaef4469797b9 (diff)
downloadluarocks-ccab32f2a64f990c75023cad39d6b3966e9aeabb.tar.gz
luarocks-ccab32f2a64f990c75023cad39d6b3966e9aeabb.tar.bz2
luarocks-ccab32f2a64f990c75023cad39d6b3966e9aeabb.zip
Merge branch 'new-makefile'
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 3 insertions, 38 deletions
diff --git a/Makefile b/Makefile
index 8159ddee..c56ebd0c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,32 +1,16 @@
1 1
2include config.unix 2include config.unix
3include Makefile.setup.inc
4include Makefile.install.inc
3 5
4.PHONY: all build dev build_bins luadoc check_makefile cleanup_bins clean \ 6.PHONY: all build dev build_bins luadoc check_makefile cleanup_bins clean \
5 install_bins install_luas install_site_config write_sysconfig \ 7 install_site_config write_sysconfig install bootstrap install_rock
6 install bootstrap install_rock
7 8
8DESTDIR =
9PREFIX ?= /usr/local
10ROCKS_TREE ?= $(PREFIX) 9ROCKS_TREE ?= $(PREFIX)
11SYSCONFDIR ?= $(PREFIX)/etc/luarocks 10SYSCONFDIR ?= $(PREFIX)/etc/luarocks
12BINDIR ?= $(PREFIX)/bin
13LUADIR ?= $(PREFIX)/share/lua/$(LUA_VERSION)/
14LUA_DIR ?= /usr/local 11LUA_DIR ?= /usr/local
15LUA_BINDIR ?= $(LUA_DIR)/bin 12LUA_BINDIR ?= $(LUA_DIR)/bin
16 13
17BIN_FILES = luarocks luarocks-admin
18LUAROCKS_FILES = fs/unix/tools.lua fs/unix.lua fs/win32/tools.lua fs/win32.lua \
19fs/lua.lua persist.lua list.lua require.lua repos.lua dir.lua make_manifest.lua \
20command_line.lua install.lua build/command.lua build/cmake.lua build/make.lua \
21build/builtin.lua fetch/cvs.lua fetch/git.lua fetch/sscm.lua tools/patch.lua \
22fetch/svn.lua tools/zip.lua tools/tar.lua pack.lua type_check.lua make.lua \
23remove.lua fs.lua manif.lua add.lua deps.lua build.lua search.lua show.lua \
24manif_core.lua fetch.lua unpack.lua validate.lua cfg.lua download.lua \
25help.lua util.lua index.lua cache.lua refresh_cache.lua loader.lua \
26admin_remove.lua fetch/hg.lua fetch/git_file.lua new_version.lua lint.lua \
27purge.lua path.lua path_cmd.lua write_rockspec.lua doc.lua upload.lua \
28upload/api.lua upload/multipart.lua fetch/git_http.lua
29
30CONFIG_FILE = $(SYSCONFDIR)/config-$(LUA_VERSION).lua 14CONFIG_FILE = $(SYSCONFDIR)/config-$(LUA_VERSION).lua
31 15
32SAFEPWD=`echo "$$PWD" | sed -e 's/\([][]\)\1/]]..'\''\1\1'\''..[[/g'` 16SAFEPWD=`echo "$$PWD" | sed -e 's/\([][]\)\1/]]..'\''\1\1'\''..[[/g'`
@@ -139,25 +123,6 @@ cleanup_bins:
139clean: cleanup_bins 123clean: cleanup_bins
140 rm -f src/luarocks/site_config.lua 124 rm -f src/luarocks/site_config.lua
141 125
142install_bins:
143 mkdir -p "$(DESTDIR)$(BINDIR)"
144 cd src/bin && \
145 luaver="$(LUA_VERSION)" && [ -n "$$luaver" ] || luaver=`$(LUA) -e 'print(_VERSION:sub(5))'`; \
146 for f in $(BIN_FILES); \
147 do \
148 cp "$$f" "$(DESTDIR)$(BINDIR)/$$f-$$luaver"; \
149 ln -nfs "$$f-$$luaver" "$(DESTDIR)$(BINDIR)/$$f"; \
150 done
151
152install_luas:
153 mkdir -p "$(DESTDIR)$(LUADIR)/luarocks"
154 cd src/luarocks && for f in $(LUAROCKS_FILES); \
155 do \
156 d="$(DESTDIR)$(LUADIR)/luarocks"/`dirname "$$f"` && \
157 mkdir -p "$$d" && \
158 cp "$$f" "$$d" || exit 1; \
159 done
160
161install_site_config: src/luarocks/site_config.lua 126install_site_config: src/luarocks/site_config.lua
162 mkdir -p "$(DESTDIR)$(LUADIR)/luarocks" 127 mkdir -p "$(DESTDIR)$(LUADIR)/luarocks"
163 cp src/luarocks/site_config.lua "$(DESTDIR)$(LUADIR)/luarocks" 128 cp src/luarocks/site_config.lua "$(DESTDIR)$(LUADIR)/luarocks"