author | david.stone@nokia.com |
Fri, 11 Dec 2009 11:25:51 +0000 | |
branch | wip |
changeset 69 | 9287c3bfa3eb |
parent 12 | 2cfea3290625 |
permissions | -rw-r--r-- |
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) \ |
|
11
ea23b18a2ff6
Initial implementation of noexport
tnmurphy@4GBL06592.nokia.com
parents:
7
diff
changeset
|
37 |
$(SBS) --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 |
||
11
ea23b18a2ff6
Initial implementation of noexport
tnmurphy@4GBL06592.nokia.com
parents:
7
diff
changeset
|
49 |
$(MAKEFILE_PATH): $(COMPONENT_PATHS) $(if $(DOEXPORT),| PP_EXPORTS ) |
3 | 50 |
$(call startrule,makefile_generation) \ |
11
ea23b18a2ff6
Initial implementation of noexport
tnmurphy@4GBL06592.nokia.com
parents:
7
diff
changeset
|
51 |
$(SBS) --noexport --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)) |
|
11
ea23b18a2ff6
Initial implementation of noexport
tnmurphy@4GBL06592.nokia.com
parents:
7
diff
changeset
|
61 |
|
ea23b18a2ff6
Initial implementation of noexport
tnmurphy@4GBL06592.nokia.com
parents:
7
diff
changeset
|
62 |
$(if $(FLMDEBUG),$(info <debug>build.flm: configlist: $(config_list)</debug>)) |
3 | 63 |
|
11
ea23b18a2ff6
Initial implementation of noexport
tnmurphy@4GBL06592.nokia.com
parents:
7
diff
changeset
|
64 |
# Do exports only if asked. This doesn't work brilliantly in emake |
ea23b18a2ff6
Initial implementation of noexport
tnmurphy@4GBL06592.nokia.com
parents:
7
diff
changeset
|
65 |
# since exports are often duplicated in some components - leads to conflicts |
ea23b18a2ff6
Initial implementation of noexport
tnmurphy@4GBL06592.nokia.com
parents:
7
diff
changeset
|
66 |
# and rebuilds. Better to export before trying to do parallel parsing at all. |
ea23b18a2ff6
Initial implementation of noexport
tnmurphy@4GBL06592.nokia.com
parents:
7
diff
changeset
|
67 |
$(if $(DOEXPORT),$(eval $(doexports)),$(if $(FLMDEBUG),$(info <debug>build.flm: Exports off </debug>))) |
3 | 68 |
|
69 |
# Create the Makefiles |
|
70 |
$(eval $(call generate_makefiles)) |
|
71 |
||
5 | 72 |
CREATABLEPATHS:=$(CREATABLEPATHS) $(dir $(MAKEFILE_PATH)) |
73 |
||
3 | 74 |
$(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS),$(CREATABLEPATHS),)) |
75 |
$(call makepath,$(CREATABLEPATHS)) |
|
76 |