9865e1971d76896e434a4368f8859183cd4c79d3
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / bash / bash.mk
1 ################################################################################
2 #
3 # bash
4 #
5 ################################################################################
6
7 BASH_VERSION = 4.3.30
8 BASH_SITE = $(BR2_GNU_MIRROR)/bash
9 # Build after since bash is better than busybox shells
10 BASH_DEPENDENCIES = ncurses readline host-bison \
11         $(if $(BR2_PACKAGE_BUSYBOX),busybox)
12 BASH_CONF_OPTS = --with-installed-readline
13 BASH_LICENSE = GPLv3+
14 BASH_LICENSE_FILES = COPYING
15
16 BASH_CONF_ENV += \
17         ac_cv_rl_prefix="$(STAGING_DIR)" \
18         ac_cv_rl_version="$(READLINE_VERSION)" \
19         bash_cv_job_control_missing=present \
20         bash_cv_sys_named_pipes=present \
21         bash_cv_func_sigsetjmp=present \
22         bash_cv_printf_a_format=yes
23
24 # Parallel build sometimes fails because some of the generator tools
25 # are built twice (i.e. while executing).
26 BASH_MAKE = $(MAKE1)
27
28 # The static build needs some trickery
29 ifeq ($(BR2_STATIC_LIBS),y)
30 BASH_CONF_OPTS += --enable-static-link --without-bash-malloc
31 # bash wants to redefine the getenv() function. To check whether this is
32 # possible, AC_TRY_RUN is used which is not possible in
33 # cross-compilation.
34 # On uClibc, redefining getenv is not possible; on glibc and musl it is.
35 # Related:
36 # http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00052.html
37 ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
38 BASH_CONF_ENV += bash_cv_getenv_redef=no
39 else
40 BASH_CONF_ENV += bash_cv_getenv_redef=yes
41 endif
42 endif
43
44 # Make /bin/sh -> bash (no other shell, better than busybox shells)
45 define BASH_INSTALL_TARGET_CMDS
46         $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
47                 DESTDIR=$(TARGET_DIR) exec_prefix=/ install
48         rm -f $(TARGET_DIR)/bin/bashbug
49 endef
50
51 $(eval $(autotools-package))