[vlc-commits] contrib: lua: use UNPACK_DIR to extract to a different folder for luac

Steve Lhomme git at videolan.org
Wed Jul 15 08:22:51 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jul 10 09:39:37 2020 +0200| [c04c755b5378de4affb79ae37fca80d895fd449e] | committer: Steve Lhomme

contrib: lua: use UNPACK_DIR to extract to a different folder for luac

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c04c755b5378de4affb79ae37fca80d895fd449e
---

 contrib/src/lua/rules.mak | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/contrib/src/lua/rules.mak b/contrib/src/lua/rules.mak
index f9315e1594..5307b04ae8 100644
--- a/contrib/src/lua/rules.mak
+++ b/contrib/src/lua/rules.mak
@@ -99,13 +99,13 @@ ifdef HAVE_CROSS_COMPILE
 LUACVARS+=CFLAGS="" CPPFLAGS="" LDFLAGS=""
 endif
 
+# DO NOT use the same intermediate directory as the lua target
+luac: UNPACK_DIR=luac-$(LUA_VERSION)
 luac: lua-$(LUA_VERSION).tar.gz .sum-luac
-	# DO NOT use the same intermediate directory as the lua target
-	rm -Rf -- $@-$(LUA_VERSION) $@
-	mkdir -- $@-$(LUA_VERSION)
-	tar -x -v -z -o -C $@-$(LUA_VERSION) --strip-components=1 -f $<
-	(cd luac-$(LUA_VERSION) && patch -p1) < $(SRC)/lua/luac-32bits.patch
-	mv luac-$(LUA_VERSION) luac
+	$(RM) -Rf $@ $(UNPACK_DIR) && mkdir -p $(UNPACK_DIR)
+	tar xvzfo $< -C $(UNPACK_DIR) --strip-components=1
+	$(APPLY) $(SRC)/lua/luac-32bits.patch
+	$(MOVE)
 
 .luac: luac
 	cd $< && $(LUACVARS) $(MAKE) generic



More information about the vlc-commits mailing list