diff options
author | daurnimator <quae@daurnimator.com> | 2018-08-05 12:21:38 +1000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-08-10 16:52:18 -0300 |
commit | f8d4ac493de6165e04ab12c3adba098ee1347842 (patch) | |
tree | 4958b31436c1aa4afe13996c49bd232906566e54 | |
parent | 855eaf4cb6cc1082bc5a62c604b7580dc0857346 (diff) | |
download | luarocks-f8d4ac493de6165e04ab12c3adba098ee1347842.tar.gz luarocks-f8d4ac493de6165e04ab12c3adba098ee1347842.tar.bz2 luarocks-f8d4ac493de6165e04ab12c3adba098ee1347842.zip |
Makefile: Create ./build/luarocks{,-admin} in build phase
-rw-r--r-- | Makefile | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -10,7 +10,7 @@ all: build | |||
10 | # Base build | 10 | # Base build |
11 | # ---------------------------------------- | 11 | # ---------------------------------------- |
12 | 12 | ||
13 | build: luarocks luarocks-admin | 13 | build: luarocks luarocks-admin ./build/luarocks ./build/luarocks-admin |
14 | 14 | ||
15 | config.unix: | 15 | config.unix: |
16 | @echo Please run the "./configure" script before building. | 16 | @echo Please run the "./configure" script before building. |
@@ -35,14 +35,6 @@ luarocks-admin: config.unix | |||
35 | echo 'LUAROCKS_SYSCONFDIR="$(luarocksconfdir)" LUA_PATH="$(CURDIR)/src/?.lua;;" exec "$(LUA_BINDIR)/$(LUA_INTERPRETER)" "$(CURDIR)/src/bin/luarocks-admin" --project-tree="$(CURDIR)/lua_modules" "$$@"' >> luarocks-admin | 35 | echo 'LUAROCKS_SYSCONFDIR="$(luarocksconfdir)" LUA_PATH="$(CURDIR)/src/?.lua;;" exec "$(LUA_BINDIR)/$(LUA_INTERPRETER)" "$(CURDIR)/src/bin/luarocks-admin" --project-tree="$(CURDIR)/lua_modules" "$$@"' >> luarocks-admin |
36 | chmod +rx ./luarocks-admin | 36 | chmod +rx ./luarocks-admin |
37 | 37 | ||
38 | # ---------------------------------------- | ||
39 | # Regular install | ||
40 | # ---------------------------------------- | ||
41 | |||
42 | install: all $(DESTDIR)$(prefix)/bin/luarocks $(DESTDIR)$(prefix)/bin/luarocks-admin $(DESTDIR)$(luarocksconfdir)/config-$(LUA_VERSION).lua | ||
43 | mkdir -p "$(DESTDIR)$(prefix)/share/lua/$(LUA_VERSION)/luarocks" | ||
44 | cp -a src/luarocks/* "$(DESTDIR)$(prefix)/share/lua/$(LUA_VERSION)/luarocks" | ||
45 | |||
46 | ./build/luarocks: src/bin/luarocks config.unix | 38 | ./build/luarocks: src/bin/luarocks config.unix |
47 | mkdir -p "$(@D)" | 39 | mkdir -p "$(@D)" |
48 | (printf '#!$(LUA_BINDIR)/$(LUA_INTERPRETER)\n'\ | 40 | (printf '#!$(LUA_BINDIR)/$(LUA_INTERPRETER)\n'\ |
@@ -59,6 +51,14 @@ install: all $(DESTDIR)$(prefix)/bin/luarocks $(DESTDIR)$(prefix)/bin/luarocks-a | |||
59 | tail -n +2 src/bin/luarocks-admin \ | 51 | tail -n +2 src/bin/luarocks-admin \ |
60 | )> "$@" | 52 | )> "$@" |
61 | 53 | ||
54 | # ---------------------------------------- | ||
55 | # Regular install | ||
56 | # ---------------------------------------- | ||
57 | |||
58 | install: all $(DESTDIR)$(prefix)/bin/luarocks $(DESTDIR)$(prefix)/bin/luarocks-admin $(DESTDIR)$(luarocksconfdir)/config-$(LUA_VERSION).lua | ||
59 | mkdir -p "$(DESTDIR)$(prefix)/share/lua/$(LUA_VERSION)/luarocks" | ||
60 | cp -a src/luarocks/* "$(DESTDIR)$(prefix)/share/lua/$(LUA_VERSION)/luarocks" | ||
61 | |||
62 | $(DESTDIR)$(prefix)/bin/luarocks: ./build/luarocks | 62 | $(DESTDIR)$(prefix)/bin/luarocks: ./build/luarocks |
63 | $(INSTALL) -D "$<" "$@" | 63 | $(INSTALL) -D "$<" "$@" |
64 | 64 | ||