bash.mk 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #
  2. # Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
  3. # All rights reserved.
  4. # This component and the accompanying materials are made available
  5. # under the terms of the License "Eclipse Public License v1.0"
  6. # which accompanies this distribution, and is available
  7. # at the URL "http://www.eclipse.org/legal/epl-v10.html".
  8. #
  9. # Initial Contributors:
  10. # Nokia Corporation - initial contribution.
  11. #
  12. # Contributors:
  13. #
  14. # Description:
  15. # Build bash 3.2 for SBSv2
  16. #
  17. RAPTOR_BASH_VER:=4.0
  18. BASH_SOURCEDIR:=$(OUTPUTPATH)/bash-$(RAPTOR_BASH_VER)
  19. BASH_TAR:=$(SBS_HOME)/util/ext/bash-$(RAPTOR_BASH_VER).tar.gz
  20. BASH_PATCHES_TAR:=$(SBS_HOME)/util/ext/bash-$(RAPTOR_BASH_VER)-patches.tar.gz
  21. define b_bash
  22. .PHONY:: bash
  23. all:: bash
  24. bash: $(INSTALLROOT)/bin/bash
  25. $(INSTALLROOT)/bin/bash: $(BASH_TAR) $(BASH_PATCHES_TAR)
  26. rm -rf $(BASH_SOURCEDIR) && \
  27. cd $(OUTPUTPATH) && \
  28. tar -xzf $(BASH_TAR) && \
  29. ( \
  30. cd $(BASH_SOURCEDIR) && \
  31. mkdir patches && (cd patches && tar -xzf $(BASH_PATCHES_TAR)) && \
  32. for p in patches/*; do if [ -f $p ]; then patch -p0 < $$$$p; fi; done && \
  33. 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 && \
  34. $(MAKE) && $(MAKE) install \
  35. ) ; \
  36. cp $$@ $$(dir $$@)/sh
  37. endef
  38. $(eval $(b_bash))