blob: d8fdcdf95d17ebe0486baa53f7490172bcad72b3 [file] [log] [blame]
Eric Andersena7e49eb2007-08-10 19:07:51 +00001################################################################################
Thomas Petazzonid8b55b92009-11-08 18:37:49 +01002# Autotools package infrastructure
Eric Andersena7e49eb2007-08-10 19:07:51 +00003#
Thomas Petazzonid8b55b92009-11-08 18:37:49 +01004# This file implements an infrastructure that eases development of
5# package .mk files for autotools packages. It should be used for all
Thomas Petazzonic0e6b522012-04-17 16:45:20 +02006# packages that use the autotools as their build system.
Eric Andersena7e49eb2007-08-10 19:07:51 +00007#
Thomas Petazzonid8b55b92009-11-08 18:37:49 +01008# See the Buildroot documentation for details on the usage of this
9# infrastructure
Eric Andersena7e49eb2007-08-10 19:07:51 +000010#
Thomas Petazzonid8b55b92009-11-08 18:37:49 +010011# In terms of implementation, this autotools infrastructure requires
Thomas De Schampheleire60714bb2014-07-24 20:07:02 +020012# the .mk file to only specify metadata information about the
Thomas Petazzonid8b55b92009-11-08 18:37:49 +010013# package: name, version, download URL, etc.
Bernhard Reutner-Fischer00b84562007-09-30 12:46:02 +000014#
Thomas Petazzonid8b55b92009-11-08 18:37:49 +010015# We still allow the package .mk file to override what the different
16# steps are doing, if needed. For example, if <PKG>_BUILD_CMDS is
17# already defined, it is used as the list of commands to perform to
18# build the package, instead of the default autotools behaviour. The
19# package can also define some post operation hooks.
Bernhard Reutner-Fischer00b84562007-09-30 12:46:02 +000020#
Eric Andersena7e49eb2007-08-10 19:07:51 +000021################################################################################
22
Thomas Petazzoni102a93b2011-08-31 23:35:06 +020023
24#
25# Utility function to upgrade config.sub and config.guess files
26#
27# argument 1 : directory into which config.guess and config.sub need
28# to be updated. Note that config.sub and config.guess are searched
29# recursively in this directory.
30#
31define CONFIG_UPDATE
32 for file in config.guess config.sub; do \
33 for i in $$(find $(1) -name $$file); do \
34 cp support/gnuconfig/$$file $$i; \
35 done; \
36 done
37endef
38
Thomas Petazzonif4642ee2014-03-21 05:34:03 +010039# This function generates the ac_cv_file_<foo> value for a given
40# filename. This is needed to convince configure script doing
41# AC_CHECK_FILE() tests that the file actually exists, since such
42# tests cannot be done in a cross-compilation context. This function
43# takes as argument the path of the file. An example usage is:
44#
45# FOOBAR_CONF_ENV = \
46# $(call AUTOCONF_AC_CHECK_FILE_VAL,/dev/random)=yes
47AUTOCONF_AC_CHECK_FILE_VAL = ac_cv_file_$(subst -,_,$(subst /,_,$(subst .,_,$(1))))
48
Peter Korsgaardd58636d2009-01-16 10:27:48 +000049################################################################################
Arnout Vandecappelle (Essensium/Mind)46fa5cb2012-07-03 00:07:08 +020050# inner-autotools-package -- defines how the configuration, compilation and
Thomas Petazzonid8b55b92009-11-08 18:37:49 +010051# installation of an autotools package should be done, implements a
52# few hooks to tune the build process for autotools specifities and
53# calls the generic package infrastructure to generate the necessary
54# make targets
Peter Korsgaardd58636d2009-01-16 10:27:48 +000055#
Thomas Petazzonid8b55b92009-11-08 18:37:49 +010056# argument 1 is the lowercase package name
Thomas De Schampheleire5bd9ed62014-07-24 20:57:41 +020057# argument 2 is the uppercase package name, including a HOST_ prefix
Thomas Petazzonid8b55b92009-11-08 18:37:49 +010058# for host packages
59# argument 3 is the uppercase package name, without the HOST_ prefix
60# for host packages
Thomas De Schampheleire26aef882014-02-05 10:44:03 +010061# argument 4 is the type (target or host)
Peter Korsgaardd58636d2009-01-16 10:27:48 +000062################################################################################
63
Arnout Vandecappelle (Essensium/Mind)46fa5cb2012-07-03 00:07:08 +020064define inner-autotools-package
Eric Andersena7e49eb2007-08-10 19:07:51 +000065
Thomas Petazzonid2c73f52010-04-28 23:40:45 +020066ifndef $(2)_LIBTOOL_PATCH
67 ifdef $(3)_LIBTOOL_PATCH
Thomas De Schampheleire54456cc2014-06-11 21:12:24 +020068 $(2)_LIBTOOL_PATCH = $$($(3)_LIBTOOL_PATCH)
Thomas Petazzonid2c73f52010-04-28 23:40:45 +020069 else
70 $(2)_LIBTOOL_PATCH ?= YES
71 endif
72endif
73
Peter Korsgaardce1ae872011-05-17 10:00:01 +020074ifndef $(2)_MAKE
75 ifdef $(3)_MAKE
Thomas De Schampheleire54456cc2014-06-11 21:12:24 +020076 $(2)_MAKE = $$($(3)_MAKE)
Peter Korsgaardce1ae872011-05-17 10:00:01 +020077 else
Thomas De Schampheleire54456cc2014-06-11 21:12:24 +020078 $(2)_MAKE ?= $$(MAKE)
Peter Korsgaardce1ae872011-05-17 10:00:01 +020079 endif
80endif
81
Peter Korsgaard97c68702013-10-02 23:37:58 +020082ifndef $(2)_AUTORECONF
83 ifdef $(3)_AUTORECONF
Thomas De Schampheleire54456cc2014-06-11 21:12:24 +020084 $(2)_AUTORECONF = $$($(3)_AUTORECONF)
Peter Korsgaard97c68702013-10-02 23:37:58 +020085 else
86 $(2)_AUTORECONF ?= NO
87 endif
88endif
89
Yann E. MORIN89925832014-07-17 00:00:35 +020090ifndef $(2)_GETTEXTIZE
91 ifdef $(3)_GETTEXTIZE
92 $(2)_GETTEXTIZE = $$($(3)_GETTEXTIZE)
93 else
94 $(2)_GETTEXTIZE ?= NO
95 endif
96endif
97
Yann E. MORINbea8f262014-07-18 23:02:31 +020098ifeq ($(4),host)
99 $(2)_GETTEXTIZE_OPT ?= $$($(3)_GETTEXTIZE_OPT)
Yann E. MORIN89925832014-07-17 00:00:35 +0200100endif
101
Thomas De Schampheleire54456cc2014-06-11 21:12:24 +0200102ifeq ($(4),host)
103 $(2)_AUTORECONF_OPT ?= $$($(3)_AUTORECONF_OPT)
104endif
105
Eric Andersena7e49eb2007-08-10 19:07:51 +0000106$(2)_CONF_ENV ?=
107$(2)_CONF_OPT ?=
Bernhard Reutner-Fischer00b84562007-09-30 12:46:02 +0000108$(2)_MAKE_ENV ?=
Thomas De Schampheleire0518a982014-09-27 21:32:38 +0200109$(2)_MAKE_OPTS ?=
Thomas De Schampheleireb1993432014-09-27 21:32:39 +0200110$(2)_INSTALL_OPTS ?= install
Eric Andersena7e49eb2007-08-10 19:07:51 +0000111$(2)_INSTALL_STAGING_OPT ?= DESTDIR=$$(STAGING_DIR) install
Thomas De Schampheleire57f2b8d2014-09-27 21:32:40 +0200112$(2)_INSTALL_TARGET_OPTS ?= DESTDIR=$$(TARGET_DIR) install
Eric Andersena7e49eb2007-08-10 19:07:51 +0000113
114
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100115#
116# Configure step. Only define it if not already defined by the package
117# .mk file. And take care of the differences between host and target
118# packages.
119#
120ifndef $(2)_CONFIGURE_CMDS
Thomas De Schampheleire26aef882014-02-05 10:44:03 +0100121ifeq ($(4),target)
Eric Andersena7e49eb2007-08-10 19:07:51 +0000122
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100123# Configure package for target
124define $(2)_CONFIGURE_CMDS
125 (cd $$($$(PKG)_SRCDIR) && rm -rf config.cache && \
126 $$(TARGET_CONFIGURE_OPTS) \
127 $$(TARGET_CONFIGURE_ARGS) \
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100128 $$($$(PKG)_CONF_ENV) \
Romain Naourf8d4fe32014-08-22 11:12:53 +0200129 CONFIG_SITE=/dev/null \
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100130 ./configure \
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100131 --target=$$(GNU_TARGET_NAME) \
132 --host=$$(GNU_TARGET_NAME) \
133 --build=$$(GNU_HOST_NAME) \
134 --prefix=/usr \
135 --exec-prefix=/usr \
136 --sysconfdir=/etc \
Yann E. MORINa8d6e2c2011-08-10 00:12:34 +0200137 --program-prefix="" \
Thomas De Schampheleiree20df632014-02-05 14:51:00 +0100138 --disable-gtk-doc \
139 --disable-doc \
140 --disable-docs \
141 --disable-documentation \
142 --with-xmlto=no \
Peter Korsgaard4e0cd2e2014-02-09 01:00:22 +0100143 --with-fop=no \
Thomas Petazzoni3e37b0f2014-08-28 23:03:44 +0200144 --disable-dependency-tracking \
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100145 $$(DISABLE_NLS) \
146 $$(DISABLE_LARGEFILE) \
147 $$(DISABLE_IPV6) \
Thomas Petazzoni009d8fc2011-05-30 23:57:02 +0200148 $$(SHARED_STATIC_LIBS_OPTS) \
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100149 $$(QUIET) $$($$(PKG)_CONF_OPT) \
150 )
151endef
Eric Andersena7e49eb2007-08-10 19:07:51 +0000152else
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100153
154# Configure package for host
Arnout Vandecappelle489970e2012-12-12 04:07:22 +0000155# disable all kind of documentation generation in the process,
156# because it often relies on host tools which may or may not be
157# installed.
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100158define $(2)_CONFIGURE_CMDS
159 (cd $$($$(PKG)_SRCDIR) && rm -rf config.cache; \
160 $$(HOST_CONFIGURE_OPTS) \
161 CFLAGS="$$(HOST_CFLAGS)" \
162 LDFLAGS="$$(HOST_LDFLAGS)" \
Lionel Landwerlin1b41e322010-04-30 02:24:09 +0200163 $$($$(PKG)_CONF_ENV) \
Romain Naourf8d4fe32014-08-22 11:12:53 +0200164 CONFIG_SITE=/dev/null \
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100165 ./configure \
166 --prefix="$$(HOST_DIR)/usr" \
167 --sysconfdir="$$(HOST_DIR)/etc" \
Thomas Petazzoni009d8fc2011-05-30 23:57:02 +0200168 --enable-shared --disable-static \
Arnout Vandecappelle489970e2012-12-12 04:07:22 +0000169 --disable-gtk-doc \
170 --disable-doc \
171 --disable-docs \
172 --disable-documentation \
173 --with-xmlto=no \
174 --with-fop=no \
Thomas Petazzoni3e37b0f2014-08-28 23:03:44 +0200175 --disable-dependency-tracking \
Peter Korsgaard9f5a9de2013-07-17 09:37:36 +0200176 $$(QUIET) $$($$(PKG)_CONF_OPT) \
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100177 )
178endef
179endif
Eric Andersena7e49eb2007-08-10 19:07:51 +0000180endif
181
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100182#
183# Hook to update config.sub and config.guess if needed
184#
185define UPDATE_CONFIG_HOOK
Danomi Manchego28bb03a2013-03-11 15:58:31 +0000186 @$$(call MESSAGE,"Updating config.sub and config.guess")
Thomas Petazzoni102a93b2011-08-31 23:35:06 +0200187 $$(call CONFIG_UPDATE,$$(@D))
Eric Andersena7e49eb2007-08-10 19:07:51 +0000188endef
189
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100190$(2)_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100191
192#
193# Hook to patch libtool to make it work properly for cross-compilation
194#
195define LIBTOOL_PATCH_HOOK
Lionel Landwerline1317732010-11-04 03:50:22 +0100196 @$$(call MESSAGE,"Patching libtool")
Thomas De Schampheleire54456cc2014-06-11 21:12:24 +0200197 $$(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES" \
Martin Banky83af8222010-10-09 12:52:49 +0200198 -a "$$($$(PKG)_AUTORECONF)" != "YES"; then \
199 for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \
200 ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | \
201 sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \
202 if test $$$${ltmain_version} = '1.5'; then \
Thomas Petazzoni59a326b2011-08-31 23:35:04 +0200203 support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v1.5.patch; \
Martin Banky83af8222010-10-09 12:52:49 +0200204 elif test $$$${ltmain_version} = "2.2"; then\
Thomas Petazzoni59a326b2011-08-31 23:35:04 +0200205 support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.2.patch; \
Peter Korsgaardf055b262011-03-28 21:45:06 +0200206 elif test $$$${ltmain_version} = "2.4"; then\
Thomas Petazzoni59a326b2011-08-31 23:35:04 +0200207 support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.4.patch; \
Martin Banky83af8222010-10-09 12:52:49 +0200208 fi \
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100209 done \
210 fi
211endef
212
Peter Korsgaard073af422009-12-30 13:42:01 +0100213# default values are not evaluated yet, so don't rely on this defaulting to YES
Thomas Petazzoni87d0af92010-04-28 23:40:47 +0200214ifneq ($$($(2)_LIBTOOL_PATCH),NO)
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100215$(2)_POST_PATCH_HOOKS += LIBTOOL_PATCH_HOOK
216endif
217
218#
Yann E. MORIN89925832014-07-17 00:00:35 +0200219# Hook to gettextize the package if needed
220#
221define GETTEXTIZE_HOOK
222 @$$(call MESSAGE,"Gettextizing")
Yann E. MORINbea8f262014-07-18 23:02:31 +0200223 $(Q)cd $$($$(PKG)_SRCDIR) && $$(GETTEXTIZE) $$($$(PKG)_GETTEXTIZE_OPT)
Yann E. MORIN89925832014-07-17 00:00:35 +0200224endef
225
226#
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100227# Hook to autoreconf the package if needed
228#
229define AUTORECONF_HOOK
Lionel Landwerline1317732010-11-04 03:50:22 +0100230 @$$(call MESSAGE,"Autoreconfiguring")
Rick Taylor5af28fe2014-07-18 10:12:19 +0100231 $$(Q)cd $$($$(PKG)_SRCDIR) && $$($$(PKG)_AUTORECONF_ENV) $$(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT)
Thomas De Schampheleire54456cc2014-06-11 21:12:24 +0200232 $$(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES"; then \
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100233 for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \
przemyslaw34006632013-03-20 20:09:42 +0000234 ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | \
235 sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \
Martin Banky83af8222010-10-09 12:52:49 +0200236 if test $$$${ltmain_version} = "1.5"; then \
Peter Korsgaard16d6e9b2011-09-17 14:16:42 +0200237 support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v1.5.patch; \
Martin Banky83af8222010-10-09 12:52:49 +0200238 elif test $$$${ltmain_version} = "2.2"; then\
Peter Korsgaard16d6e9b2011-09-17 14:16:42 +0200239 support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.2.patch; \
Peter Korsgaard3178a202011-05-03 10:01:28 +0200240 elif test $$$${ltmain_version} = "2.4"; then\
Peter Korsgaard16d6e9b2011-09-17 14:16:42 +0200241 support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.4.patch; \
Martin Banky83af8222010-10-09 12:52:49 +0200242 fi \
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100243 done \
244 fi
245endef
246
Arnout Vandecappelle (Essensium/Mind)46fa5cb2012-07-03 00:07:08 +0200247# This must be repeated from inner-generic-package, otherwise we get an empty
Arnout Vandecappelle (Essensium/Mind)bbc53fa2012-01-16 14:58:35 +0100248# _DEPENDENCIES if _AUTORECONF is YES. Also filter the result of _AUTORECONF
Yann E. MORIN89925832014-07-17 00:00:35 +0200249# and _GETTEXTIZE away from the non-host rule
Thomas De Schampheleire54456cc2014-06-11 21:12:24 +0200250ifeq ($(4),host)
251$(2)_DEPENDENCIES ?= $$(filter-out host-automake host-autoconf host-libtool \
Yann E. MORIN89925832014-07-17 00:00:35 +0200252 host-gettext host-toolchain $(1),\
Thomas De Schampheleire54456cc2014-06-11 21:12:24 +0200253 $$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES))))
254endif
Arnout Vandecappelle (Essensium/Mind)bbc53fa2012-01-16 14:58:35 +0100255
Thomas Petazzoni7dfa3b32010-04-28 23:40:42 +0200256ifeq ($$($(2)_AUTORECONF),YES)
Yann E. MORIN89925832014-07-17 00:00:35 +0200257# This has to come before autoreconf
258ifeq ($$($(2)_GETTEXTIZE),YES)
259$(2)_PRE_CONFIGURE_HOOKS += GETTEXTIZE_HOOK
260$(2)_DEPENDENCIES += host-gettext
261endif
Lionel Landwerlin89d1ad92010-11-04 03:50:24 +0100262$(2)_PRE_CONFIGURE_HOOKS += AUTORECONF_HOOK
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100263$(2)_DEPENDENCIES += host-automake host-autoconf host-libtool
264endif
265
266#
267# Build step. Only define it if not already defined by the package .mk
268# file.
269#
270ifndef $(2)_BUILD_CMDS
Thomas De Schampheleire26aef882014-02-05 10:44:03 +0100271ifeq ($(4),target)
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100272define $(2)_BUILD_CMDS
Thomas De Schampheleire0518a982014-09-27 21:32:38 +0200273 $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) -C $$($$(PKG)_SRCDIR)
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100274endef
275else
276define $(2)_BUILD_CMDS
Thomas De Schampheleire0518a982014-09-27 21:32:38 +0200277 $$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) -C $$($$(PKG)_SRCDIR)
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100278endef
279endif
280endif
281
282#
283# Host installation step. Only define it if not already defined by the
284# package .mk file.
285#
286ifndef $(2)_INSTALL_CMDS
287define $(2)_INSTALL_CMDS
Thomas De Schampheleireb1993432014-09-27 21:32:39 +0200288 $$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_OPTS) -C $$($$(PKG)_SRCDIR)
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100289endef
290endif
291
292#
293# Staging installation step. Only define it if not already defined by
294# the package .mk file.
295#
Thomas De Schampheleire7701fc52014-06-21 17:01:47 +0200296# Most autotools packages install libtool .la files alongside any
297# installed libraries. These .la files sometimes refer to paths
298# relative to the sysroot, which libtool will interpret as absolute
Thomas De Schampheleire6f638ea2014-07-03 21:58:43 +0200299# paths to host libraries instead of the target libraries. Since this
300# is not what we want, these paths are fixed by prefixing them with
301# $(STAGING_DIR). As we configure with --prefix=/usr, this fix
302# needs to be applied to any path that starts with /usr.
Thomas De Schampheleire7701fc52014-06-21 17:01:47 +0200303#
Thomas De Schampheleire6f638ea2014-07-03 21:58:43 +0200304# To protect against the case that the output or staging directories
305# themselves are under /usr, we first substitute away any occurrences
306# of these directories as @BASE_DIR@ and @STAGING_DIR@. Note that
307# STAGING_DIR can be outside BASE_DIR when the user sets BR2_HOST_DIR
308# to a custom value.
Thomas De Schampheleire7701fc52014-06-21 17:01:47 +0200309#
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100310ifndef $(2)_INSTALL_STAGING_CMDS
311define $(2)_INSTALL_STAGING_CMDS
Thomas Petazzoni43695a92011-12-24 13:07:03 +0100312 $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_STAGING_OPT) -C $$($$(PKG)_SRCDIR)
Thomas De Schampheleire18a0e072014-07-06 17:10:51 +0200313 find $$(STAGING_DIR)/usr/lib* -name "*.la" | xargs --no-run-if-empty \
Thomas De Schampheleire7701fc52014-06-21 17:01:47 +0200314 $$(SED) "s:$$(BASE_DIR):@BASE_DIR@:g" \
Thomas De Schampheleire6f638ea2014-07-03 21:58:43 +0200315 -e "s:$$(STAGING_DIR):@STAGING_DIR@:g" \
Thomas De Schampheleire7701fc52014-06-21 17:01:47 +0200316 -e "s:\(['= ]\)/usr:\\1@STAGING_DIR@/usr:g" \
317 -e "s:@STAGING_DIR@:$$(STAGING_DIR):g" \
Thomas De Schampheleire6f638ea2014-07-03 21:58:43 +0200318 -e "s:@BASE_DIR@:$$(BASE_DIR):g"
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100319endef
320endif
321
322#
323# Target installation step. Only define it if not already defined by
324# the package .mk file.
325#
326ifndef $(2)_INSTALL_TARGET_CMDS
327define $(2)_INSTALL_TARGET_CMDS
Thomas De Schampheleire57f2b8d2014-09-27 21:32:40 +0200328 $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_TARGET_OPTS) -C $$($$(PKG)_SRCDIR)
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100329endef
330endif
331
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100332# Call the generic package infrastructure to generate the necessary
333# make targets
Thomas De Schampheleire26aef882014-02-05 10:44:03 +0100334$(call inner-generic-package,$(1),$(2),$(3),$(4))
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100335
336endef
337
338################################################################################
Arnout Vandecappelle (Essensium/Mind)46fa5cb2012-07-03 00:07:08 +0200339# autotools-package -- the target generator macro for autotools packages
Thomas Petazzonid8b55b92009-11-08 18:37:49 +0100340################################################################################
341
Thomas De Schampheleire26aef882014-02-05 10:44:03 +0100342autotools-package = $(call inner-autotools-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target)
343host-autotools-package = $(call inner-autotools-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host)