[vlc-commits] commit: contrib: Avoid ifdef recursion in .lua. (Pierre d'Herbemont )

git at videolan.org git at videolan.org
Sun Nov 7 21:28:45 CET 2010


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Sat Nov  6 12:55:05 2010 +0100| [db9941d65d2bfd8923d363bef38a14f105f6c6e8] | committer: Pierre d'Herbemont 

contrib: Avoid ifdef recursion in .lua.

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

 extras/contrib/src/contrib-src.mak |   26 +++++++-------------------
 1 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/extras/contrib/src/contrib-src.mak b/extras/contrib/src/contrib-src.mak
index 53dac24..6c57ba3 100644
--- a/extras/contrib/src/contrib-src.mak
+++ b/extras/contrib/src/contrib-src.mak
@@ -520,23 +520,11 @@ DISTCLEAN_PKG += pcre-$(PCRE_VERSION).tar.bz2
 # lua
 # ***************************************************************************
 
-ifdef HAVE_WIN32
-LUA_MAKEPLATEFORM=mingw
-else
-ifdef HAVE_MACOSX
-LUA_MAKEPLATEFORM=macosx
-else
-ifdef HAVE_LINUX
-LUA_MAKEPLATEFORM=linux
-else
-ifdef HAVE_BSD
-LUA_MAKEPLATEFORM=bsd
-else
-LUA_MAKEPLATEFORM=generic
-endif
-endif
-endif
-endif
+LUA_MAKEPLATEFORM-$(ENABLED)=generic
+LUA_MAKEPLATEFORM-$(HAVE_BSD)=bsd
+LUA_MAKEPLATEFORM-$(HAVE_LINUX)=linux
+LUA_MAKEPLATEFORM-$(HAVE_MACOSX)=macosx
+LUA_MAKEPLATEFORM-$(HAVE_WIN32)=mingw
 
 lua-$(LUA_VERSION).tar.gz:
 	$(WGET) $(LUA_URL)
@@ -550,11 +538,11 @@ endif
 .lua: lua
 ifdef HAVE_WIN32
 	( cd $< && sed -i.orig 's/lua luac/lua.exe/' Makefile && cd src && sed -i.orig 's/CC=/#CC=/' Makefile && sed -i 's/strip/$(STRIP)/' Makefile && cd ../..)
-	(cd $<&& $(HOSTCC) make $(LUA_MAKEPLATEFORM)&& cd src&& $(HOSTCC) make liblua.a&& cd ..&&$(HOSTCC) make install INSTALL_TOP=$(PREFIX)&& $(RANLIB) $(PREFIX)/lib/liblua.a)
+	(cd $<&& $(HOSTCC) make $(LUA_MAKEPLATEFORM-1)&& cd src&& $(HOSTCC) make liblua.a&& cd ..&&$(HOSTCC) make install INSTALL_TOP=$(PREFIX)&& $(RANLIB) $(PREFIX)/lib/liblua.a)
 	(cd $<&& sed -i.orig 's at prefix= /usr/local at prefix= $(PREFIX)@' etc/lua.pc&& mkdir -p $(PREFIX)/lib/pkgconfig&& cp etc/lua.pc $(PREFIX)/lib/pkgconfig)
 else
 	(cd $<&& patch -p1) < Patches/lua-noreadline.patch
-	(cd $<&& $(HOSTCC) make $(LUA_MAKEPLATEFORM) && make install INSTALL_TOP=$(PREFIX))
+	(cd $<&& $(HOSTCC) make $(LUA_MAKEPLATEFORM-1) && make install INSTALL_TOP=$(PREFIX))
 endif
 	touch $@
 



More information about the vlc-commits mailing list