3
|
1 |
# Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
# All rights reserved.
|
|
3 |
# This component and the accompanying materials are made available
|
|
4 |
# under the terms of the License "Eclipse Public License v1.0"
|
|
5 |
# which accompanies this distribution, and is available
|
|
6 |
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
#
|
|
8 |
# Initial Contributors:
|
|
9 |
# Nokia Corporation - initial contribution.
|
|
10 |
#
|
|
11 |
# Contributors:
|
|
12 |
#
|
|
13 |
# Description:
|
|
14 |
# Header file exporting Function Like Makefile (FLM)
|
|
15 |
# The file destinations relative to EPOCROOT
|
|
16 |
#
|
|
17 |
#
|
|
18 |
|
|
19 |
## Parameters that are expected:
|
|
20 |
# SOURCE
|
|
21 |
# HEADERONLY
|
|
22 |
# OUTPUTPATH
|
|
23 |
# EPOCROOT
|
|
24 |
# EXPORTPATH
|
|
25 |
|
|
26 |
## GLOBAL TARGETS ###############################################
|
|
27 |
.PHONY:: $(ALLTARGET)
|
|
28 |
$(ALLTARGET):: $(RELEASEABLES)
|
|
29 |
|
|
30 |
|
|
31 |
# StringTable FLM
|
|
32 |
|
|
33 |
|
|
34 |
EXPORT::
|
|
35 |
|
|
36 |
CLEANTARGETS:=
|
|
37 |
RELEASEEXPORTS:=
|
|
38 |
CREATABLEPATHS:=$(OUTPUTPATH) $(EXPORTPATH)
|
|
39 |
|
|
40 |
# Work out the names of the various output files before
|
|
41 |
# trying to use them in rules and dependencies. Cuts repetition
|
|
42 |
# and avoids mistakes.
|
|
43 |
EXPORTEDSTRINGTABLEHEADER:=$(EXPORTPATH)/$(TARGET).h
|
|
44 |
STRINGTABLECPP:=$(OUTPUTPATH)/$(TARGET).cpp
|
|
45 |
STRINGTABLEHEADER:=$(OUTPUTPATH)/$(TARGET).h
|
|
46 |
STRINGTABLEPHONYTARGET:=$(OUTPUTPATH)_$(TARGET)
|
|
47 |
TEMPSOURCE:=$(OUTPUTPATH)/$(TARGET).st
|
|
48 |
|
|
49 |
# Macro to generate string table targets and rules
|
|
50 |
# Always return true if the make engine doesn't support
|
|
51 |
# the .IGNORE:: target.
|
|
52 |
define exportstringtableheader
|
|
53 |
|
|
54 |
EXPORT:: $(EXPORTEDSTRINGTABLEHEADER)
|
|
55 |
|
|
56 |
$(EXPORTEDSTRINGTABLEHEADER): $(STRINGTABLEHEADER)
|
|
57 |
$(call startrule,exportstringtableheader,FORCESUCCESS) \
|
|
58 |
$(GNUCP) '$(STRINGTABLEHEADER)' '$$@' \
|
|
59 |
$(call endrule,exportstringtableheader)
|
|
60 |
|
|
61 |
RELEASEEXPORTS:=$(EXPORTEDSTRINGTABLEHEADER)
|
|
62 |
endef
|
|
63 |
|
|
64 |
define genstringtable
|
|
65 |
$(STRINGTABLECPP) : $(STRINGTABLEHEADER)
|
|
66 |
|
|
67 |
$(STRINGTABLEHEADER): $(SOURCE)
|
|
68 |
$(call startrule,stringtable,FORCESUCCESS) \
|
|
69 |
$(GNUCP) --no-preserve=mode $(SOURCE) $(TEMPSOURCE) && $(GNUCHMOD) a+w $(TEMPSOURCE) && \
|
|
70 |
$(STRINGTABLE) $(TEMPSOURCE) \
|
|
71 |
$(call endrule,stringtable)
|
|
72 |
|
|
73 |
CLEANTARGETS:=$(STRINGTABLEHEADER) $(STRINGTABLECPP)
|
|
74 |
|
|
75 |
endef
|
|
76 |
|
|
77 |
|
|
78 |
$(if $(EXPORTPATH),$(eval $(exportstringtableheader)),)
|
|
79 |
$(if $(EXPORTPATH),,$(eval EXPORT:: $(STRINGTABLEHEADER)))
|
|
80 |
$(eval $(genstringtable))
|
|
81 |
|
|
82 |
|
5
|
83 |
## Clean up and log releasables
|
|
84 |
$(call raptor_clean,$(CLEANTARGETS))
|
3
|
85 |
# make the output directories while reading makefile - some build engines prefer this
|
|
86 |
$(call makepath,$(CREATABLEPATHS))
|
5
|
87 |
$(call raptor_release,$(RELEASEEXPORTS),STRINGTABLE)
|
3
|
88 |
|