author | hgs |
Mon, 04 Oct 2010 10:17:33 +0300 | |
changeset 37 | 2d01d5a0b322 |
parent 0 | f453ebb75370 |
permissions | -rw-r--r-- |
0
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
# |
37 | 2 |
# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
# All rights reserved. |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
# This component and the accompanying materials are made available |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
# under the terms of "Eclipse Public License v1.0" |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
# which accompanies this distribution, and is available |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html". |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
# |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
# Initial Contributors: |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
# Nokia Corporation - initial contribution. |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
# |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
# Contributors: |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
# |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
# Description: |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
# |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
# |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
|
37 | 18 |
# run a script to call mifconv and svgtbinencode |
19 |
||
20 |
# only run once per TARGETFILE, but gather up all the requested PLATFORM + CFG |
|
21 |
# pairs so that the script can copy the target files to the other locations |
|
22 |
# required for different platforms. |
|
0
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
|
37 | 24 |
# note that TARGET_PLATFORMS is escaped in the macro so that it is not |
25 |
# expanded until the command runs, ensuring that it contains all the values. |
|
26 |
||
27 |
TARGET_PLATFORMS:=$(call sanitise,$(TARGETFILE)_mif) |
|
0
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
|
37 | 29 |
ifeq ($($(TARGET_PLATFORMS)),) |
30 |
$(TARGET_PLATFORMS):=$(PLATFORM) $(CFG) |
|
0
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
|
37 | 32 |
SCRIPT:=$(PYTHON) $(EPOCROOT)/epoc32/tools/mifconv_wrapper.py |
33 |
MANIFEST:=$(EPOCBLD)/$(TARGET_PLATFORMS) |
|
0
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
|
37 | 35 |
# macro to define rules for different phony targets |
36 |
# |
|
37 |
# run the script as a recipe, producing a manifest file as output. |
|
38 |
# then use the manifest file to generate the whatlog tags. |
|
39 |
# |
|
40 |
# $1 is BITMAP or CLEAN |
|
41 |
# |
|
42 |
define mifconvwrapper |
|
43 |
$1:: |
|
44 |
$(call startrule,mifconvwrapper,FORCESUCCESS) \ |
|
45 |
$(SCRIPT) \ |
|
46 |
$(if $(FLMDEBUG),--debug="on") \ |
|
47 |
--epocroot="$(EPOCROOT)" \ |
|
48 |
--extroot="$(EXTENSION_ROOT)" \ |
|
49 |
--make="$1" \ |
|
50 |
--manifest="$(MANIFEST)" \ |
|
51 |
--platforms="$$($(TARGET_PLATFORMS))" \ |
|
52 |
$(if $(TARGETFILE),--target="$(TARGETFILE)") \ |
|
53 |
$(if $(HEADERFILE),--header="$(HEADERFILE)") \ |
|
54 |
$(if $(SOURCES),--sources="$(SOURCES)") \ |
|
55 |
$(if $(SOURCEFILE),--sourcefile="$(SOURCEFILE)") \ |
|
56 |
$(if $(SOURCEDIR),--sourcedir="$(SOURCEDIR)") \ |
|
57 |
$(if $(SVGENCODINGVERSION),--svgversion="$(SVGENCODINGVERSION)") \ |
|
58 |
$(call endrule,mifconvwrapper) |
|
59 |
$(call startrawoutput) \ |
|
60 |
echo "$(call whatLogOpen)" ; \ |
|
61 |
$(GNUCAT) $(MANIFEST) | \ |
|
62 |
(read -r LINE; while [ $$$$? -eq 0 ]; do \ |
|
63 |
echo "$(call whatLogItem,BITMAP,$$$$LINE)"; \ |
|
64 |
read -r LINE; done; ); \ |
|
65 |
echo "$(call whatLogClose)" \ |
|
66 |
$(call endrawoutput) |
|
67 |
$(GNURM) $(MANIFEST) |
|
68 |
endef |
|
0
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
69 |
|
37 | 70 |
# if we are doing CLEAN or REALLYCLEAN then just include the CLEAN target, |
71 |
# otherwise just include the BITMAP target |
|
72 |
# |
|
73 |
ifeq ($(filter %CLEAN,$(call uppercase,$(MAKECMDGOALS))),) |
|
74 |
$(eval $(call mifconvwrapper,BITMAP)) |
|
75 |
else |
|
76 |
$(eval $(call mifconvwrapper,CLEAN)) |
|
0
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
77 |
endif |
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
78 |
|
37 | 79 |
else |
80 |
# this is an additional platform so append to the list |
|
0
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
81 |
|
37 | 82 |
$(TARGET_PLATFORMS)+=$(PLATFORM) $(CFG) |
0
f453ebb75370
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
|
37 | 84 |
endif # TARGET_PLATFORMS |