# HG changeset patch
# User timothy.murphy@nokia.com
# Date 1272640037 -3600
# Node ID 7581d432643aa510d1dafb9cbc8f719e58aeac19
# Parent f60c4282816c661d2386960d478eb5149484ff0a
fix: support new trace compiler features for preventing clashes. Automatically turn on OST_TRACE_COMPILER_IN_USE macro. Look for trace header in systemincludes. Make directories in makefile parse to prevent clashes during build. Correct path for autogen headers. Correct case issue with autogen headers on Linux.
diff -r f60c4282816c -r 7581d432643a sbsv2/raptor/RELEASE-NOTES.html
--- a/sbsv2/raptor/RELEASE-NOTES.html Fri Apr 30 10:19:33 2010 +0100
+++ b/sbsv2/raptor/RELEASE-NOTES.html Fri Apr 30 16:07:17 2010 +0100
@@ -16,6 +16,20 @@
+
Next version
+
+New Features
+Defect Fixes
+
+- Fix: ensure trace paths exist before build starts to avoid clashes during the build with some make engines
+- Fix: permit traces path to be specified in systemincludes - helps Qt
+
+
+
version 2.13.0
New Features
diff -r f60c4282816c -r 7581d432643a sbsv2/raptor/lib/flm/e32abiv2.flm
--- a/sbsv2/raptor/lib/flm/e32abiv2.flm Fri Apr 30 10:19:33 2010 +0100
+++ b/sbsv2/raptor/lib/flm/e32abiv2.flm Fri Apr 30 16:07:17 2010 +0100
@@ -714,6 +714,9 @@
ifneq ($(USE_TRACE_COMPILER),)
include $(FLMHOME)/tracecompiler.mk
WHATRELEASE:=$(WHATRELEASE) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER)
+ ifneq ($(TRACE_PATH),)
+ CDEFS:=$(CDEFS) OST_TRACE_COMPILER_IN_USE
+ endif
endif
CC_CPPONLY_ARGS:=$(SYMBIAN_CCFLAGS) $(if $(DEBUG_INFO),-g) $(DEBUG_FORMAT) \
diff -r f60c4282816c -r 7581d432643a sbsv2/raptor/lib/flm/tracecompiler.mk
--- a/sbsv2/raptor/lib/flm/tracecompiler.mk Fri Apr 30 10:19:33 2010 +0100
+++ b/sbsv2/raptor/lib/flm/tracecompiler.mk Fri Apr 30 16:07:17 2010 +0100
@@ -20,26 +20,37 @@
# Find out TRACE_PATH
# first look for .*/traces/traces__
-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces/traces_$(TARGET)_$(TARGETEXT),$(DIR))))
+TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE) $(SYSTEMINCLUDE),$(filter %/traces/$(TARGET)_$(TARGETEXT),$(DIR))))
+
ifneq ($(TRACE_PATH),)
# set project name as _ instead of
TRACE_PRJNAME:=$(TARGET)_$(TARGETEXT)
endif
+
+# if not found look for .*/traces__
+ifeq ($(TRACE_PATH),)
+TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE) $(SYSTEMINCLUDE),$(filter %/traces_$(TARGET)_$(TARGETTYPE),$(DIR))))
+# set project name as _ instead of
+ifneq ($(TRACE_PATH),)
+TRACE_PRJNAME:=$(TARGET)_$(TARGETTYPE)
+endif
+endif
+
# if not found look for .*/traces_
ifeq ($(TRACE_PATH),)
-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TRACE_PRJNAME),$(DIR))))
+TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE) $(SYSTEMINCLUDE),$(filter %/traces_$(TRACE_PRJNAME),$(DIR))))
endif
# if not found look for .*/traces
ifeq ($(TRACE_PATH),)
-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces,$(DIR))))
+TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE) $(SYSTEMINCLUDE),$(filter %/traces,$(DIR))))
endif
# if not found look for .*/traces__
ifeq ($(TRACE_PATH),)
-TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE),$(filter %/traces_$(TARGET)_$(TARGETTYPE),$(DIR))))
+TRACE_PATH:=$(strip $(foreach DIR,$(USERINCLUDE) $(SYSTEMINCLUDE),$(filter %/traces_$(TARGET)_$(TARGETTYPE),$(DIR))))
# set project name as _ instead of
TRACE_PRJNAME:=$(TARGET)_$(TARGETTYPE)
endif
@@ -76,14 +87,33 @@
# fred.prd.mmp we want fred_prd
TRACE_PRJNAME_SANITISED:=$(subst .,_,$(TRACE_PRJNAME))
-TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_Dictionary.xml
-AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_TraceDefinitions.h
JAVA_COMMAND:=$(SBS_JAVATC)
TRACE_COMPILER_PATH:=$(EPOCROOT)/epoc32/tools
-TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompiler
+
+#
+#try to find TraceCompilerMain.class (the new posix-like interface)
+#
+ifeq ($(trace_compile),)
+TCClass:=$(wildcard $(TRACE_COMPILER_PATH)/tracecompiler/com/nokia/tracecompiler/TraceCompilerMain.class)
-
+ifneq ($(TCClass),) #New Interface
+TCAUTOGENDIR:=platform
+TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompilerMain
+define trace_compile
+$(TRACE_MARKER) : $(PROJECT_META)
+ $(call startrule,tracecompile) \
+ ( $(GNUCAT) $(TRACE_SOURCE_LIST); \
+ echo -en "*ENDOFSOURCEFILES*\n" ) | \
+ $(JAVA_COMMAND) $(TRACE_COMPILER_START) -d --uid=$(UID_TC) --project=$(TRACE_PRJNAME) --mmp=$(PROJECT_META) --traces=$(TRACE_PATH) && \
+ $(GNUMD5SUM) $(TRACE_SOURCE_LIST) > $(TRACE_MARKER) && \
+ { $(GNUTOUCH) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER); \
+ $(GNUCAT) $(TRACE_SOURCE_LIST) ; true ; } \
+ $(call endrule,tracecompile)
+endef
+else # Old inteface
+TCAUTOGENDIR:=internal
+TRACE_COMPILER_START:=-classpath $(TRACE_COMPILER_PATH)/tracecompiler com.nokia.tracecompiler.TraceCompiler
# 1. Use pipe to send inputs to trace compiler to process
# 2. Create a hash regarding to source names and put it in marker.
# 3. Show source names that are processed by trace compiler
@@ -99,11 +129,18 @@
$(GNUCAT) $(TRACE_SOURCE_LIST) ; true ; } \
$(call endrule,tracecompile)
endef
+endif
+
+endif
+
+TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/ost_dictionaries/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_Dictionary.xml
+AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/$(TCAUTOGENDIR)/symbiantraces/autogen/$(TRACE_PRJNAME_SANITISED)_0x$(UID_TC)_TraceDefinitions.h
$(eval $(trace_compile))
$(eval $(call GenerateStandardCleanTarget, $(TRACE_PATH)/tracebuilder.cache $(TRACE_MARKER) $(TRACE_SOURCE_LIST),,))
+$(call makepath,$(TRACE_PATH) $(dir $(TRACE_DICTIONARY) $(AUTOGEN_HEADER)))
# End sanity guard
endif
diff -r f60c4282816c -r 7581d432643a sbsv2/raptor/lib/flm/win32.flm
--- a/sbsv2/raptor/lib/flm/win32.flm Fri Apr 30 10:19:33 2010 +0100
+++ b/sbsv2/raptor/lib/flm/win32.flm Fri Apr 30 16:07:17 2010 +0100
@@ -220,6 +220,9 @@
ifneq ($(USE_TRACE_COMPILER),)
include $(FLMHOME)/tracecompiler.mk
TC_RELEASABLES:=$(TRACE_DICTIONARY) $(AUTOGEN_HEADER)
+ ifneq ($(TRACE_PATH),)
+ CDEFS:=$(CDEFS) OST_TRACE_COMPILER_IN_USE
+ endif
endif
diff -r f60c4282816c -r 7581d432643a sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child1.mmp
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child1.mmp Fri Apr 30 10:19:33 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child1.mmp Fri Apr 30 16:07:17 2010 +0100
@@ -11,5 +11,5 @@
SOURCE child1.cpp
SOURCE common.cpp
-USERINCLUDE ../traces_child1_exe
+USERINCLUDE ../traces/traces_child1_exe
diff -r f60c4282816c -r 7581d432643a sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child2.mmp
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child2.mmp Fri Apr 30 10:19:33 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child2.mmp Fri Apr 30 16:07:17 2010 +0100
@@ -11,5 +11,5 @@
SOURCE child2.cpp
SOURCE common.cpp
-USERINCLUDE ../traces_child2_exe
+USERINCLUDE ../traces/traces_child2_exe
diff -r f60c4282816c -r 7581d432643a sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child3.mmp
--- a/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child3.mmp Fri Apr 30 10:19:33 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/child3.mmp Fri Apr 30 16:07:17 2010 +0100
@@ -10,5 +10,5 @@
SOURCE child3.cpp
SOURCE common.cpp
-USERINCLUDE ../traces_child3_exe
+USERINCLUDE ../traces/traces_child3_exe
diff -r f60c4282816c -r 7581d432643a sbsv2/raptor/test/smoke_suite/tracecompiler_variants.py
--- a/sbsv2/raptor/test/smoke_suite/tracecompiler_variants.py Fri Apr 30 10:19:33 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_variants.py Fri Apr 30 16:07:17 2010 +0100
@@ -42,8 +42,8 @@
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/fixed_id.definitions",
"$(EPOCROOT)/epoc32/ost_dictionaries/invariant_source_0x10000002_Dictionary.xml",
"$(EPOCROOT)/epoc32/ost_dictionaries/variant_source_0x10000003_Dictionary.xml",
- "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
- "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
+ "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
+ "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
]
t.addbuildtargets('smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf', [
"invariant_source_/armv5/udeb/inv_source.o",
@@ -105,8 +105,8 @@
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/variant_source/traces/var_source3Traces.h",
"$(EPOCROOT)/epoc32/ost_dictionaries/invariant_source_0x10000002_Dictionary.xml",
"$(EPOCROOT)/epoc32/ost_dictionaries/variant_source_0x10000003_Dictionary.xml",
- "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
- "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
+ "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/invariant_source_0x10000002_TraceDefinitions.h",
+ "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/variant_source_0x10000003_TraceDefinitions.h"
]
t.addbuildtargets('smoke_suite/test_resources/tracecompiler/variant_source/group/bld.inf', [
"invariant_source_/armv5/udeb/inv_source.o",
@@ -159,7 +159,7 @@
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_bTraces.h",
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/multiple_variants/traces/tc_cTraces.h",
"$(EPOCROOT)/epoc32/ost_dictionaries/tc_variants_0x10000004_Dictionary.xml",
- "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/tc_variants_0x10000004_TraceDefinitions.h"
+ "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/tc_variants_0x10000004_TraceDefinitions.h"
]
t.addbuildtargets('smoke_suite/test_resources/tracecompiler/multiple_variants/group/bld.inf', [
"tc_variants_/armv5.phone1/udeb/tc_main.o",
@@ -195,18 +195,18 @@
"$(EPOCROOT)/epoc32/release/armv5/urel/child2.exe",
"$(EPOCROOT)/epoc32/release/armv5/udeb/child3.exe",
"$(EPOCROOT)/epoc32/release/armv5/urel/child3.exe",
- "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child1_exe/child1Traces.h",
- "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child1_exe/commonTraces.h",
- "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/child2Traces.h",
- "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/commonTraces.h",
- "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/child3Traces.h",
- "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/commonTraces.h",
+ "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child1_exe/child1Traces.h",
+ "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child1_exe/commonTraces.h",
+ "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child2_exe/child2Traces.h",
+ "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child2_exe/commonTraces.h",
+ "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child3_exe/child3Traces.h",
+ "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child3_exe/commonTraces.h",
"$(EPOCROOT)/epoc32/ost_dictionaries/child1_exe_0x11100001_Dictionary.xml",
"$(EPOCROOT)/epoc32/ost_dictionaries/child2_exe_0x11100002_Dictionary.xml",
"$(EPOCROOT)/epoc32/ost_dictionaries/child3_exe_0x11100002_Dictionary.xml",
- "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child1_exe_0x11100001_TraceDefinitions.h",
- "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
- "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
+ "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child1_exe_0x11100001_TraceDefinitions.h",
+ "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
+ "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
]
t.addbuildtargets('smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf', [
"child1_/armv5/udeb/child1.o",
@@ -231,7 +231,7 @@
# Clean mmp A then build mmp B and C. As common.cpp is shared by A B and C, commonTraces.h would be
# cleaned when cleaning mmp A. But as B and C aren't cleaned, Raptor wouldn't run trace compiler on
# B and C, thus commonTraces.h wouldn't be generated again, so be missing for mmp B and C.
- # The solution is to use new trace path "traces__" instead of "traces" so shared
+ # The solution is to use new trace path "traces/traces__" instead of "traces" so shared
# source has different copy of trace headers for different projects.
t = SmokeTest()
t.id = "102e"
@@ -247,14 +247,14 @@
"$(EPOCROOT)/epoc32/release/armv5/urel/child2.exe",
"$(EPOCROOT)/epoc32/release/armv5/udeb/child3.exe",
"$(EPOCROOT)/epoc32/release/armv5/urel/child3.exe",
- "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/child2Traces.h",
- "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child2_exe/commonTraces.h",
- "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/child3Traces.h",
- "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces_child3_exe/commonTraces.h",
+ "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child2_exe/child2Traces.h",
+ "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child2_exe/commonTraces.h",
+ "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child3_exe/child3Traces.h",
+ "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/mum_children_mmps/traces/traces_child3_exe/commonTraces.h",
"$(EPOCROOT)/epoc32/ost_dictionaries/child2_exe_0x11100002_Dictionary.xml",
"$(EPOCROOT)/epoc32/ost_dictionaries/child3_exe_0x11100002_Dictionary.xml",
- "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
- "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
+ "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child2_exe_0x11100002_TraceDefinitions.h",
+ "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/child3_exe_0x11100002_TraceDefinitions.h"
]
t.addbuildtargets('smoke_suite/test_resources/tracecompiler/mum_children_mmps/group/bld.inf', [
"child2_/armv5/udeb/child2.o",
diff -r f60c4282816c -r 7581d432643a sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py
--- a/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py Fri Apr 30 10:19:33 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py Fri Apr 30 16:07:17 2010 +0100
@@ -46,7 +46,7 @@
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h",
"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/fixed_id.definitions",
"$(EPOCROOT)/epoc32/ost_dictionaries/test_TC_0x1000008d_Dictionary.xml",
- "$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/test_TC_0x1000008d_TraceDefinitions.h"
+ "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/test_TC_0x1000008d_TraceDefinitions.h"
]
t.stdout = [
"",
@@ -58,7 +58,7 @@
"$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll",
"$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map",
"$(EPOCROOT)/epoc32/ost_dictionaries/test_TC_0x1000008d_Dictionary.xml",
- "$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/test_TC_0x1000008d_TraceDefinitions.h"
+ "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/test_TC_0x1000008d_TraceDefinitions.h"
]
t.run()