sbsv2/raptor/util/bash.mk
author Richard Taylor <richard.i.taylor@nokia.com>
Wed, 14 Jul 2010 14:50:01 +0100
changeset 616 24e4ef208cca
parent 590 360bd6b35136
permissions -rw-r--r--
sbs version 2.14.2

#
# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of the License "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
# Contributors:
#
# Description: 
# Build bash 3.2 for SBSv2
#


RAPTOR_BASH_VER:=4.0

BASH_SOURCEDIR:=$(OUTPUTPATH)/bash-$(RAPTOR_BASH_VER)
BASH_TAR:=$(SBS_HOME)/util/ext/bash-$(RAPTOR_BASH_VER).tar.gz
BASH_PATCHES_TAR:=$(SBS_HOME)/util/ext/bash-$(RAPTOR_BASH_VER)-patches.tar.gz

define b_bash
.PHONY:: bash

all:: bash 

bash: $(INSTALLROOT)/bin/bash

$(INSTALLROOT)/bin/bash: $(BASH_TAR) $(BASH_PATCHES_TAR)
	rm -rf $(BASH_SOURCEDIR) && \
	cd $(OUTPUTPATH) && \
	tar -xzf $(BASH_TAR) &&  \
	(  \
	cd $(BASH_SOURCEDIR) && \
	mkdir patches && (cd patches && tar -xzf $(BASH_PATCHES_TAR)) && \
	for p in patches/*; do if [ -f $p ]; then patch -p0 < $$$$p; fi; done && \
	CFLAGS="-O2 $(GCCTUNE) -s" ./configure --prefix=$(INSTALLROOT) --enable-arith-for-command --enable-multibyte --enable-job-control --enable-progcomp --enable-process-substitution  --enable-readline --disable-rpath && \
	$(MAKE) && $(MAKE) install \
	) ; \
	cp $$@ $$(dir $$@)/sh
	
endef

$(eval $(b_bash))