pkg-autotools: move the libtool patching call out of the autoreconf hook
authorJohan Oudinet <johan.oudinet@gmail.com>
Wed, 12 Nov 2014 00:25:50 +0000 (01:25 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 22 Nov 2014 19:35:58 +0000 (20:35 +0100)
Call it as a standalone hook, like is done for post-patch.

[Thomas: change back the author to Johan. Yann mistakenly changed it
when submitting the patch series.]

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
[yann.morin.1998@free.fr: split the patch into semantically separate
patches]
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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/pkg-autotools.mk

index 393f9956440311e98d1fa4b367d589f034a01009..45947b00886a09dc34ea78d513265deb480664a3 100644 (file)
@@ -98,7 +98,6 @@ endef
 define AUTORECONF_HOOK
        @$(call MESSAGE,"Autoreconfiguring")
        $(Q)cd $($(PKG)_SRCDIR) && $($(PKG)_AUTORECONF_ENV) $(AUTORECONF) $($(PKG)_AUTORECONF_OPTS)
-       $(call PATCH_LIBTOOL,$($(PKG)_SRCDIR))
 endef
 
 ################################################################################
@@ -260,6 +259,10 @@ $(2)_PRE_CONFIGURE_HOOKS += GETTEXTIZE_HOOK
 $(2)_DEPENDENCIES += host-gettext
 endif
 $(2)_PRE_CONFIGURE_HOOKS += AUTORECONF_HOOK
+# default values are not evaluated yet, so don't rely on this defaulting to YES
+ifneq ($$($(2)_LIBTOOL_PATCH),NO)
+$(2)_PRE_CONFIGURE_HOOKS += LIBTOOL_PATCH_HOOK
+endif
 $(2)_DEPENDENCIES += host-automake host-autoconf host-libtool
 endif