3
|
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 the License "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:
|
|
15 |
#
|
|
16 |
#
|
|
17 |
# A test-template extension makefile
|
|
18 |
# supposed to demonstrate that different calls
|
|
19 |
# to the same template extension makefile will
|
|
20 |
# get different variable values.
|
|
21 |
# i.e. it's supposed to show target specific variables
|
|
22 |
# working properly for template extension makefiles.
|
|
23 |
|
|
24 |
# The test is by manual comparison at the moment.
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
define print
|
|
29 |
echo ""
|
|
30 |
echo ""
|
|
31 |
@echo ""
|
|
32 |
@echo "EPOCROOT=$(EPOCROOT)"
|
|
33 |
@echo "PLATFORM=$(PLATFORM)"
|
|
34 |
@echo "CFG=$(CFG)"
|
|
35 |
@echo "TO_ROOT=$(TO_ROOT)"
|
|
36 |
@echo "TO_BLDINF=$(TO_BLDINF)"
|
|
37 |
@echo "EPOCBLD=$(EPOCBLD)"
|
|
38 |
@echo "EXTENSION_ROOT=$(EXTENSION_ROOT)"
|
|
39 |
@echo "HOST_SHELL=$(HOST_SHELL)"
|
|
40 |
@echo "/=$(/)"
|
|
41 |
@echo ";=$(;)"
|
|
42 |
@echo "RMDIR=$(RMDIR)"
|
|
43 |
@echo "RM=$(RM)"
|
|
44 |
@echo "ERASE=$(ERASE)"
|
|
45 |
@echo "MKDIR=$(MKDIR)"
|
|
46 |
@echo "CP=$(CP)"
|
|
47 |
@echo "PLATFORM_PATH=$(PLATFORM_PATH)"
|
|
48 |
@echo "CFG_PATH=$(CFG_PATH)"
|
|
49 |
@echo "TARGET=$(TARGET)"
|
|
50 |
@echo "SOURCE=$(SOURCE)"
|
|
51 |
@echo "TEMTARGET=$(TEMTARGET)"
|
|
52 |
@echo "TEMPLATE_EXTENSION_MAKEFILE=$(TEMPLATE_EXTENSION_MAKEFILE)"
|
|
53 |
@echo ""
|
|
54 |
@echo "Options:"
|
|
55 |
@echo "PREFIX=$(PREFIX)"
|
|
56 |
@echo "MEMMODEL=$(MEMMODEL)"
|
|
57 |
@echo "NAME=$(NAME)"
|
|
58 |
@echo ""
|
|
59 |
@echo "TEMCALLVALUE=$(TEMCALLVALUE)"
|
|
60 |
@echo "TEMCALL_TESTUNIQ_FILENAME=$(TEMCALL_TESTUNIQ_FILENAME)"
|
|
61 |
endef
|
|
62 |
|
|
63 |
# Test for duplicate calls (bad_bld.inf)
|
|
64 |
BLANK:=
|
|
65 |
SPACE:=$(BLANK) $(BLANK)
|
|
66 |
COLON:=:
|
|
67 |
TESTUNIQ:=TEMTEST_$(MEMMODEL)$(NAME)$(TARGET)$(CFG)$(PLATFORM)$(TEMTARGET)
|
|
68 |
TESTUNIQ:=$(subst /,_,$(TESTUNIQ))
|
|
69 |
TESTUNIQ:=$(subst $(SPACE),_,$(TESTUNIQ))
|
|
70 |
TESTUNIQ:=$(subst $(COLON),_,$(TESTUNIQ))
|
|
71 |
TEMCALL_TESTUNIQ_FILENAME:=$(EPOCROOT)/epoc32/build/$(TESTUNIQ).out
|
|
72 |
|
|
73 |
$(info TEMCALL_TESTUNIQ_FILENAME=$(TEMCALL_TESTUNIQ_FILENAME))
|
|
74 |
$(info TEMTARGET=$(TEMTARGET))
|
|
75 |
TEMCALLVALUE:=$(shell if [ ! -e "$(TEMCALL_TESTUNIQ_FILENAME)" ]; then echo "$(TEMCALL_TESTUNIQ_FILENAME)" > "$(TEMCALL_TESTUNIQ_FILENAME)"; echo "1";else echo "0"; fi)
|
|
76 |
|
|
77 |
ifneq ($(TEMCALLVALUE),1)
|
|
78 |
$(shell touch $(EPOCROOT)/epoc32/raptor_smoketest_tem_failed)
|
|
79 |
$(error repeated call to TEM with same values, tested with file $(TEMCALL_TESTUNIQ_FILENAME), resulting in '$(TEMCALLVALUE)' at $(shell date; cat $(TEMCALL_TESTUNIQ_FILENAME)))
|
|
80 |
else
|
|
81 |
$(shell touch $(EPOCROOT)/epoc32/raptor_smoketest_tem_succeeded)
|
|
82 |
endif
|
|
83 |
|
|
84 |
PARS:=$(PREFIX)$(MEMMODEL)$(NAME)
|
|
85 |
ifneq ($(PARS),yetanotheraonetwothreeotherstuff)
|
|
86 |
ifneq ($(PARS),1yetanother1aonetwothree1otherstuff)
|
|
87 |
$(error Unexpected TEM call parameters for this test: $(PARS))
|
|
88 |
endif
|
|
89 |
endif
|
|
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
|
94 |
DO_NOTHING :
|
|
95 |
@echo "DO_NOTHING"
|
|
96 |
$(print)
|
|
97 |
|
|
98 |
|
|
99 |
MAKMAKE :
|
|
100 |
@echo "MAKMAKE"
|
|
101 |
$(print)
|
|
102 |
|
|
103 |
BLD :
|
|
104 |
@echo "BLD"
|
|
105 |
$(print)
|
|
106 |
|
|
107 |
SAVESPACE :
|
|
108 |
@echo "SAVESPACE"
|
|
109 |
$(print)
|
|
110 |
|
|
111 |
FREEZE :
|
|
112 |
@echo "FREEZE"
|
|
113 |
$(print)
|
|
114 |
|
|
115 |
LIB :
|
|
116 |
@echo "LIB"
|
|
117 |
$(print)
|
|
118 |
|
|
119 |
CLEANLIB :
|
|
120 |
@echo "CLEANLIB"
|
|
121 |
$(print)
|
|
122 |
|
|
123 |
RESOURCE :
|
|
124 |
@echo "RESOURCE"
|
|
125 |
$(print)
|
|
126 |
|
|
127 |
CLEAN :
|
|
128 |
@echo "CLEAN"
|
|
129 |
$(print)
|
|
130 |
|
|
131 |
RELEASABLES :
|
|
132 |
@echo "RELEASABLES"
|
|
133 |
$(print)
|
|
134 |
|
|
135 |
FINAL :
|
|
136 |
@echo "FINAL"
|
|
137 |
$(print)
|
|
138 |
|