sbsv1/buildsystem/extension/tools/ant_launch.mk
author lorewang
Wed, 17 Nov 2010 11:21:28 +0800
changeset 684 2defe8c85348
parent 599 fa7a3cc6effd
permissions -rw-r--r--
elf2e32 treatment of ARM$$INIT_ARRAY$$Base can break GCCE builds
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
599
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
     1
# Copyright (c) 1999-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
# To ensure that EPOCROOT always ends with a forward slash
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    17
TMPROOT:=$(subst \,/,$(EPOCROOT))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    18
EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    19
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    20
include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    21
EXTENSION_ROOT:=$(lastword $(subst :, ,$(EXTENSION_ROOT)))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    22
BUILDDIR = $(EPOCROOT)epoc32/build$(EXTENSION_ROOT)/$(PLATFORM_PATH)/$(CFG_PATH)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    23
RELDIR = $(EPOCROOT)epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    24
LIBDIR = $(ANT_HOME)/bin/ant -lib $(EPOCROOT)epoc32/tools/java
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    25
BLDFILE = -buildfile $(EXTENSION_ROOT)/${build_xml}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    26
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    27
BUILD = $(BUILDDIR)/${notdir ${build_xml}}_${target}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    28
HAS_BUILT = ${wildcard ${BUILD}}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    29
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    30
DO_NOTHING :
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    31
	@echo Nothing to do
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    32
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    33
$(BUILDDIR):
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    34
	-$(MKDIR) $(call slash2generic,$$@)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    35
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    36
SAVESPACE : BLD	
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    37
MAKMAKE FREEZE LIB CLEANLIB RESOURCE FINAL : DO_NOTHING
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    38
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    39
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    40
## Find configuration
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    41
ifeq ($(CFG),REL)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    42
RELEASE = REL
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    43
endif
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    44
ifeq ($(CFG),UREL)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    45
RELEASE = UREL
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    46
endif
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    47
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    48
## Build target
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    49
ifeq ($(CFG),$(RELEASE))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    50
ifeq ($(strip $(HAS_BUILT)), )
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    51
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    52
BLD : $(EXTENSION_ROOT)/${build_xml} $(BUILDDIR)
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    53
	$(LIBDIR) -logger com.symbian.ant.ScanLogger $(BLDFILE) -Depoc.build=$(BUILDDIR) -Depoc.rel=$(RELDIR) -Dtools.rel=$(EPOCROOT)tools ${args} ${target}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    54
	echo $(BUILDDIR)/${build_xml} ${target} > ${BUILD}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    55
else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    56
BLD : ${BUILD}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    57
	@echo The java component ${target} has already been built. Clean to rebuild.
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    58
endif
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    59
else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    60
BLD : DO_NOTHING
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    61
endif
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    62
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    63
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    64
## Allow for a abld reallyclean
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    65
ifeq ($(CFG),$(RELEASE))
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    66
ifneq ($(strip $(HAS_BUILT)), )
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    67
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    68
CLEAN : ${BUILD}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    69
	$(LIBDIR) -logger com.symbian.ant.ScanLogger $(BLDFILE) -Depoc.build=$(BUILDDIR) -Depoc.rel=$(RELDIR) -Dtools.rel=$(EPOCROOT)tools clean 
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    70
	${RM} ${BUILD}
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    71
else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    72
CLEAN : DO_NOTHING
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    73
endif
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    74
else
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    75
CLEAN : DO_NOTHING
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    76
endif
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    77
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    78
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    79
## Allow for a abld -what
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    80
RELEASABLES :
fa7a3cc6effd Add sbsv1 to new structure
jjkang
parents:
diff changeset
    81
	$(LIBDIR) -logger com.symbian.ant.AbldWhatLogger -quiet $(BLDFILE) -Depoc.rel=$(RELDIR) -Dtools.rel=$(EPOCROOT)tools what