Eric Andersen | a7e49eb | 2007-08-10 19:07:51 +0000 | [diff] [blame] | 1 | ################################################################################ |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 2 | # Autotools package infrastructure |
Eric Andersen | a7e49eb | 2007-08-10 19:07:51 +0000 | [diff] [blame] | 3 | # |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 4 | # This file implements an infrastructure that eases development of |
| 5 | # package .mk files for autotools packages. It should be used for all |
Thomas Petazzoni | c0e6b52 | 2012-04-17 16:45:20 +0200 | [diff] [blame] | 6 | # packages that use the autotools as their build system. |
Eric Andersen | a7e49eb | 2007-08-10 19:07:51 +0000 | [diff] [blame] | 7 | # |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 8 | # See the Buildroot documentation for details on the usage of this |
| 9 | # infrastructure |
Eric Andersen | a7e49eb | 2007-08-10 19:07:51 +0000 | [diff] [blame] | 10 | # |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 11 | # In terms of implementation, this autotools infrastructure requires |
| 12 | # the .mk file to only specify metadata informations about the |
| 13 | # package: name, version, download URL, etc. |
Bernhard Reutner-Fischer | 00b8456 | 2007-09-30 12:46:02 +0000 | [diff] [blame] | 14 | # |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 15 | # 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-Fischer | 00b8456 | 2007-09-30 12:46:02 +0000 | [diff] [blame] | 20 | # |
Eric Andersen | a7e49eb | 2007-08-10 19:07:51 +0000 | [diff] [blame] | 21 | ################################################################################ |
| 22 | |
Thomas Petazzoni | 102a93b | 2011-08-31 23:35:06 +0200 | [diff] [blame] | 23 | |
| 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 | # |
| 31 | define 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 |
| 37 | endef |
| 38 | |
Peter Korsgaard | d58636d | 2009-01-16 10:27:48 +0000 | [diff] [blame] | 39 | ################################################################################ |
Arnout Vandecappelle (Essensium/Mind) | 46fa5cb | 2012-07-03 00:07:08 +0200 | [diff] [blame] | 40 | # inner-autotools-package -- defines how the configuration, compilation and |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 41 | # installation of an autotools package should be done, implements a |
| 42 | # few hooks to tune the build process for autotools specifities and |
| 43 | # calls the generic package infrastructure to generate the necessary |
| 44 | # make targets |
Peter Korsgaard | d58636d | 2009-01-16 10:27:48 +0000 | [diff] [blame] | 45 | # |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 46 | # argument 1 is the lowercase package name |
| 47 | # argument 2 is the uppercase package name, including an HOST_ prefix |
| 48 | # for host packages |
| 49 | # argument 3 is the uppercase package name, without the HOST_ prefix |
| 50 | # for host packages |
Thomas De Schampheleire | 26aef88 | 2014-02-05 10:44:03 +0100 | [diff] [blame^] | 51 | # argument 4 is the type (target or host) |
Peter Korsgaard | d58636d | 2009-01-16 10:27:48 +0000 | [diff] [blame] | 52 | ################################################################################ |
| 53 | |
Arnout Vandecappelle (Essensium/Mind) | 46fa5cb | 2012-07-03 00:07:08 +0200 | [diff] [blame] | 54 | define inner-autotools-package |
Eric Andersen | a7e49eb | 2007-08-10 19:07:51 +0000 | [diff] [blame] | 55 | |
Thomas Petazzoni | d2c73f5 | 2010-04-28 23:40:45 +0200 | [diff] [blame] | 56 | ifndef $(2)_LIBTOOL_PATCH |
| 57 | ifdef $(3)_LIBTOOL_PATCH |
| 58 | $(2)_LIBTOOL_PATCH = $($(3)_LIBTOOL_PATCH) |
| 59 | else |
| 60 | $(2)_LIBTOOL_PATCH ?= YES |
| 61 | endif |
| 62 | endif |
| 63 | |
Peter Korsgaard | ce1ae87 | 2011-05-17 10:00:01 +0200 | [diff] [blame] | 64 | ifndef $(2)_MAKE |
| 65 | ifdef $(3)_MAKE |
| 66 | $(2)_MAKE = $($(3)_MAKE) |
| 67 | else |
| 68 | $(2)_MAKE ?= $(MAKE) |
| 69 | endif |
| 70 | endif |
| 71 | |
Peter Korsgaard | 97c6870 | 2013-10-02 23:37:58 +0200 | [diff] [blame] | 72 | ifndef $(2)_AUTORECONF |
| 73 | ifdef $(3)_AUTORECONF |
| 74 | $(2)_AUTORECONF = $($(3)_AUTORECONF) |
| 75 | else |
| 76 | $(2)_AUTORECONF ?= NO |
| 77 | endif |
| 78 | endif |
| 79 | |
Eric Andersen | a7e49eb | 2007-08-10 19:07:51 +0000 | [diff] [blame] | 80 | $(2)_CONF_ENV ?= |
| 81 | $(2)_CONF_OPT ?= |
Bernhard Reutner-Fischer | 00b8456 | 2007-09-30 12:46:02 +0000 | [diff] [blame] | 82 | $(2)_MAKE_ENV ?= |
Eric Andersen | a7e49eb | 2007-08-10 19:07:51 +0000 | [diff] [blame] | 83 | $(2)_MAKE_OPT ?= |
Peter Korsgaard | 97c6870 | 2013-10-02 23:37:58 +0200 | [diff] [blame] | 84 | $(2)_AUTORECONF_OPT ?= $($(3)_AUTORECONF_OPT) |
Thomas Petazzoni | 598ade9 | 2013-06-30 21:28:53 +0200 | [diff] [blame] | 85 | $(2)_INSTALL_OPT ?= install |
Eric Andersen | a7e49eb | 2007-08-10 19:07:51 +0000 | [diff] [blame] | 86 | $(2)_INSTALL_STAGING_OPT ?= DESTDIR=$$(STAGING_DIR) install |
Paulius Zaleckas | 31365de | 2010-03-30 17:20:55 +0200 | [diff] [blame] | 87 | $(2)_INSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) install |
Eric Andersen | a7e49eb | 2007-08-10 19:07:51 +0000 | [diff] [blame] | 88 | |
| 89 | |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 90 | # |
| 91 | # Configure step. Only define it if not already defined by the package |
| 92 | # .mk file. And take care of the differences between host and target |
| 93 | # packages. |
| 94 | # |
| 95 | ifndef $(2)_CONFIGURE_CMDS |
Thomas De Schampheleire | 26aef88 | 2014-02-05 10:44:03 +0100 | [diff] [blame^] | 96 | ifeq ($(4),target) |
Eric Andersen | a7e49eb | 2007-08-10 19:07:51 +0000 | [diff] [blame] | 97 | |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 98 | # Configure package for target |
| 99 | define $(2)_CONFIGURE_CMDS |
| 100 | (cd $$($$(PKG)_SRCDIR) && rm -rf config.cache && \ |
| 101 | $$(TARGET_CONFIGURE_OPTS) \ |
| 102 | $$(TARGET_CONFIGURE_ARGS) \ |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 103 | $$($$(PKG)_CONF_ENV) \ |
| 104 | ./configure \ |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 105 | --target=$$(GNU_TARGET_NAME) \ |
| 106 | --host=$$(GNU_TARGET_NAME) \ |
| 107 | --build=$$(GNU_HOST_NAME) \ |
| 108 | --prefix=/usr \ |
| 109 | --exec-prefix=/usr \ |
| 110 | --sysconfdir=/etc \ |
Yann E. MORIN | a8d6e2c | 2011-08-10 00:12:34 +0200 | [diff] [blame] | 111 | --program-prefix="" \ |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 112 | $$(DISABLE_DOCUMENTATION) \ |
| 113 | $$(DISABLE_NLS) \ |
| 114 | $$(DISABLE_LARGEFILE) \ |
| 115 | $$(DISABLE_IPV6) \ |
Thomas Petazzoni | 009d8fc | 2011-05-30 23:57:02 +0200 | [diff] [blame] | 116 | $$(SHARED_STATIC_LIBS_OPTS) \ |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 117 | $$(QUIET) $$($$(PKG)_CONF_OPT) \ |
| 118 | ) |
| 119 | endef |
Eric Andersen | a7e49eb | 2007-08-10 19:07:51 +0000 | [diff] [blame] | 120 | else |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 121 | |
| 122 | # Configure package for host |
Arnout Vandecappelle | 489970e | 2012-12-12 04:07:22 +0000 | [diff] [blame] | 123 | # disable all kind of documentation generation in the process, |
| 124 | # because it often relies on host tools which may or may not be |
| 125 | # installed. |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 126 | define $(2)_CONFIGURE_CMDS |
| 127 | (cd $$($$(PKG)_SRCDIR) && rm -rf config.cache; \ |
| 128 | $$(HOST_CONFIGURE_OPTS) \ |
| 129 | CFLAGS="$$(HOST_CFLAGS)" \ |
| 130 | LDFLAGS="$$(HOST_LDFLAGS)" \ |
Lionel Landwerlin | 1b41e32 | 2010-04-30 02:24:09 +0200 | [diff] [blame] | 131 | $$($$(PKG)_CONF_ENV) \ |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 132 | ./configure \ |
| 133 | --prefix="$$(HOST_DIR)/usr" \ |
| 134 | --sysconfdir="$$(HOST_DIR)/etc" \ |
Thomas Petazzoni | 009d8fc | 2011-05-30 23:57:02 +0200 | [diff] [blame] | 135 | --enable-shared --disable-static \ |
Arnout Vandecappelle | 489970e | 2012-12-12 04:07:22 +0000 | [diff] [blame] | 136 | --disable-gtk-doc \ |
| 137 | --disable-doc \ |
| 138 | --disable-docs \ |
| 139 | --disable-documentation \ |
| 140 | --with-xmlto=no \ |
| 141 | --with-fop=no \ |
Peter Korsgaard | 9f5a9de | 2013-07-17 09:37:36 +0200 | [diff] [blame] | 142 | $$(QUIET) $$($$(PKG)_CONF_OPT) \ |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 143 | ) |
| 144 | endef |
| 145 | endif |
Eric Andersen | a7e49eb | 2007-08-10 19:07:51 +0000 | [diff] [blame] | 146 | endif |
| 147 | |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 148 | # |
| 149 | # Hook to update config.sub and config.guess if needed |
| 150 | # |
| 151 | define UPDATE_CONFIG_HOOK |
Danomi Manchego | 28bb03a | 2013-03-11 15:58:31 +0000 | [diff] [blame] | 152 | @$$(call MESSAGE,"Updating config.sub and config.guess") |
Thomas Petazzoni | 102a93b | 2011-08-31 23:35:06 +0200 | [diff] [blame] | 153 | $$(call CONFIG_UPDATE,$$(@D)) |
Eric Andersen | a7e49eb | 2007-08-10 19:07:51 +0000 | [diff] [blame] | 154 | endef |
| 155 | |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 156 | $(2)_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 157 | |
| 158 | # |
| 159 | # Hook to patch libtool to make it work properly for cross-compilation |
| 160 | # |
| 161 | define LIBTOOL_PATCH_HOOK |
Lionel Landwerlin | e131773 | 2010-11-04 03:50:22 +0100 | [diff] [blame] | 162 | @$$(call MESSAGE,"Patching libtool") |
Martin Banky | 83af822 | 2010-10-09 12:52:49 +0200 | [diff] [blame] | 163 | $(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES" \ |
| 164 | -a "$$($$(PKG)_AUTORECONF)" != "YES"; then \ |
| 165 | for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \ |
| 166 | ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | \ |
| 167 | sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \ |
| 168 | if test $$$${ltmain_version} = '1.5'; then \ |
Thomas Petazzoni | 59a326b | 2011-08-31 23:35:04 +0200 | [diff] [blame] | 169 | support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v1.5.patch; \ |
Martin Banky | 83af822 | 2010-10-09 12:52:49 +0200 | [diff] [blame] | 170 | elif test $$$${ltmain_version} = "2.2"; then\ |
Thomas Petazzoni | 59a326b | 2011-08-31 23:35:04 +0200 | [diff] [blame] | 171 | support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.2.patch; \ |
Peter Korsgaard | f055b26 | 2011-03-28 21:45:06 +0200 | [diff] [blame] | 172 | elif test $$$${ltmain_version} = "2.4"; then\ |
Thomas Petazzoni | 59a326b | 2011-08-31 23:35:04 +0200 | [diff] [blame] | 173 | support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.4.patch; \ |
Martin Banky | 83af822 | 2010-10-09 12:52:49 +0200 | [diff] [blame] | 174 | fi \ |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 175 | done \ |
| 176 | fi |
| 177 | endef |
| 178 | |
Peter Korsgaard | 073af42 | 2009-12-30 13:42:01 +0100 | [diff] [blame] | 179 | # default values are not evaluated yet, so don't rely on this defaulting to YES |
Thomas Petazzoni | 87d0af9 | 2010-04-28 23:40:47 +0200 | [diff] [blame] | 180 | ifneq ($$($(2)_LIBTOOL_PATCH),NO) |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 181 | $(2)_POST_PATCH_HOOKS += LIBTOOL_PATCH_HOOK |
| 182 | endif |
| 183 | |
| 184 | # |
| 185 | # Hook to autoreconf the package if needed |
| 186 | # |
| 187 | define AUTORECONF_HOOK |
Lionel Landwerlin | e131773 | 2010-11-04 03:50:22 +0100 | [diff] [blame] | 188 | @$$(call MESSAGE,"Autoreconfiguring") |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 189 | $(Q)cd $$($$(PKG)_SRCDIR) && $(AUTORECONF) $$($$(PKG)_AUTORECONF_OPT) |
Martin Banky | 83af822 | 2010-10-09 12:52:49 +0200 | [diff] [blame] | 190 | $(Q)if test "$$($$(PKG)_LIBTOOL_PATCH)" = "YES"; then \ |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 191 | for i in `find $$($$(PKG)_SRCDIR) -name ltmain.sh`; do \ |
przemyslaw | 3400663 | 2013-03-20 20:09:42 +0000 | [diff] [blame] | 192 | ltmain_version=`sed -n '/^[ ]*VERSION=/{s/^[ ]*VERSION=//;p;q;}' $$$$i | \ |
| 193 | sed -e 's/\([0-9].[0-9]*\).*/\1/' -e 's/\"//'`; \ |
Martin Banky | 83af822 | 2010-10-09 12:52:49 +0200 | [diff] [blame] | 194 | if test $$$${ltmain_version} = "1.5"; then \ |
Peter Korsgaard | 16d6e9b | 2011-09-17 14:16:42 +0200 | [diff] [blame] | 195 | support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v1.5.patch; \ |
Martin Banky | 83af822 | 2010-10-09 12:52:49 +0200 | [diff] [blame] | 196 | elif test $$$${ltmain_version} = "2.2"; then\ |
Peter Korsgaard | 16d6e9b | 2011-09-17 14:16:42 +0200 | [diff] [blame] | 197 | support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.2.patch; \ |
Peter Korsgaard | 3178a20 | 2011-05-03 10:01:28 +0200 | [diff] [blame] | 198 | elif test $$$${ltmain_version} = "2.4"; then\ |
Peter Korsgaard | 16d6e9b | 2011-09-17 14:16:42 +0200 | [diff] [blame] | 199 | support/scripts/apply-patches.sh $$$${i%/*} support/libtool buildroot-libtool-v2.4.patch; \ |
Martin Banky | 83af822 | 2010-10-09 12:52:49 +0200 | [diff] [blame] | 200 | fi \ |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 201 | done \ |
| 202 | fi |
| 203 | endef |
| 204 | |
Arnout Vandecappelle (Essensium/Mind) | 46fa5cb | 2012-07-03 00:07:08 +0200 | [diff] [blame] | 205 | # This must be repeated from inner-generic-package, otherwise we get an empty |
Arnout Vandecappelle (Essensium/Mind) | bbc53fa | 2012-01-16 14:58:35 +0100 | [diff] [blame] | 206 | # _DEPENDENCIES if _AUTORECONF is YES. Also filter the result of _AUTORECONF |
| 207 | # away from the non-host rule |
Arnout Vandecappelle (Essensium/Mind) | cbf1691 | 2012-07-14 22:31:19 +0200 | [diff] [blame] | 208 | $(2)_DEPENDENCIES ?= $(filter-out host-automake host-autoconf host-libtool $(1),\ |
Arnout Vandecappelle (Essensium/Mind) | bbc53fa | 2012-01-16 14:58:35 +0100 | [diff] [blame] | 209 | $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES)))) |
Peter Korsgaard | 1b07928 | 2012-01-18 15:54:55 +0100 | [diff] [blame] | 210 | |
Arnout Vandecappelle (Essensium/Mind) | bbc53fa | 2012-01-16 14:58:35 +0100 | [diff] [blame] | 211 | |
Thomas Petazzoni | 7dfa3b3 | 2010-04-28 23:40:42 +0200 | [diff] [blame] | 212 | ifeq ($$($(2)_AUTORECONF),YES) |
Lionel Landwerlin | 89d1ad9 | 2010-11-04 03:50:24 +0100 | [diff] [blame] | 213 | $(2)_PRE_CONFIGURE_HOOKS += AUTORECONF_HOOK |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 214 | $(2)_DEPENDENCIES += host-automake host-autoconf host-libtool |
| 215 | endif |
| 216 | |
| 217 | # |
| 218 | # Build step. Only define it if not already defined by the package .mk |
| 219 | # file. |
| 220 | # |
| 221 | ifndef $(2)_BUILD_CMDS |
Thomas De Schampheleire | 26aef88 | 2014-02-05 10:44:03 +0100 | [diff] [blame^] | 222 | ifeq ($(4),target) |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 223 | define $(2)_BUILD_CMDS |
Thomas Petazzoni | 43695a9 | 2011-12-24 13:07:03 +0100 | [diff] [blame] | 224 | $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_SRCDIR) |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 225 | endef |
| 226 | else |
| 227 | define $(2)_BUILD_CMDS |
Thomas Petazzoni | 43695a9 | 2011-12-24 13:07:03 +0100 | [diff] [blame] | 228 | $$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT) -C $$($$(PKG)_SRCDIR) |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 229 | endef |
| 230 | endif |
| 231 | endif |
| 232 | |
| 233 | # |
| 234 | # Host installation step. Only define it if not already defined by the |
| 235 | # package .mk file. |
| 236 | # |
| 237 | ifndef $(2)_INSTALL_CMDS |
| 238 | define $(2)_INSTALL_CMDS |
Thomas Petazzoni | 598ade9 | 2013-06-30 21:28:53 +0200 | [diff] [blame] | 239 | $$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_OPT) -C $$($$(PKG)_SRCDIR) |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 240 | endef |
| 241 | endif |
| 242 | |
| 243 | # |
| 244 | # Staging installation step. Only define it if not already defined by |
| 245 | # the package .mk file. |
| 246 | # |
| 247 | ifndef $(2)_INSTALL_STAGING_CMDS |
| 248 | define $(2)_INSTALL_STAGING_CMDS |
Thomas Petazzoni | 43695a9 | 2011-12-24 13:07:03 +0100 | [diff] [blame] | 249 | $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_STAGING_OPT) -C $$($$(PKG)_SRCDIR) |
Peter Korsgaard | ecf5939 | 2010-01-18 14:53:06 +0100 | [diff] [blame] | 250 | for i in $$$$(find $(STAGING_DIR)/usr/lib* -name "*.la"); do \ |
Lionel Landwerlin | e8b469b | 2010-04-30 02:24:06 +0200 | [diff] [blame] | 251 | cp -f $$$$i $$$$i~; \ |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 252 | $$(SED) "s:\(['= ]\)/usr:\\1$(STAGING_DIR)/usr:g" $$$$i; \ |
| 253 | done |
| 254 | endef |
| 255 | endif |
| 256 | |
| 257 | # |
| 258 | # Target installation step. Only define it if not already defined by |
| 259 | # the package .mk file. |
| 260 | # |
| 261 | ifndef $(2)_INSTALL_TARGET_CMDS |
| 262 | define $(2)_INSTALL_TARGET_CMDS |
Thomas Petazzoni | 43695a9 | 2011-12-24 13:07:03 +0100 | [diff] [blame] | 263 | $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_TARGET_OPT) -C $$($$(PKG)_SRCDIR) |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 264 | endef |
| 265 | endif |
| 266 | |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 267 | # Call the generic package infrastructure to generate the necessary |
| 268 | # make targets |
Thomas De Schampheleire | 26aef88 | 2014-02-05 10:44:03 +0100 | [diff] [blame^] | 269 | $(call inner-generic-package,$(1),$(2),$(3),$(4)) |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 270 | |
| 271 | endef |
| 272 | |
| 273 | ################################################################################ |
Arnout Vandecappelle (Essensium/Mind) | 46fa5cb | 2012-07-03 00:07:08 +0200 | [diff] [blame] | 274 | # autotools-package -- the target generator macro for autotools packages |
Thomas Petazzoni | d8b55b9 | 2009-11-08 18:37:49 +0100 | [diff] [blame] | 275 | ################################################################################ |
| 276 | |
Thomas De Schampheleire | 26aef88 | 2014-02-05 10:44:03 +0100 | [diff] [blame^] | 277 | autotools-package = $(call inner-autotools-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target) |
| 278 | host-autotools-package = $(call inner-autotools-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host) |