sbsv1/buildsystem/extension/tools/ant_launch.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) 1999-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:
#

# To ensure that EPOCROOT always ends with a forward slash
TMPROOT:=$(subst \,/,$(EPOCROOT))
EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/

include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk
EXTENSION_ROOT:=$(lastword $(subst :, ,$(EXTENSION_ROOT)))
BUILDDIR = $(EPOCROOT)epoc32/build$(EXTENSION_ROOT)/$(PLATFORM_PATH)/$(CFG_PATH)
RELDIR = $(EPOCROOT)epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)
LIBDIR = $(ANT_HOME)/bin/ant -lib $(EPOCROOT)epoc32/tools/java
BLDFILE = -buildfile $(EXTENSION_ROOT)/${build_xml}

BUILD = $(BUILDDIR)/${notdir ${build_xml}}_${target}
HAS_BUILT = ${wildcard ${BUILD}}

DO_NOTHING :
	@echo Nothing to do

$(BUILDDIR):
	-$(MKDIR) $(call slash2generic,$$@)

SAVESPACE : BLD	
MAKMAKE FREEZE LIB CLEANLIB RESOURCE FINAL : DO_NOTHING


## Find configuration
ifeq ($(CFG),REL)
RELEASE = REL
endif
ifeq ($(CFG),UREL)
RELEASE = UREL
endif

## Build target
ifeq ($(CFG),$(RELEASE))
ifeq ($(strip $(HAS_BUILT)), )

BLD : $(EXTENSION_ROOT)/${build_xml} $(BUILDDIR)
	$(LIBDIR) -logger com.symbian.ant.ScanLogger $(BLDFILE) -Depoc.build=$(BUILDDIR) -Depoc.rel=$(RELDIR) -Dtools.rel=$(EPOCROOT)tools ${args} ${target}
	echo $(BUILDDIR)/${build_xml} ${target} > ${BUILD}
else
BLD : ${BUILD}
	@echo The java component ${target} has already been built. Clean to rebuild.
endif
else
BLD : DO_NOTHING
endif


## Allow for a abld reallyclean
ifeq ($(CFG),$(RELEASE))
ifneq ($(strip $(HAS_BUILT)), )

CLEAN : ${BUILD}
	$(LIBDIR) -logger com.symbian.ant.ScanLogger $(BLDFILE) -Depoc.build=$(BUILDDIR) -Depoc.rel=$(RELDIR) -Dtools.rel=$(EPOCROOT)tools clean 
	${RM} ${BUILD}
else
CLEAN : DO_NOTHING
endif
else
CLEAN : DO_NOTHING
endif


## Allow for a abld -what
RELEASABLES :
	$(LIBDIR) -logger com.symbian.ant.AbldWhatLogger -quiet $(BLDFILE) -Depoc.rel=$(RELDIR) -Dtools.rel=$(EPOCROOT)tools what