build/nativejava.flm
changeset 21 2a9601315dfc
child 50 023eef975703
equal deleted inserted replaced
18:e8e63152f320 21:2a9601315dfc
       
     1 #
       
     2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 # All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Nokia Corporation - initial contribution.
       
    11 #
       
    12 # Contributors:
       
    13 #
       
    14 # Description: Header file exporting Function Like Makefile (FLM)
       
    15 #              The file destinations are relative to EPOCROOT
       
    16 #
       
    17 
       
    18 # Find Java build dir by going up from $(TO_BLDINF). 
       
    19 # (TO_BLDINF refers to the directory having initial bld.inf, i.e.
       
    20 #  - jrt/group (9.2 S60)
       
    21 #  - jrt/group/sf (9.2 SF)
       
    22 #  - jrt (10.1 SF/S60) 
       
    23 #  therefore the jrt-directory is found from finding first directory having
       
    24 #  subsystem.mk, going up to max. three directory levels)
       
    25 
       
    26 JAVABUILDDIR = $(dir $(firstword $(wildcard $(TO_BLDINF)/subsystem.mk $(TO_BLDINF)/../subsystem.mk $(TO_BLDINF)/../../subsystem.mk)))
       
    27 
       
    28 JAVABUILDCMD = make -C $(JAVABUILDDIR) -f subsystem.mk EPOCROOT=$(EPOCROOT)/ \
       
    29                PLATFORM=$(PLATFORM) CFG=$(CFG) BLD_INF_JAVA=1
       
    30 
       
    31 define java_build
       
    32 RESOURCE::
       
    33 	$(call startrule,compilenativejava,,javasources) \
       
    34 	$(JAVABUILDCMD) java finalactions\
       
    35 	$(call endrule,compilenativejava)
       
    36 CLEAN::
       
    37 	$(call startrule,cleannativejava,,javasources) \
       
    38 	$(JAVABUILDCMD) clean_java \
       
    39 	$(call endrule,cleannativejava)
       
    40 endef
       
    41 
       
    42 $(eval $(java_build))
       
    43 
       
    44 RELEASABLES = $(shell $(JAVABUILDCMD) -s javareleasables)
       
    45 $(eval $(call whatmacro,$(RELEASABLES),WHATRESOURCES))