sbsv1/buildsystem/shell/sh.mk
author jjkang
Tue, 29 Jun 2010 14:52:54 +0800
changeset 606 30b30f9da0b7
parent 599 fa7a3cc6effd
permissions -rw-r--r--
Add ..\dev\.. to path
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
599
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     1
# Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     2
# All rights reserved.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     3
# This component and the accompanying materials are made available
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     4
# under the terms of "Eclipse Public License v1.0"
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     5
# which accompanies this distribution, and is available
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     7
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     8
# Initial Contributors:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     9
# Nokia Corporation - initial contribution.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    10
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    11
# Contributors:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    12
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    13
# Description:
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    14
#
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    15
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    16
include $(EPOCROOT)epoc32/tools/shell/generic.mk
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    17
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    18
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    19
# Some tools do not work with slash but only dollar slash.  
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    20
# That is actually a defect for them and should be fixed.  
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    21
# Then this macro should be abandoned.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    22
define slash2generic
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    23
$(1)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    24
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    25
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    26
# Use $(MKDIR) to create directory
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    27
# Use in base/config.mk and many others
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    28
define createdir
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    29
$(MKDIR) -p $(1) 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    30
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    31
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    32
# Check if not exist directory then create it first. 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    33
# Use in BASE/lubbock_miniboot and many others
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    34
define ifnotexistd
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    35
if [ ! -d $(1) ]; then $(MKDIR) -p $(1); fi
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    36
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    37
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    38
# This means there are something to add for SBSv2 here.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    39
# Used in base/lubbock_miniboot and should be used in similar situation.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    40
define sbsadd
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    41
$(1)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    42
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    43
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    44
# Add double quotes for abld target. No quote for SBSv2.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    45
# Used in base/lubbock_miniboot
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    46
define abldquote
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    47
$(1)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    48
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    49
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    50
# Used in Syslibs/conversiontable.mk
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    51
define generated
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    52
$(EPOCROOT)epoc32/build/$(1)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    53
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    54
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    55
# Used in syslibs/generate_cpp.mk
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    56
define formatreleasables
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    57
$(if $(1),@echo $(word 1,$(1)))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    58
$(if $(1),$(call formatreleasables,$(wordlist 2,$(words $(1)),$(1))))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    59
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    60
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    61
# Used in BASE/config.mk
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    62
define generatedcpp
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    63
$(EPOCROOT)epoc32/build/generatedcpp/hal
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    64
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    65
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    66
# Set path. Used in BASE/bootstrap.mk
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    67
define epocbldabs
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    68
$(EPOCBLD)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    69
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    70
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    71
# Copy. Used in BASE/bootstrap.mk 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    72
define ecopy
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    73
cp
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    74
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    75
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    76
# Abld does not support pipe symbol | while SBSv2 does.  So for Abld it is nothing.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    77
# Used in Base/bootstrap.mk. 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    78
define pipe
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    79
| $(1)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    80
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    81
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    82
# Used in BASE/copy_default.mk.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    83
define cpfeature
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    84
$(CP) $? $@
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    85
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    86
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    87
# Used in Syslibs/generate_cpp.mk at the bottom to deal with different
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    88
# way of includeing TEM in Abld and SBSv2.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    89
define include
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    90
$(TEMPLATE_EXTENSION_MAKEFILE)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    91
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    92
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    93
# Macro to change working directory. Used for TOOLS/stlport.mk
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    94
# The path needs to be fixed before passing to cd command
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    95
define chdir
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    96
-cd $(1)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    97
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    98
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    99
# Macro to remove files. Used in TOOLS/stlport.mk
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   100
define remove
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   101
-rm -f $(1)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   102
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   103
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   104
# Macro to copy files. Needed for sbsv2 build
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   105
# Used in PDS components in syslibs/*.mk
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   106
define forcecopy
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   107
$(CP) -f $(1)	$(2) && chmod a+rwx $(2)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   108
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   109
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   110
# Macro to remove files. Needed for sbsv2 build
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   111
# Used in PDS components in syslibs/*.mk
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   112
define forceremove
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   113
-$(ERASE) -f $(1)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   114
endef
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   115
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   116
# Configuration needs to be returned as upper case for abld
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
   117
CONFIGURATION:=rel