3
|
1 |
# Copyright (c) 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 |
#
|
|
15 |
#
|
|
16 |
|
|
17 |
# Parameters:
|
|
18 |
# COMPONENT_PATHS
|
|
19 |
# CONFIGS
|
|
20 |
#
|
|
21 |
|
|
22 |
CREATABLEPATHS:=
|
|
23 |
CLEANTARGETS:=
|
|
24 |
|
|
25 |
.PHONY:: PP_EXPORTS
|
|
26 |
|
5
|
27 |
ifneq ($(filter win,$(HOSTPLATFORM)),)
|
|
28 |
SBS:=$(subst \,/,$(SBS_HOME)/bin/sbs.bat)
|
|
29 |
else
|
|
30 |
SBS:=$(SBS_HOME)/bin/sbs
|
|
31 |
endif
|
3
|
32 |
|
|
33 |
|
|
34 |
define doexports
|
|
35 |
PP_EXPORTS::
|
|
36 |
$(call startrule,makefile_generation_exports) \
|
9
|
37 |
$(SBS) --pp=slave --toolcheck=off --export-only $(component_list) $(config_list) -f- -m $(MAKEFILE_PATH).exports $(cli_options) \
|
3
|
38 |
$(call endrule,makefile_generation_exports)
|
|
39 |
|
5
|
40 |
CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH).exports
|
3
|
41 |
endef
|
|
42 |
|
|
43 |
# Generate makefiles for particular bldinf
|
|
44 |
# $(1) = source target source target......
|
|
45 |
define generate_makefiles
|
|
46 |
|
|
47 |
ALL:: $(MAKEFILE_PATH)
|
|
48 |
|
|
49 |
$(MAKEFILE_PATH): $(COMPONENT_PATHS) | PP_EXPORTS
|
|
50 |
$(call startrule,makefile_generation) \
|
5
|
51 |
$(SBS) --pp=slave --toolcheck=off -n $(CLI_OPTIONS) $(component_list) $(config_list) -m $$@ -f- \
|
3
|
52 |
$(call endrule,makefile_generation)
|
|
53 |
|
|
54 |
CLEANTARGETS:=$$(CLEANTARGETS) $(MAKEFILE_PATH)
|
|
55 |
|
|
56 |
endef
|
|
57 |
|
|
58 |
# Create config list for commands
|
|
59 |
config_list:=$(addprefix -c ,$(CONFIGS))
|
|
60 |
component_list:=$(addprefix -b ,$(COMPONENT_PATHS))
|
5
|
61 |
$(info <debug>build.flm: configlist: $(config_list)</debug>)
|
3
|
62 |
|
|
63 |
$(eval $(doexports))
|
|
64 |
|
|
65 |
# Create the Makefiles
|
|
66 |
$(eval $(call generate_makefiles))
|
|
67 |
|
5
|
68 |
CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(MAKEFILE_PATH))
|
|
69 |
|
3
|
70 |
$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),))
|
|
71 |
$(call makepath,$(CREATABLEPATHS))
|
|
72 |
|