pkg-luarocks: fix top-level parallel makefile support
commit22b327fc743b48a33aec0a9190bd67118641b294
authorFabio Porcedda <fabio.porcedda@gmail.com>
Wed, 1 Jul 2015 08:10:47 +0000 (1 10:10 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 4 Jul 2015 13:21:33 +0000 (4 15:21 +0200)
tree47e0d750719e30834d455022073aa6f962f2e046
parent1668e1da390c3320ed7bcf0377ba57ed2280b38d
pkg-luarocks: fix top-level parallel makefile support

In the *-install-target phase the manifest file is being updated, if multiply packages try to update it they fail.

To avoid multiple access to the manifest file use flock to sync
multiple luarocks packages.

e.g. installing three luarocks packages:
make lua-cjson-build lua-coat-build lua-coatpersistent-build
make lua-cjson lua-coat lua-coatpersistent -j

Fix error:
Updating manifest for /home/tetsuya/buildroot/br2/output/target/usr/lib/luarocks/rocks
No existing manifest. Attempting to rebuild...

Error: rock_manifest file not found for lua-coat 0.9.1-1 - not a LuaRocks 2 tree?

[Thomas: get rid of LUAROCKS_RUN, and use LUAROCKS_RUN_ENV +
LUAROCKS_RUN_CMD everywhere.]

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/luarocks/luarocks.mk
package/pkg-luarocks.mk