sbsv1/buildsystem/shell/sh.mk
author Mike Kinghan <mikek@symbian.org>
Thu, 25 Nov 2010 13:59:07 +0000
changeset 40 68f68128601f
permissions -rw-r--r--
1) Add the sbsv1 components from sftools/dev/build to make the linux_build package independent of the obsolete buildtools package. 2) Enhance romnibus.pl so that it generate the symbol file for the built rom when invoked by Raptor 3) Make the maksym.pl tool portable for Linux as well as Windows. 4) Remove the of armasm2as.pl from the e32tools component in favour of the copy now exported from sbsv1/e32util.

# 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 "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:
#

include $(EPOCROOT)epoc32/tools/shell/generic.mk


# Some tools do not work with slash but only dollar slash.  
# That is actually a defect for them and should be fixed.  
# Then this macro should be abandoned.
define slash2generic
$(1)
endef

# Use $(MKDIR) to create directory
# Use in base/config.mk and many others
define createdir
$(MKDIR) -p $(1) 
endef

# Check if not exist directory then create it first. 
# Use in BASE/lubbock_miniboot and many others
define ifnotexistd
if [ ! -d $(1) ]; then $(MKDIR) -p $(1); fi
endef

# This means there are something to add for SBSv2 here.
# Used in base/lubbock_miniboot and should be used in similar situation.
define sbsadd
$(1)
endef

# Add double quotes for abld target. No quote for SBSv2.
# Used in base/lubbock_miniboot
define abldquote
$(1)
endef

# Used in Syslibs/conversiontable.mk
define generated
$(EPOCROOT)epoc32/build/$(1)
endef

# Used in syslibs/generate_cpp.mk
define formatreleasables
$(if $(1),@echo $(word 1,$(1)))
$(if $(1),$(call formatreleasables,$(wordlist 2,$(words $(1)),$(1))))
endef

# Used in BASE/config.mk
define generatedcpp
$(EPOCROOT)epoc32/build/generatedcpp/hal
endef

# Set path. Used in BASE/bootstrap.mk
define epocbldabs
$(EPOCBLD)
endef

# Copy. Used in BASE/bootstrap.mk 
define ecopy
cp
endef

# Abld does not support pipe symbol | while SBSv2 does.  So for Abld it is nothing.
# Used in Base/bootstrap.mk. 
define pipe
| $(1)
endef

# Used in BASE/copy_default.mk.
define cpfeature
$(CP) $? $@
endef

# Used in Syslibs/generate_cpp.mk at the bottom to deal with different
# way of includeing TEM in Abld and SBSv2.
define include
$(TEMPLATE_EXTENSION_MAKEFILE)
endef

# Macro to change working directory. Used for TOOLS/stlport.mk
# The path needs to be fixed before passing to cd command
define chdir
-cd $(1)
endef

# Macro to remove files. Used in TOOLS/stlport.mk
define remove
-rm -f $(1)
endef

# Macro to copy files. Needed for sbsv2 build
# Used in PDS components in syslibs/*.mk
define forcecopy
$(CP) -f $(1)	$(2) && chmod a+rwx $(2)
endef

# Macro to remove files. Needed for sbsv2 build
# Used in PDS components in syslibs/*.mk
define forceremove
-$(ERASE) -f $(1)
endef

# Macro to execute a command if a file exists.
define ifexistf
if [ -f $(1) ]; then $(2); fi
endef

# Macro ensure path delimiters are the right sort.
define normalise_path
$(subst \,/,$(1))
endef

# Configuration needs to be returned as upper case for abld
CONFIGURATION:=rel