xref: /OK3568_Linux_fs/buildroot/package/libtool/libtool.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# libtool
4#
5################################################################################
6
7LIBTOOL_VERSION = 2.4.6
8LIBTOOL_SOURCE = libtool-$(LIBTOOL_VERSION).tar.xz
9LIBTOOL_SITE = $(BR2_GNU_MIRROR)/libtool
10LIBTOOL_CPE_ID_VENDOR = gnu
11
12# For the target variant, we only want to build/install libltdl
13LIBTOOL_SUBDIR = libltdl
14HOST_LIBTOOL_SUBDIR = .
15
16LIBTOOL_INSTALL_STAGING = YES
17
18LIBTOOL_CONF_OPTS = --enable-ltdl-install
19
20LIBTOOL_DEPENDENCIES = host-m4
21HOST_LIBTOOL_DEPENDENCIES = host-m4
22
23LIBTOOL_LICENSE = LGPL-2.1+
24LIBTOOL_LICENSE_FILES = $(LIBTOOL_SUBDIR)/COPYING.LIB
25HOST_LIBTOOL_LICENSE = GPL-2.0+ (libtool), LGPL-2.1+ (libltdl)
26HOST_LIBTOOL_LICENSE_FILES = COPYING $(LIBTOOL_SUBDIR)/COPYING.LIB
27
28HOST_LIBTOOL_CONF_ENV = MAKEINFO=true
29HOST_LIBTOOL_LIBTOOL_PATCH = NO
30
31# We have a patch that affects libtool.m4, which triggers an autoreconf
32# in the build step. Normally we would set AUTORECONF = YES, but this
33# doesn't work for host-libtool because that creates a circular
34# dependency. Instead, touch the generated files so autoreconf is not
35# triggered in the build step. Note that aclocal.m4 has to be touched
36# first since the rest depends on it. Note that we don't need the changes
37# in libtool.m4 in our configure script, because we're not actually
38# running it on the target.
39# For the target, we would normally be able to use AUTORECONF, but it
40# fails on libltdl/Makefile.inc. Rather than trying to fix that failure,
41# just use the same hack as on the host.
42define LIBTOOL_AVOID_AUTORECONF_HOOK
43	find $(@D) -name aclocal.m4 -exec touch '{}' \;
44	find $(@D) -name config-h.in -exec touch '{}' \;
45	find $(@D) -name configure -exec touch '{}' \;
46	find $(@D) -name Makefile.in -exec touch '{}' \;
47endef
48LIBTOOL_PRE_CONFIGURE_HOOKS += LIBTOOL_AVOID_AUTORECONF_HOOK
49HOST_LIBTOOL_PRE_CONFIGURE_HOOKS += LIBTOOL_AVOID_AUTORECONF_HOOK
50
51$(eval $(autotools-package))
52$(eval $(host-autotools-package))
53
54# variables used by other packages
55LIBTOOL = $(HOST_DIR)/bin/libtool
56LIBTOOLIZE = $(HOST_DIR)/bin/libtoolize
57