[vlc-commits] contrib: depollute Makefile variables name space

Rémi Denis-Courmont git at videolan.org
Sun Aug 19 23:56:46 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Aug 20 00:56:10 2012 +0300| [837f0d296d1f5b92b2f582969d659bb53303bb55] | committer: Rémi Denis-Courmont

contrib: depollute Makefile variables name space

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

 contrib/src/caca/rules.mak   |   12 +++++++++---
 contrib/src/gcrypt/rules.mak |   19 +++++++++----------
 contrib/src/growl/rules.mak  |    8 ++++----
 contrib/src/qt4/rules.mak    |    6 +++---
 contrib/src/speex/rules.mak  |    8 ++++----
 contrib/src/vpx/rules.mak    |   12 +++++-------
 6 files changed, 34 insertions(+), 31 deletions(-)

diff --git a/contrib/src/caca/rules.mak b/contrib/src/caca/rules.mak
index 7477675..5a9a2ce 100644
--- a/contrib/src/caca/rules.mak
+++ b/contrib/src/caca/rules.mak
@@ -24,12 +24,18 @@ ifdef HAVE_WIN32
 endif
 	$(MOVE)
 
-CONFIGURE_FLAGS := --disable-imlib2 --disable-doc --disable-ruby --disable-csharp --disable-cxx --disable-java
+CACA_CONF := \
+	--disable-imlib2 \
+	--disable-doc \
+	--disable-ruby \
+	--disable-csharp \
+	--disable-cxx \
+	--disable-java
 ifdef HAVE_MACOSX
-CONFIGURE_FLAGS += --disable-x11
+CACA_CONF += --disable-x11
 endif
 
 .caca: caca
-	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(CONFIGURE_FLAGS)
+	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(CACA_CONF)
 	cd $< && $(MAKE) -C $< install
 	touch $@
diff --git a/contrib/src/gcrypt/rules.mak b/contrib/src/gcrypt/rules.mak
index 6b37a71..d7eb673 100644
--- a/contrib/src/gcrypt/rules.mak
+++ b/contrib/src/gcrypt/rules.mak
@@ -15,29 +15,28 @@ libgcrypt: libgcrypt-$(GCRYPT_VERSION).tar.bz2 .sum-gcrypt
 
 DEPS_gcrypt = gpg-error
 
-CONFIGURE_OPTS =
+GCRYPT_CONF = \
+	--enable-ciphers=aes,des,rfc2268,arcfour \
+	--enable-digests=sha1,md5,rmd160,sha512 \
+	--enable-pubkey-ciphers=dsa,rsa,ecc
 ifdef HAVE_WIN64
-CONFIGURE_OPTS += --disable-asm
+GCRYPT_CONF += --disable-asm
 endif
 ifdef HAVE_MACOSX
-CONFIGURE_OPTS += --disable-aesni-support
+GCRYPT_CONF += --disable-aesni-support
 else
 ifdef HAVE_BSD
-CONFIGURE_OPTS += --disable-asm --disable-aesni-support
+GCRYPT_CONF += --disable-asm --disable-aesni-support
 endif
 endif
 ifdef HAVE_ANDROID
 ifeq ($(ANDROID_ABI), x86)
-CONFIGURE_OPTS += ac_cv_sys_symbol_underscore=no
+GCRYPT_CONF += ac_cv_sys_symbol_underscore=no
 endif
 endif
 
 .gcrypt: libgcrypt
 	#$(RECONF)
-	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) \
-		--enable-ciphers=aes,des,rfc2268,arcfour \
-		--enable-digests=sha1,md5,rmd160,sha512 \
-		--enable-pubkey-ciphers=dsa,rsa,ecc \
-		$(CONFIGURE_OPTS)
+	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(GCRYPT_CONF)
 	cd $< && $(MAKE) install
 	touch $@
diff --git a/contrib/src/growl/rules.mak b/contrib/src/growl/rules.mak
index 3f22708..6ed549d 100644
--- a/contrib/src/growl/rules.mak
+++ b/contrib/src/growl/rules.mak
@@ -13,17 +13,17 @@ $(TARBALLS)/growl-$(GROWL_VERSION).tar.bz2:
 .sum-growl: growl-$(GROWL_VERSION).tar.bz2
 
 ifeq ($(shell clang -v 2>/dev/null || echo FAIL),)
-COMPILER=com.apple.compilers.llvm.clang.1_0
+GROWL_COMPILER=com.apple.compilers.llvm.clang.1_0
 else
-COMPILER=com.apple.compilers.gcc.4_2
+GROWL_COMPILER=com.apple.compilers.gcc.4_2
 endif
 
 growl: growl-$(GROWL_VERSION).tar.bz2 .sum-growl
 	$(UNPACK)
 	mv Growl-1.2.2-src $@
 	sed -i.orig -e s/"SDKROOT = macosx10.5"/"SDKROOT = macosx$(OSX_VERSION)"/g \
-		-e s/"GCC_VERSION = 4.0"/"GCC_VERSION = $(COMPILER)"/g \
-		-e s/com.apple.compilers.gcc.4_0/$(COMPILER)/g \
+		-e s/"GCC_VERSION = 4.0"/"GCC_VERSION = $(GROWL_COMPILER)"/g \
+		-e s/com.apple.compilers.gcc.4_0/$(GROWL_COMPILER)/g \
 		$@/Growl.xcodeproj/project.pbxproj
 	sed -i.orig -e s/"REVISION \$$REV"/"REVISION 0x\$$REV"/g $@/generateHgRevision.sh
 	touch $@
diff --git a/contrib/src/qt4/rules.mak b/contrib/src/qt4/rules.mak
index 2c97b77..0c28175 100644
--- a/contrib/src/qt4/rules.mak
+++ b/contrib/src/qt4/rules.mak
@@ -31,14 +31,14 @@ qt4: qt-$(QT4_VERSION).tar.gz .sum-qt4
 XTOOLS := XCC="$(CC)" XCXX="$(CXX)" XSTRIP="$(STRIP)" XAR="$(AR)"
 
 ifdef HAVE_MACOSX
-PLATFORM := -platform darwin-g++
+QT_PLATFORM := -platform darwin-g++
 endif
 ifdef HAVE_WIN32
-PLATFORM := -xplatform win32-g++
+QT_PLATFORM := -xplatform win32-g++
 endif
 
 .qt4: qt4
-	cd $< && $(XTOOLS) ./configure $(PLATFORM) -static -release -fast -no-exceptions -no-stl -no-sql-sqlite -no-qt3support -no-gif -no-libmng -qt-libjpeg -no-libtiff -no-qdbus -no-openssl -no-webkit -sse -no-script -no-multimedia -no-phonon -opensource -no-scripttools -no-opengl -no-script -no-scripttools -no-declarative -no-declarative-debug -opensource -no-s60 -host-little-endian -confirm-license
+	cd $< && $(XTOOLS) ./configure $(QT_PLATFORM) -static -release -fast -no-exceptions -no-stl -no-sql-sqlite -no-qt3support -no-gif -no-libmng -qt-libjpeg -no-libtiff -no-qdbus -no-openssl -no-webkit -sse -no-script -no-multimedia -no-phonon -opensource -no-scripttools -no-opengl -no-script -no-scripttools -no-declarative -no-declarative-debug -opensource -no-s60 -host-little-endian -confirm-license
 	cd $< && $(MAKE) $(XTOOLS) sub-src
 	# BUILDING QT BUILD TOOLS
 ifdef HAVE_CROSS_COMPILE
diff --git a/contrib/src/speex/rules.mak b/contrib/src/speex/rules.mak
index 1bb9402..fb96a6b 100644
--- a/contrib/src/speex/rules.mak
+++ b/contrib/src/speex/rules.mak
@@ -28,17 +28,17 @@ speex: speex-$(SPEEX_VERSION).tar.gz .sum-speex
 	$(APPLY) $(SRC)/speex/neon.patch
 	$(MOVE)
 
-CONFIG_OPTS := --without-ogg --enable-resample-full-sinc-table
+SPEEX_CONF := --without-ogg --enable-resample-full-sinc-table
 ifndef HAVE_FPU
-CONFIG_OPTS += --enable-fixed-point
+SPEEX_CONF += --enable-fixed-point
 ifeq ($(ARCH),arm)
-CONFIG_OPTS += --enable-arm5e-asm
+SPEEX_CONF += --enable-arm5e-asm
 endif
 endif
 
 .speex: speex
 	$(RECONF)
-	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(CONFIG_OPTS)
+	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(SPEEX_CONF)
 	cd $< && $(MAKE) install
 	touch $@
 
diff --git a/contrib/src/vpx/rules.mak b/contrib/src/vpx/rules.mak
index 9950bab..76f1430 100644
--- a/contrib/src/vpx/rules.mak
+++ b/contrib/src/vpx/rules.mak
@@ -8,12 +8,6 @@ $(TARBALLS)/libvpx-$(VPX_VERSION).tar.bz2:
 
 .sum-vpx: libvpx-$(VPX_VERSION).tar.bz2
 
-ifneq ($(which bash),/bin/bash)
-PATCH_BASH_LOCATION=sed -i.orig s,^\#!/bin/bash,\#!`which bash`,g `grep -Rl ^\#!/bin/bash libvpx-$(VPX_VERSION)`
-else
-PATCH_BASH_LOCATION=true #bash is in /bin
-endif
-
 libvpx: libvpx-$(VPX_VERSION).tar.bz2 .sum-vpx
 	$(UNPACK)
 	$(APPLY) $(SRC)/vpx/libvpx-no-cross.patch
@@ -22,7 +16,11 @@ ifdef HAVE_MACOSX
 	$(APPLY) $(SRC)/vpx/libvpx-mac.patch
 	$(APPLY) $(SRC)/vpx/libvpx-mac-mountain-lion.patch
 endif
-	$(PATCH_BASH_LOCATION)
+ifneq ($(which bash),/bin/bash)
+	sed -i.orig \
+		s,^\#!/bin/bash,\#!`which bash`,g \
+		`grep -Rl ^\#!/bin/bash libvpx-$(VPX_VERSION)`
+endif
 	$(MOVE)
 
 DEPS_vpx =



More information about the vlc-commits mailing list