pkg-autotools: remove redundant shell conditional
authorYann E. MORIN <yann.morin.1998@free.fr>
Wed, 12 Nov 2014 00:25:51 +0000 (01:25 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 22 Nov 2014 19:36:42 +0000 (20:36 +0100)
The libtool patching function checks whether patching libtool is wanted
before doing the actual patching.

This is redundant now, as all callers are now protected by a conditional
block.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Johan Oudinet <johan.oudinet@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/pkg-autotools.mk

index 45947b00886a09dc34ea78d513265deb480664a3..e240b95c1c722ce49f7d741e17c686f84652c7d5 100644 (file)
@@ -44,19 +44,17 @@ endef
 #
 define PATCH_LIBTOOL
        @$(call MESSAGE,"Patching libtool")
-       $(Q)if test "$($(PKG)_LIBTOOL_PATCH)" = "YES" ]; then \
-               for i in `find $(1) -name ltmain.sh`; do \
-                       ltmain_version=`sed -n '/^[     ]*VERSION=/{s/^[        ]*VERSION=//;p;q;}' $$i | \
-                       sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \
-                       if test $${ltmain_version} = '1.5'; then \
-                               $(APPLY_PATCHES) $${i%/*} support/libtool buildroot-libtool-v1.5.patch; \
-                       elif test $${ltmain_version} = "2.2"; then\
-                               $(APPLY_PATCHES) $${i%/*} support/libtool buildroot-libtool-v2.2.patch; \
-                       elif test $${ltmain_version} = "2.4"; then\
-                               $(APPLY_PATCHES) $${i%/*} support/libtool buildroot-libtool-v2.4.patch; \
-                       fi \
-               done \
-       fi
+       $(Q)for i in `find $(1) -name ltmain.sh`; do \
+               ltmain_version=`sed -n '/^[     ]*VERSION=/{s/^[        ]*VERSION=//;p;q;}' $$i | \
+               sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \
+               if test $${ltmain_version} = '1.5'; then \
+                       $(APPLY_PATCHES) $${i%/*} support/libtool buildroot-libtool-v1.5.patch; \
+               elif test $${ltmain_version} = "2.2"; then\
+                       $(APPLY_PATCHES) $${i%/*} support/libtool buildroot-libtool-v2.2.patch; \
+               elif test $${ltmain_version} = "2.4"; then\
+                       $(APPLY_PATCHES) $${i%/*} support/libtool buildroot-libtool-v2.4.patch; \
+               fi \
+       done
 endef
 
 # This function generates the ac_cv_file_<foo> value for a given