diff options
author | Hisham <hisham@gobolinux.org> | 2016-10-06 14:38:32 -0300 |
---|---|---|
committer | Hisham <hisham@gobolinux.org> | 2016-10-06 14:38:32 -0300 |
commit | ccfcd97d14659ba540927272fb307a4113ce0992 (patch) | |
tree | 60edf027da259aeb09f7aace0639895949011e12 | |
parent | 1dc76db86d3f02bb755e694276df8113e5c4f05b (diff) | |
download | luarocks-ccfcd97d14659ba540927272fb307a4113ce0992.tar.gz luarocks-ccfcd97d14659ba540927272fb307a4113ce0992.tar.bz2 luarocks-ccfcd97d14659ba540927272fb307a4113ce0992.zip |
Install site_config.lua after Makefile calls luarocks.
Otherwise, when luarocks removes a previous version it may
end up deleting the site_config.lua file that was freshly
installed. Closes #625.
-rw-r--r-- | Makefile | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -2,7 +2,8 @@ | |||
2 | include config.unix | 2 | include config.unix |
3 | 3 | ||
4 | .PHONY: all build dev build_bins luadoc check_makefile cleanup_bins clean \ | 4 | .PHONY: all build dev build_bins luadoc check_makefile cleanup_bins clean \ |
5 | install_site_config write_sysconfig install bootstrap install_rock | 5 | install_site_config write_sysconfig install bootstrap install_rock \ |
6 | run_luarocks | ||
6 | 7 | ||
7 | ROCKS_TREE ?= $(PREFIX) | 8 | ROCKS_TREE ?= $(PREFIX) |
8 | SYSCONFDIR ?= $(PREFIX)/etc/luarocks | 9 | SYSCONFDIR ?= $(PREFIX)/etc/luarocks |
@@ -124,6 +125,9 @@ cleanup_bins: | |||
124 | clean: cleanup_bins | 125 | clean: cleanup_bins |
125 | rm -f src/luarocks/site_config.lua | 126 | rm -f src/luarocks/site_config.lua |
126 | 127 | ||
128 | run_luarocks: | ||
129 | '$(LUA_BINDIR)/lua$(LUA_SUFFIX)' -e "package.path=[[$(SAFEPWD)/src/?.lua;]]..package.path" src/bin/luarocks make rockspec --tree="$(PREFIX)" | ||
130 | |||
127 | install_site_config: src/luarocks/site_config.lua | 131 | install_site_config: src/luarocks/site_config.lua |
128 | mkdir -p "$(DESTDIR)$(LUADIR)/luarocks" | 132 | mkdir -p "$(DESTDIR)$(LUADIR)/luarocks" |
129 | cp src/luarocks/site_config.lua "$(DESTDIR)$(LUADIR)/luarocks" | 133 | cp src/luarocks/site_config.lua "$(DESTDIR)$(LUADIR)/luarocks" |
@@ -144,8 +148,7 @@ write_sysconfig: | |||
144 | 148 | ||
145 | install: install_bins install_luas install_site_config write_sysconfig | 149 | install: install_bins install_luas install_site_config write_sysconfig |
146 | 150 | ||
147 | bootstrap: src/luarocks/site_config.lua install_site_config write_sysconfig cleanup_bins | 151 | bootstrap: src/luarocks/site_config.lua run_luarocks install_site_config write_sysconfig cleanup_bins |
148 | '$(LUA_BINDIR)/lua$(LUA_SUFFIX)' -e "package.path=[[$(SAFEPWD)/src/?.lua;]]..package.path" src/bin/luarocks make rockspec --tree="$(PREFIX)" | ||
149 | 152 | ||
150 | install_rock: install_bins install_luas | 153 | install_rock: install_bins install_luas |
151 | 154 | ||