author | y4jin |
Tue, 09 Nov 2010 17:18:57 +0800 | |
changeset 675 | 02e65118a746 |
parent 625 | a1925fb7753a |
permissions | -rw-r--r-- |
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
1 |
# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
2 |
# All rights reserved. |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
3 |
# This component and the accompanying materials are made available |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
4 |
# under the terms of the License "Eclipse Public License v1.0" |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
5 |
# which accompanies this distribution, and is available |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
6 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
7 |
# |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
8 |
# Initial Contributors: |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
9 |
# Nokia Corporation - initial contribution. |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
10 |
# |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
11 |
# Contributors: |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
12 |
# |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
13 |
# Description: |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
14 |
# Run Trace Compiler on source files to generate trace headers and decode files |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
15 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
16 |
# Expected inputs: |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
17 |
# TARGETEXT |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
18 |
|
625
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
616
diff
changeset
|
19 |
# Set macro for TRACES keyword |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
616
diff
changeset
|
20 |
ifneq ($(TRACES),) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
616
diff
changeset
|
21 |
CDEFS:=$(CDEFS) OST_TRACE_COMPILER_IN_USE |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
616
diff
changeset
|
22 |
$(if $(FLMDEBUG),$(info <debug>CDEFS=$(CDEFS)</debug>)) |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
616
diff
changeset
|
23 |
endif |
a1925fb7753a
sbs version 2.15.0
Richard Taylor <richard.i.taylor@nokia.com>
parents:
616
diff
changeset
|
24 |
|
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
25 |
# Set project name as <mmp_name> |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
26 |
TRACE_PRJNAME:=$(basename $(notdir $(PROJECT_META))) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
27 |
OLDTC_TRACE_PRJNAME:=$(TRACE_PRJNAME) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
28 |
TRACE_RELEASABLE_ID:=$(TARGET)_$(TARGETEXT) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
29 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
30 |
define get_trace_path |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
31 |
$(firstword $(filter %$1, $(USERINCLUDE) $(SYSTEMINCLUDE))) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
32 |
endef |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
33 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
34 |
$(if $(FLMDEBUG),$(info <debug>INCLUDES=$(USERINCLUDE) $(SYSTEMINCLUDE)</debug>)) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
35 |
$(if $(FLMDEBUG),$(info <debug>TARGET=$(TARGET) TARGETEXT=$(TARGETEXT)</debug>)) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
36 |
|
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
37 |
# Find out TRACE_PATH by looking for the trace folder in SYSTEMINCLUDE and USERINCLUDES |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
38 |
# traces/<target_name>_<target_extension> |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
39 |
TRACE_PATH:=$(call get_trace_path,/traces/$(TRACE_RELEASABLE_ID)) |
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
40 |
ifneq ($(TRACE_PATH),) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
41 |
TRACE_PRJNAME:=$(TRACE_RELEASABLE_ID) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
42 |
else # obsolete forms for compatibility |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
43 |
# traces_<target_name>_<target_ext> |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
44 |
TRACE_PATH:=$(call get_trace_path,/traces_$(TARGET)_$(TARGETEXT)) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
45 |
ifneq ($(TRACE_PATH),) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
46 |
# set project name as <target_name>_<target_ext> instead of <mmp_name> |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
47 |
# to trick old TCom into finding the path. |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
48 |
OLDTC_TRACE_PRJNAME:=$(TARGET)_$(TARGETEXT) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
49 |
else |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
50 |
# traces_<target_name>_<target_type> |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
51 |
TRACE_PATH:=$(call get_trace_path,/traces_$(TARGET)_$(TARGETTYPE)) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
52 |
ifneq ($(TRACE_PATH),) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
53 |
# set project name as <target_name>_<target_type> instead of <mmp_name> |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
54 |
# to trick old TCom into finding the path. |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
55 |
OLDTC_TRACE_PRJNAME:=$(TARGET)_$(TARGETTYPE) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
56 |
else |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
57 |
# traces_<mmp_name> |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
58 |
TRACE_PATH:=$(call get_trace_path,/traces_$(TRACE_PRJNAME)) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
59 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
60 |
# traces |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
61 |
ifeq ($(TRACE_PATH),) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
62 |
TRACE_PATH:=$(call get_trace_path,/traces) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
63 |
endif |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
64 |
endif |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
65 |
endif |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
66 |
endif |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
67 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
68 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
69 |
# initialise (so what output will be correct if we don't actually run the TC) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
70 |
TRACE_DICTIONARY:= |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
71 |
AUTOGEN_HEADER:= |
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
72 |
$(if $(FLMDEBUG),$(info <debug>TRACE_PATH='$(TRACE_PATH)' TRACE_RELEASABLE_ID='$(TRACE_RELEASABLE_ID)'</debug>)) |
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
73 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
74 |
# Run trace compiler only if TRACE_PATH exists |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
75 |
ifneq ($(TRACE_PATH),) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
76 |
TRACE_MARKER:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_RELEASABLE_ID)_$(UID_TC).done |
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
77 |
TRACE_THISCOMPONENT_ALLRULE:=$(call sanitise,$(COMPONENT_META))_alltracedone |
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
78 |
TRACE_HEADERS:= |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
79 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
80 |
TRACE_SOURCE_LIST:=$(TRACE_MARKER_PATH)/tracecompile_$(TRACE_RELEASABLE_ID)_$(UID_TC).sourcelist |
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
81 |
$(if $(FLMDEBUG),$(info <debug>TRACE_SOURCE_LIST=$(TRACE_SOURCE_LIST)</debug>)) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
82 |
TRACE_VARIANT_SOURCE_LIST:=$(OUTPUTPATH)/$(VARIANTPLATFORM)/$(VARIANTTYPE)/tracecompile_$(TRACE_RELEASABLE_ID)_$(UID_TC).sourcelist |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
83 |
$(if $(FLMDEBUG),$(info <debug>TRACE_VARIANT_SOURCE_LIST=$(TRACE_VARIANT_SOURCE_LIST)</debug>)) |
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
84 |
|
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
85 |
# The sourcelist_grouped_write macro allows us to construct a source list file, 10 objects at a time |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
86 |
# to avoid limits on argument lengths and sizes on Windows. |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
87 |
# $1 = list of source files |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
88 |
# $2 = ">" or ">>" i.e. for creating the file. |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
89 |
define sourcelist_grouped_write |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
90 |
$(call startrule,sourcelist_write) \ |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
91 |
$(if $1,echo -en '$(subst $(CHAR_SPACE),\n,$(strip $(wordlist 1,10,$1)))\n' $2 $$@,true) \ |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
92 |
$(call endrule,sourcelist_write) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
93 |
$(if $1,$(call sourcelist_grouped_write,$(wordlist 11,$(words $1),$1),>>),) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
94 |
endef |
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
95 |
|
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
96 |
# Write the list of sources for this variant to a file |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
97 |
# Make the combined sourcelist for this target depend on it |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
98 |
# It's all to do with how make treats this file when it |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
99 |
# does exist. We are forcing it evaluate the target rule here |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
100 |
# even if the file is in place by making it PHONY. In other |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
101 |
# words, this is forcing the variant source list to always |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
102 |
# be written but later on we might not write to the combined |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
103 |
# source list if it isn't going to change. |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
104 |
define sourcelist_write |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
105 |
$(TRACE_SOURCE_LIST): $(TRACE_VARIANT_SOURCE_LIST) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
106 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
107 |
.PHONY:: $(TRACE_VARIANT_SOURCE_LIST) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
108 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
109 |
$(TRACE_VARIANT_SOURCE_LIST): $(SOURCE) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
110 |
$(call sourcelist_grouped_write,$(SOURCE),>) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
111 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
112 |
endef |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
113 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
114 |
$(eval $(sourcelist_write)) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
115 |
$(eval $(call GenerateStandardCleanTarget,$(TRACE_VARIANT_SOURCE_LIST),,)) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
116 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
117 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
118 |
$(if $(FLMDEBUG),$(info <debug>Trace Compiler SOURCES: $(SOURCE)</debug>)) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
119 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
120 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
121 |
.PHONY:: $(TRACE_THISCOMPONENT_ALLRULE) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
122 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
123 |
$(TRACE_THISCOMPONENT_ALLRULE):: $(TRACE_MARKER) |
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
124 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
125 |
$(TRACE_MARKER) : $(SOURCE) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
126 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
127 |
TRACE_HEADERS:=$(foreach SRC,$(SOURCE),$(TRACE_PATH)/$(basename $(notdir $(SRC)))Traces.h) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
128 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
129 |
$(TRACE_HEADERS): $(TRACE_MARKER) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
130 |
|
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
131 |
TRACE_GUARD:=GUARD_$(call sanitise,$(TRACE_MARKER)) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
132 |
$(if $(FLMDEBUG),$(info <debug>TRACE GUARD for '$(TRACE_RELEASABLE_ID)' is: $(TRACE_GUARD)=$($(TRACE_GUARD))</debug>)) |
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
133 |
|
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
134 |
ifeq ($($(TRACE_GUARD)),) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
135 |
$(TRACE_GUARD):=1 |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
136 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
137 |
$(if $(FLMDEBUG),$(info <debug>PAST GUARD (unique trace) for '$(TRACE_RELEASABLE_ID)'</debug>)) |
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
138 |
# The trace compiler likes to change . into _ so we must do the same in the case of mmps with a name like |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
139 |
# fred.prd.mmp we want fred_prd |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
140 |
TRACE_PRJNAME_SANITISED:=$(subst .,_,$(TRACE_PRJNAME)) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
141 |
OLDTC_TRACE_PRJNAME_SANITISED:=$(subst .,_,$(OLDTC_TRACE_PRJNAME)) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
142 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
143 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
144 |
JAVA_COMMAND:=$(SBS_JAVATC) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
145 |
TRACE_COMPILER_PATH:=$(EPOCROOT)/epoc32/tools |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
146 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
147 |
# declare the trace_compile macro but only do it once in the build |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
148 |
ifeq ($(trace_compile),) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
149 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
150 |
# Find out which macro to declare - the one supporting the new CLI |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
151 |
# or the old one. First try to find TraceCompilerMain.class |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
152 |
# If it is there then it might be the new posix-like interface |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
153 |
TRACE_VER:= |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
154 |
TRACE_VSTR:= |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
155 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
156 |
TCClass:=$(wildcard $(TRACE_COMPILER_PATH)/tracecompiler/com/nokia/tracecompiler/TraceCompilerMain.class) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
157 |
ifneq ($(TCClass),) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
158 |
# Get the version string from the TC (assume it's the new one) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
159 |
TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompilerMain |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
160 |
TRACE_VSTR:=$(firstword $(subst TraceCompiler version ,,$(shell $(JAVA_COMMAND) $(TRACE_COMPILER_START) --version))) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
161 |
# check if it looks like a version that supports the new cli interface: supporting up to verion 9 in the future. |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
162 |
TRACE_VER:=$(findstring new,$(foreach version,2 3 4 5 6 7 8 9,$(patsubst $(version).%,new,$(TRACE_VSTR)))) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
163 |
endif |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
164 |
$(if $(FLMDEBUG),$(info <debug>TRACE_VSTR=$(TRACE_VSTR) TRACE_VER=$(TRACE_VER)</debug>)) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
165 |
|
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
166 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
167 |
# 0. Generate a combined sourcelist from all variants. |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
168 |
# 0.1 Write the combined list to a temporary file |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
169 |
# 0.2 Check if there are new files since the last build |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
170 |
# md5 stored in the trace marker. |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
171 |
# 0.3 Rewrite the combined sourcelist if new sourcefiles have appeared |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
172 |
# since the last build |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
173 |
# 1. Use pipe to send inputs to trace compiler to process |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
174 |
# 2. Create a hash regarding to source names and put it in marker. |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
175 |
# 3. Show source names that are processed by trace compiler |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
176 |
|
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
177 |
ifeq ($(TRACE_VER),new) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
178 |
define trace_compile |
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
179 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
180 |
$(TRACE_SOURCE_LIST): |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
181 |
$(call startrule,sourcelist_combine) \ |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
182 |
$(GNUCAT) $(TRACE_SOURCE_LIST) $$^ 2>/dev/null | $(GNUSORT) -u > $$@.new && \ |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
183 |
$(GNUMD5SUM) -c $(TRACE_MARKER) 2>/dev/null || \ |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
184 |
$(GNUCP) $$@.new $$@ \ |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
185 |
$(call endrule,sourcelist_combine) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
186 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
187 |
$(TRACE_MARKER) : $(PROJECT_META) $(TRACE_SOURCE_LIST) |
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
188 |
$(call startrule,tracecompile) \ |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
189 |
( $(GNUCAT) $(TRACE_SOURCE_LIST); \ |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
190 |
echo -en "*ENDOFSOURCEFILES*\n" ) | \ |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
191 |
$(JAVA_COMMAND) $(TRACE_COMPILER_START) $(if $(FLMDEBUG),-d,) --uid=$(UID_TC) --project=$(TRACE_PRJNAME) --mmp=$(PROJECT_META) --traces=$(TRACE_PATH) && \ |
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
192 |
$(GNUMD5SUM) $(TRACE_SOURCE_LIST).new > $$@ 2>/dev/null && \ |
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
193 |
{ $(GNUTOUCH) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER); \ |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
194 |
$(GNUCAT) $(TRACE_SOURCE_LIST) ; true ; } \ |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
195 |
$(call endrule,tracecompile) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
196 |
endef |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
197 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
198 |
else # Old inteface |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
199 |
TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompiler |
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
200 |
|
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
201 |
define trace_compile |
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
202 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
203 |
$(TRACE_SOURCE_LIST): |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
204 |
$(call startrule,sourcelist_combine) \ |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
205 |
$(GNUCAT) $(TRACE_SOURCE_LIST) $$^ 2>/dev/null | $(GNUSORT) -u > $$@.new && \ |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
206 |
$(GNUMD5SUM) -c $(TRACE_MARKER) 2>/dev/null || \ |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
207 |
$(GNUCP) $$@.new $$@ \ |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
208 |
$(call endrule,sourcelist_combine) |
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
209 |
|
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
210 |
$(TRACE_MARKER) : $(PROJECT_META) $(TRACE_SOURCE_LIST) |
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
211 |
$(call startrule,tracecompile) \ |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
212 |
( echo -en "$(OLDTC_TRACE_PRJNAME)\n$(PROJECT_META)\n"; \ |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
213 |
$(GNUCAT) $(TRACE_SOURCE_LIST); \ |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
214 |
echo -en "*ENDOFSOURCEFILES*\n" ) | \ |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
215 |
$(JAVA_COMMAND) $(TRACE_COMPILER_START) $(UID_TC) && \ |
616
24e4ef208cca
sbs version 2.14.2
Richard Taylor <richard.i.taylor@nokia.com>
parents:
590
diff
changeset
|
216 |
$(GNUMD5SUM) $(TRACE_SOURCE_LIST).new > $$@ 2>/dev/null && \ |
590
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
217 |
{ $(GNUTOUCH) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER); \ |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
218 |
$(GNUCAT) $(TRACE_SOURCE_LIST) ; true ; } \ |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
219 |
$(call endrule,tracecompile) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
220 |
endef |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
221 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
222 |
# End - new/old trace compiler |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
223 |
endif |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
224 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
225 |
# End - tracecompile is defined |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
226 |
endif |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
227 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
228 |
ifeq ($(TRACE_VER),new) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
229 |
TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_Dictionary.xml |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
230 |
AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_TraceDefinitions.h |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
231 |
else |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
232 |
TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(OLDTC_TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_Dictionary.xml |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
233 |
AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/$(OLDTC_TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_TraceDefinitions.h |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
234 |
endif |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
235 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
236 |
$(eval $(trace_compile)) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
237 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
238 |
$(eval $(call GenerateStandardCleanTarget, $(TRACE_PATH)/tracebuilder.cache $(TRACE_MARKER) $(TRACE_SOURCE_LIST),,)) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
239 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
240 |
$(call makepath,$(TRACE_PATH) $(dir $(TRACE_DICTIONARY) $(AUTOGEN_HEADER))) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
241 |
# End - guard that prevents repeated calls to TCom |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
242 |
endif |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
243 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
244 |
$(eval $(call GenerateStandardCleanTarget,$(TRACE_HEADERS),,)) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
245 |
|
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
246 |
# End - Nothing to trace (not trace path in include) |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
247 |
else |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
248 |
# Indicate to following parts of the FLM that we actually won't run |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
249 |
# trace compiler so they can set dependencies accordingly. |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
250 |
USE_TRACE_COMPILER:= |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
251 |
endif |
360bd6b35136
buildrom v3.24.0, rombuild v2.17.3, rofsbuild v2.10.4, resource compiler v8.4.001, image check v1.4.0, elftools v2.3, elf2e32 v2.3
jjkang
parents:
0
diff
changeset
|
252 |