2002-10-23 14:54:42 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# bash
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 15:55:55 +02:00
|
|
|
BASH_VERSION:=3.2
|
|
|
|
BASH_SOURCE:=bash-$(BASH_VERSION).tar.gz
|
2008-03-26 04:28:09 +01:00
|
|
|
BASH_SITE:=$(BR2_GNU_MIRROR)/bash
|
2006-10-01 17:17:52 +02:00
|
|
|
BASH_CAT:=$(ZCAT)
|
2007-07-11 15:55:55 +02:00
|
|
|
BASH_DIR:=$(BUILD_DIR)/bash-$(BASH_VERSION)
|
2002-10-23 14:54:42 +02:00
|
|
|
BASH_BINARY:=bash
|
|
|
|
BASH_TARGET_BINARY:=bin/bash
|
|
|
|
|
|
|
|
$(DL_DIR)/$(BASH_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(BASH_SITE),$(BASH_SOURCE))
|
2002-10-23 14:54:42 +02:00
|
|
|
|
|
|
|
bash-source: $(DL_DIR)/$(BASH_SOURCE)
|
|
|
|
|
2006-04-15 04:25:18 +02:00
|
|
|
bash-unpacked: $(BASH_DIR)/.unpacked
|
2007-09-17 14:30:31 +02:00
|
|
|
|
2002-10-23 14:54:42 +02:00
|
|
|
$(BASH_DIR)/.unpacked: $(DL_DIR)/$(BASH_SOURCE)
|
2004-10-09 23:19:47 +02:00
|
|
|
$(BASH_CAT) $(DL_DIR)/$(BASH_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2007-08-22 11:29:49 +02:00
|
|
|
toolchain/patch-kernel.sh $(BASH_DIR) package/bash/ bash??-\*
|
2003-09-03 09:18:18 +02:00
|
|
|
# This is broken when -lintl is added to LIBS
|
2003-11-19 18:17:56 +01:00
|
|
|
$(SED) 's,LIBS_FOR_BUILD =.*,LIBS_FOR_BUILD =,g' \
|
2003-09-03 09:18:18 +02:00
|
|
|
$(BASH_DIR)/builtins/Makefile.in
|
2007-04-06 13:55:37 +02:00
|
|
|
# using target's LDFLAGS as LDFLAGS_FOR_BUILD is b0rked
|
|
|
|
-$(SED) '/^LDFLAGS_FOR_BUILD/d' $(BASH_DIR)/{,*/{,*/}}Makefile.in
|
2007-03-07 15:32:22 +01:00
|
|
|
$(CONFIG_UPDATE) $(BASH_DIR)/support
|
2007-02-16 14:11:04 +01:00
|
|
|
touch $@
|
2002-10-23 14:54:42 +02:00
|
|
|
|
|
|
|
$(BASH_DIR)/.configured: $(BASH_DIR)/.unpacked
|
2007-08-22 14:35:41 +02:00
|
|
|
# bash_cv_have_mbstate_t=yes
|
2003-01-17 09:03:59 +01:00
|
|
|
(cd $(BASH_DIR); rm -rf config.cache; \
|
2007-01-14 04:52:21 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2007-04-06 13:55:37 +02:00
|
|
|
CCFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
|
2006-03-19 09:52:29 +01:00
|
|
|
ac_cv_func_setvbuf_reversed=no \
|
2008-10-06 21:09:14 +02:00
|
|
|
ac_cv_have_decl_sys_siglist=yes \
|
|
|
|
bash_cv_job_control_missing=present \
|
|
|
|
bash_cv_sys_named_pipes=present \
|
|
|
|
bash_cv_unusable_rtsigs=no \
|
|
|
|
bash_cv_func_ctype_nonascii=yes \
|
|
|
|
bash_cv_decl_under_sys_siglist=yes \
|
|
|
|
bash_cv_ulimit_maxfds=yes \
|
|
|
|
bash_cv_getcwd_malloc=yes \
|
|
|
|
bash_cv_func_sigsetjmp=present \
|
|
|
|
bash_cv_printf_a_format=yes \
|
2003-01-17 09:03:59 +01:00
|
|
|
./configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
2003-01-24 14:06:27 +01:00
|
|
|
--host=$(GNU_TARGET_NAME) \
|
2003-03-04 20:16:19 +01:00
|
|
|
--build=$(GNU_HOST_NAME) \
|
2003-01-17 09:03:59 +01:00
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-01-14 04:52:21 +01:00
|
|
|
--libdir=/lib \
|
2003-01-17 09:03:59 +01:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
2007-09-17 14:30:31 +02:00
|
|
|
--mandir=/usr/share/man \
|
|
|
|
--infodir=/usr/share/info \
|
|
|
|
--includedir=/usr/include \
|
2003-09-03 09:18:18 +02:00
|
|
|
$(DISABLE_NLS) \
|
2003-11-17 02:31:38 +01:00
|
|
|
$(DISABLE_LARGEFILE) \
|
2003-01-17 09:03:59 +01:00
|
|
|
--with-curses \
|
|
|
|
--enable-alias \
|
2004-09-03 02:49:43 +02:00
|
|
|
--without-bash-malloc \
|
2008-03-11 19:12:15 +01:00
|
|
|
$(ENABLE_DEBUG) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2007-02-16 14:11:04 +01:00
|
|
|
touch $@
|
2002-10-23 14:54:42 +02:00
|
|
|
|
|
|
|
$(BASH_DIR)/$(BASH_BINARY): $(BASH_DIR)/.configured
|
2007-06-28 16:07:13 +02:00
|
|
|
$(MAKE1) CC=$(TARGET_CC) CC_FOR_BUILD="$(HOSTCC)" -C $(BASH_DIR)
|
2002-10-23 14:54:42 +02:00
|
|
|
|
|
|
|
$(TARGET_DIR)/$(BASH_TARGET_BINARY): $(BASH_DIR)/$(BASH_BINARY)
|
2007-08-12 01:57:19 +02:00
|
|
|
mkdir -p $(TARGET_DIR)/bin
|
2006-12-08 13:50:37 +01:00
|
|
|
$(MAKE1) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BASH_DIR) install
|
2003-03-04 20:16:19 +01:00
|
|
|
rm -f $(TARGET_DIR)/bin/bash*
|
2002-10-23 14:54:42 +02:00
|
|
|
mv $(TARGET_DIR)/usr/bin/bash* $(TARGET_DIR)/bin/
|
2005-04-23 19:45:18 +02:00
|
|
|
(cd $(TARGET_DIR)/bin; /bin/ln -fs bash sh)
|
2007-09-17 14:30:31 +02:00
|
|
|
ifneq ($(BR2_HAVE_INFOPAGES),y)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/info
|
|
|
|
endif
|
|
|
|
ifneq ($(BR2_HAVE_MANPAGES),y)
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/man
|
|
|
|
endif
|
|
|
|
rm -rf $(TARGET_DIR)/share/locale
|
|
|
|
rm -rf $(TARGET_DIR)/usr/share/doc
|
2002-10-23 14:54:42 +02:00
|
|
|
|
2007-09-17 14:30:31 +02:00
|
|
|
# If both bash and busybox are selected, make certain bash wins
|
|
|
|
# the fight over who gets to own the /bin/sh symlink.
|
2004-12-27 22:46:32 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_BUSYBOX),y)
|
|
|
|
bash: ncurses uclibc busybox $(TARGET_DIR)/$(BASH_TARGET_BINARY)
|
|
|
|
else
|
2002-10-23 14:54:42 +02:00
|
|
|
bash: ncurses uclibc $(TARGET_DIR)/$(BASH_TARGET_BINARY)
|
2004-12-27 22:46:32 +01:00
|
|
|
endif
|
2002-10-23 14:54:42 +02:00
|
|
|
|
2007-09-17 14:30:31 +02:00
|
|
|
# If both bash and busybox are selected, the /bin/sh symlink
|
|
|
|
# may need to be reinstated by the clean targets.
|
2002-10-23 14:54:42 +02:00
|
|
|
bash-clean:
|
2007-06-28 16:07:13 +02:00
|
|
|
-$(MAKE1) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BASH_DIR) uninstall
|
|
|
|
rm -f $(TARGET_DIR)/$(BASH_TARGET_BINARY)
|
2006-12-08 13:50:37 +01:00
|
|
|
-$(MAKE1) -C $(BASH_DIR) clean
|
2002-10-23 14:54:42 +02:00
|
|
|
|
|
|
|
bash-dirclean:
|
|
|
|
rm -rf $(BASH_DIR)
|
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_BASH),y)
|
2005-02-10 04:06:39 +01:00
|
|
|
TARGETS+=bash
|
|
|
|
endif
|