sbsv1/buildsystem/extension/tools/ant_launch.mk
changeset 607 378360dbbdba
parent 599 fa7a3cc6effd
equal deleted inserted replaced
591:22486c9c7b15 607:378360dbbdba
       
     1 # Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 # All rights reserved.
       
     3 # This component and the accompanying materials are made available
       
     4 # under the terms of "Eclipse Public License v1.0"
       
     5 # which accompanies this distribution, and is available
       
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 #
       
     8 # Initial Contributors:
       
     9 # Nokia Corporation - initial contribution.
       
    10 #
       
    11 # Contributors:
       
    12 #
       
    13 # Description:
       
    14 #
       
    15 
       
    16 # To ensure that EPOCROOT always ends with a forward slash
       
    17 TMPROOT:=$(subst \,/,$(EPOCROOT))
       
    18 EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/
       
    19 
       
    20 include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk
       
    21 EXTENSION_ROOT:=$(lastword $(subst :, ,$(EXTENSION_ROOT)))
       
    22 BUILDDIR = $(EPOCROOT)epoc32/build$(EXTENSION_ROOT)/$(PLATFORM_PATH)/$(CFG_PATH)
       
    23 RELDIR = $(EPOCROOT)epoc32/release/$(PLATFORM_PATH)/$(CFG_PATH)
       
    24 LIBDIR = $(ANT_HOME)/bin/ant -lib $(EPOCROOT)epoc32/tools/java
       
    25 BLDFILE = -buildfile $(EXTENSION_ROOT)/${build_xml}
       
    26 
       
    27 BUILD = $(BUILDDIR)/${notdir ${build_xml}}_${target}
       
    28 HAS_BUILT = ${wildcard ${BUILD}}
       
    29 
       
    30 DO_NOTHING :
       
    31 	@echo Nothing to do
       
    32 
       
    33 $(BUILDDIR):
       
    34 	-$(MKDIR) $(call slash2generic,$$@)
       
    35 
       
    36 SAVESPACE : BLD	
       
    37 MAKMAKE FREEZE LIB CLEANLIB RESOURCE FINAL : DO_NOTHING
       
    38 
       
    39 
       
    40 ## Find configuration
       
    41 ifeq ($(CFG),REL)
       
    42 RELEASE = REL
       
    43 endif
       
    44 ifeq ($(CFG),UREL)
       
    45 RELEASE = UREL
       
    46 endif
       
    47 
       
    48 ## Build target
       
    49 ifeq ($(CFG),$(RELEASE))
       
    50 ifeq ($(strip $(HAS_BUILT)), )
       
    51 
       
    52 BLD : $(EXTENSION_ROOT)/${build_xml} $(BUILDDIR)
       
    53 	$(LIBDIR) -logger com.symbian.ant.ScanLogger $(BLDFILE) -Depoc.build=$(BUILDDIR) -Depoc.rel=$(RELDIR) -Dtools.rel=$(EPOCROOT)tools ${args} ${target}
       
    54 	echo $(BUILDDIR)/${build_xml} ${target} > ${BUILD}
       
    55 else
       
    56 BLD : ${BUILD}
       
    57 	@echo The java component ${target} has already been built. Clean to rebuild.
       
    58 endif
       
    59 else
       
    60 BLD : DO_NOTHING
       
    61 endif
       
    62 
       
    63 
       
    64 ## Allow for a abld reallyclean
       
    65 ifeq ($(CFG),$(RELEASE))
       
    66 ifneq ($(strip $(HAS_BUILT)), )
       
    67 
       
    68 CLEAN : ${BUILD}
       
    69 	$(LIBDIR) -logger com.symbian.ant.ScanLogger $(BLDFILE) -Depoc.build=$(BUILDDIR) -Depoc.rel=$(RELDIR) -Dtools.rel=$(EPOCROOT)tools clean 
       
    70 	${RM} ${BUILD}
       
    71 else
       
    72 CLEAN : DO_NOTHING
       
    73 endif
       
    74 else
       
    75 CLEAN : DO_NOTHING
       
    76 endif
       
    77 
       
    78 
       
    79 ## Allow for a abld -what
       
    80 RELEASABLES :
       
    81 	$(LIBDIR) -logger com.symbian.ant.AbldWhatLogger -quiet $(BLDFILE) -Depoc.rel=$(RELDIR) -Dtools.rel=$(EPOCROOT)tools what