1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
|
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: src/usr/targeting/xmltohb/makefile $
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2011,2017
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
################################################################################
#
# @file targeting/xmltohb/makefile
#
# @brief Makefile for building Hostboot's xmltohb dir
#
################################################################################
ROOTPATH = ../../../..
# Point to the common targeting makefile for xmltohb
COMMON_XMLTOHB_DIR = xmltohb
COMMON_TARGETING_PATH_PREFIX = ../common
COMMON_TARGETING_REL_PATH = \
${COMMON_TARGETING_PATH_PREFIX}/${COMMON_XMLTOHB_DIR}
COMMON_TARGETING_MAKEFILE = \
${COMMON_TARGETING_REL_PATH}/common.mk
# Include the common targeting makefile for xmltohb verbatim
include ${COMMON_TARGETING_MAKEFILE}
VPATH = ${COMMON_TARGETING_REL_PATH}
FAPI_ATTR_SOURCE_DIR = ${ROOTPATH}/src/usr/hwpf/hwp
FAPI2_ATTR_XML_DIR = ${ROOTPATH}/src/import/hwpf/fapi2/xml/attribute_info
HB_TEMP_DFLT_SOURCES = $(wildcard \
${FAPI2_ATTR_XML_DIR}/${HB_TEMP_DEFAULTS_XML})
FAPI2_INCLUDE_PATH = \
${ROOTPATH}/src/include/usr/fapi2
FAPIATTRSRVC_SOURCE = \
${FAPI2_INCLUDE_PATH}/${ATTRIBUTE_SERVICE_H}
# Attribute XML files.
FAPI2_ATTR_XML += $(wildcard $(ROOTPATH)/src/import/chips/p9/procedures/xml/attribute_info/*)
FAPI2_ATTR_XML += $(wildcard $(ROOTPATH)/src/import/hwpf/fapi2/xml/attribute_info/*)
FAPI2_ATTR_XML += $(wildcard $(ROOTPATH)/src/import/chips/centaur/procedures/xml/attribute_info/*)
# Filter out Temp defaults XML file from Attribute XML files.
# NOTE: The hb_temp_defaults.xml file is not a normal attribute file with the
# normal structures that define the attribute itself. It temporarily
# provides default values for new attributes defined in other files.
FAPI2_ATTR_XML := $(filter-out $(ROOTPATH)/src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml,$(FAPI2_ATTR_XML))
FAPI2_ATTR_XML := $(filter-out $(wildcard $(ROOTPATH)/src/import/hwpf/fapi2/xml/attribute_info/*~) ,$(FAPI2_ATTR_XML))
FAPI2_ATTR_XML := $(filter-out $(wildcard $(ROOTPATH)/src/import/chips/p9/procedures/xml/attribute_info/*~),$(FAPI2_ATTR_XML))
FAPI2_ATTR_XML := $(filter-out $(wildcard $(ROOTPATH)/src/import/chips/centaur/procedures/xml/attribute_info/*~),$(FAPI2_ATTR_XML))
XMLTOHB_FAPIATTR_SOURCES += ${FAPI2_ATTR_XML}
# Manually generated sources
# Common
XMLTOHB_COMMON_ATTRIBUTE_TYPES = attribute_types.xml
XMLTOHB_COMMON_TARGET_TYPES = target_types.xml
# HB only
XMLTOHB_HB_ATTRIBUTE_TYPES = attribute_types_hb.xml
XMLTOHB_HB_TARGET_TYPES = target_types_hb.xml
# OP PowerVM only
XMLTOHB_OPPOWERVM_ATTRIBUTE_TYPES = attribute_types_oppowervm.xml
XMLTOHB_OPPOWERVM_TARGET_TYPES = target_types_oppowervm.xml
# Empty Targeting XML - Needed to generate XMLTOHB_CONFIG_ATTRIBUTE_SOURCES
XMLTOHB_EMPTY_TARGET_TYPES = target_types_empty.xml
# OP only
XMLTOHB_OPENPOWER_ATTRIBUTE_TYPES = attribute_types_openpower.xml
XMLTOHB_OPENPOWER_TARGET_TYPES = target_types_openpower.xml
# Auto generated sources
# EKB
# Common generated from EKB xml
XMLTOHB_EKB_ATTRIBUTE_TYPES = attribute_types_ekb.xml
XMLTOHB_EKB_TARGET_TYPES = target_types_ekb.xml
# Config Sources
# Contains all sources in configuration
XMLTOHB_CONFIG_ATTRIBUTE_TYPES = attribute_types_config.xml
XMLTOHB_CONFIG_TARGET_TYPES = target_types_config.xml
# SP Sources
# Contains xml that will be exported to SP
XMLTOHB_SP_ATTRIBUTE_TYPES = attribute_types_sp.xml
XMLTOHB_SP_TARGET_TYPES = target_types_sp.xml
# SRC
# a_src = a + a_hb + a_xxx
# t_src = t + merge_extension(t_hb + t_xxx)
XMLTOHB_SRC_ATTRIBUTE_TYPES = attribute_types_src.xml
XMLTOHB_SRC_TARGET_TYPES = target_types_src.xml
# HBX
# a_hbx = a_ekb + a_xxx
# t_hbx = merge_extension(t_ekb + t_xxx)
#XMLTOHB_HBX_ATTRIBUTE_TYPES = attribute_types_hbx.xml
#XMLTOHB_HBX_TARGET_TYPES = target_types_hbx.xml
# FULL
# a_full = a_src + a_ekb
# t_full = t_src + t_ekb
XMLTOHB_FULL_ATTRIBUTE_TYPES = attribute_types_full.xml
XMLTOHB_FULL_TARGET_TYPES = target_types_full.xml
# attribute_customization
# hb_temp_defaults.xml + hb_customized_attrs.xml
XMLTOHB_ATTRIBUTE_CUSTOMIZATION = attribute_customization.xml
#Note that order matters here , we want hb_customized_attrs to be first so it's defaults get picked up first
#if there are duplicates
XMLTOHB_ATTRIBUTE_CUSTOMIZATION_SOURCES += ${COMMON_TARGETING_REL_PATH}/${HB_CUSTOMIZED_ATTRS_XML}
XMLTOHB_ATTRIBUTE_CUSTOMIZATION_SOURCES += ${ROOTPATH}/src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml
# SRC attribute sources
XMLTOHB_SRC_ATTRIBUTE_SOURCES += ${COMMON_TARGETING_REL_PATH}/${XMLTOHB_COMMON_ATTRIBUTE_TYPES}
XMLTOHB_SRC_ATTRIBUTE_SOURCES += ${COMMON_TARGETING_REL_PATH}/${XMLTOHB_HB_ATTRIBUTE_TYPES}
XMLTOHB_SRC_ATTRIBUTE_SOURCES += $(if $(CONFIG_INCLUDE_XML_OPPOWERVM),${XMLTOHB_OPPOWERVM_ATTRIBUTE_TYPES})
XMLTOHB_SRC_ATTRIBUTE_SOURCES += $(if $(CONFIG_INCLUDE_XML_OPENPOWER),${XMLTOHB_OPENPOWER_ATTRIBUTE_TYPES})
# Config Sources
XMLTOHB_CONFIG_ATTRIBUTE_SOURCES += ${COMMON_TARGETING_REL_PATH}/${XMLTOHB_COMMON_ATTRIBUTE_TYPES}
XMLTOHB_CONFIG_ATTRIBUTE_SOURCES += $(if $(CONFIG_INCLUDE_XML_OPPOWERVM),${XMLTOHB_OPPOWERVM_ATTRIBUTE_TYPES})
XMLTOHB_CONFIG_ATTRIBUTE_SOURCES += $(if $(CONFIG_INCLUDE_XML_OPENPOWER),${XMLTOHB_OPENPOWER_ATTRIBUTE_TYPES})
# The customize target file combines all targetTypeExtension files before
# combining them with the common target_types.xml file. To include a new file,
# just add it to the XMLTOHB_*_EXT_TARGET_SOURCES.
XMLTOHB_SRC_CUSTOMIZE_TARGET_SOURCES = target_types_customize_src.xml
XMLTOHB_CONFIG_CUSTOMIZE_TARGET_SOURCES = target_types.customize_config.xml
XMLTOHB_SRC_EXT_TARGET_SOURCES += ${COMMON_TARGETING_REL_PATH}/${XMLTOHB_HB_TARGET_TYPES}
XMLTOHB_SRC_EXT_TARGET_SOURCES += $(if $(CONFIG_INCLUDE_XML_OPPOWERVM),${XMLTOHB_OPPOWERVM_TARGET_TYPES})
XMLTOHB_SRC_EXT_TARGET_SOURCES += $(if $(CONFIG_INCLUDE_XML_OPENPOWER),${XMLTOHB_OPENPOWER_TARGET_TYPES})
XMLTOHB_CONFIG_EXT_TARGET_SOURCES += ${COMMON_TARGETING_REL_PATH}/${XMLTOHB_EMPTY_TARGET_TYPES}
XMLTOHB_CONFIG_EXT_TARGET_SOURCES += $(if $(CONFIG_INCLUDE_XML_OPPOWERVM),${XMLTOHB_OPPOWERVM_TARGET_TYPES})
XMLTOHB_CONFIG_EXT_TARGET_SOURCES += $(if $(CONFIG_INCLUDE_XML_OPENPOWER),${XMLTOHB_OPENPOWER_TARGET_TYPES})
#Define XMLTOHB_GENERIC_SOURCES
XMLTOHB_GENERIC_SOURCES += ${GENDIR}/${XMLTOHB_FULL_ATTRIBUTE_TYPES}
XMLTOHB_GENERIC_SOURCES += ${GENDIR}/${XMLTOHB_FULL_TARGET_TYPES}
TEMP_DEFAULT_SOURCES = tempdefaults.xml
#XML target types merge script
XMLTOHB_TARGET_MERGE_SCRIPT = updatetargetxml.pl
#XML temp defaults merge script
XMLTOHB_TEMPS_MERGE_SCRIPT = updatetempsxml.pl
VMM_CONSTS_FILE = \
${ROOTPATH}/src/include/usr/vmmconst.h
GENFILES = ${XMLTOHB_TARGETS}
XMLTOHB_SYSTEM_BINARIES += simics_NIMBUS_targeting.bin.protected
XMLTOHB_SYSTEM_BINARIES += simics_NIMBUS_targeting.bin.unprotected
XMLTOHB_SYSTEM_BINARIES += simics_CUMULUS_targeting.bin.protected
XMLTOHB_SYSTEM_BINARIES += simics_CUMULUS_targeting.bin.unprotected
#debug :
# @echo COMMON_TARGETING_PATH_PREFIX = ${COMMON_TARGETING_PATH_PREFIX}
# @echo COMMON_TARGETING_REL_PATH = ${COMMON_TARGETING_REL_PATH}
# @echo COMMON_TARGETING_MAKEFILE = ${COMMON_TARGETING_MAKEFILE}
# @echo XMLTOHB_HEADER_TARGETS = ${XMLTOHB_HEADER_TARGETS}
# @echo XMLTOHB_SOURCE_TARGETS = ${XMLTOHB_SOURCE_TARGETS}
# @echo XMLTOHB_SYSTEM_BINARIES = ${XMLTOHB_SYSTEM_BINARIES}
# @echo XMLTOHB_TARGETS = ${XMLTOHB_TARGETS}
# @echo XMLTOHB_GENERIC_SOURCES = ${XMLTOHB_GENERIC_SOURCES}
# @echo FAPI_ATTR_SOURCE_DIR = ${FAPI_ATTR_SOURCE_DIR}
# @echo FAPI_ATTR_SOURCES = ${FAPI_ATTR_SOURCES}
# @echo XMLTOHB_FAPIATTR_SOURCES = ${XMLTOHB_FAPIATTR_SOURCES}
# @echo HB_TEMP_DFLT_SOURCES = ${HB_TEMP_DFLT_SOURCES}
# @echo XMLTOHB_COMMON_ATTRIBUTE_TYPES = ${XMLTOHB_COMMON_ATTRIBUTE_TYPES}
# @echo XMLTOHB_COMMON_TARGET_TYPES = ${COMMON_TARGETING_REL_PATH}/${XMLTOHB_COMMON_TARGET_TYPES}
# @echo TEMP_DEFAULT_SOURCES = ${TEMP_DEFAULT_SOURCES}
# @echo XMLTOHB_HB_ATTRIBUTE_TYPES = ${XMLTOHB_HB_ATTRIBUTE_TYPES}
# @echo XMLTOHB_HB_TARGET_TYPES = ${XMLTOHB_HB_TARGET_TYPES}
# @echo XMLTOHB_SRC_TARGET_TYPES = ${XMLTOHB_SRC_TARGET_TYPES}
# @echo TEMP_GENERIC_XML = ${TEMP_GENERIC_XML}
# @echo VPATH = ${VPATH}
EXTRA_PARTS = $(addprefix $(IMGDIR)/, $(XMLTOHB_SYSTEM_BINARIES))
CLEAN_TARGETS += $(addprefix $(GENDIR)/, ${XMLTOHB_SYSTEM_BINARIES})
CLEAN_TARGETS += $(addprefix $(GENDIR)/, ${XMLTOHB_SYSTEM_BINARIES:.bin=.xml})
CLEAN_TARGETS += ${GENDIR}/${HB_PLAT_ATTR_SRVC_H}
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_GENERIC_XML}
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_FAPI_XML}
CLEAN_TARGETS += ${GENDIR}/errl/errludattribute.H
CLEAN_TARGETS += ${GENDIR}/errl/errludtarget.H
CLEAN_TARGETS += ${GENDIR}/targAttrInfo.csv
CLEAN_TARGETS += ${GENDIR}/targAttrOverrideData.H
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_SRC_TARGET_TYPES}
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_SRC_ATTRIBUTE_TYPES}
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_CONFIG_ATTRIBUTE_TYPES}
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_CONFIG_TARGET_TYPES}
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_SRC_CUSTOMIZE_TARGET_SOURCES}
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_CONFIG_CUSTOMIZE_TARGET_SOURCES}
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_SP_ATTRIBUTE_TYPES}
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_SP_TARGET_TYPES}
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_EKB_ATTRIBUTE_TYPES}
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_EKB_TARGET_TYPES}
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_FULL_ATTRIBUTE_TYPES}
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_FULL_TARGET_TYPES}
CLEAN_TARGETS += ${GENDIR}/${XMLTOHB_ATTRIBUTE_CUSTOMIZATION}
GENDIR_ERRL = $(ROOTPATH)/obj/genfiles/errl
XMLTOHB_RAN_INDICATION = $(GENDIR)/.called_xmltohb_compiler
CLEAN_TARGETS += $(XMLTOHB_RAN_INDICATION)
COPYHDR_RAN_INDICATION = $(GENDIR)/.called_copy_attrsrvhdr
CLEAN_TARGETS += $(COPYHDR_RAN_INDICATION)
GEN_PASS_BODY += ${GENDIR}/${XMLTOHB_CONFIG_ATTRIBUTE_TYPES}
GEN_PASS_BODY += ${GENDIR}/${XMLTOHB_CONFIG_TARGET_TYPES}
GEN_PASS_BODY += ${GENDIR}/${XMLTOHB_SP_ATTRIBUTE_TYPES}
GEN_PASS_BODY += ${GENDIR}/${XMLTOHB_SP_TARGET_TYPES}
include ${ROOTPATH}/config.mk
# Delete any generated file on error
# # .DELETE_ON_ERROR:
${EXTRA_PARTS}: ${IMGDIR}/% : ${GENDIR}/%
cp -f $^ $@
# create merged config attribute xml
${GENDIR}/${XMLTOHB_CONFIG_ATTRIBUTE_TYPES}: \
${XMLTOHB_MERGE_SCRIPT} ${XMLTOHB_CONFIG_ATTRIBUTE_SOURCES}
$< $(wordlist 2,$(words $^),$^) > $@
# create merged src attribute xml
${GENDIR}/${XMLTOHB_SRC_ATTRIBUTE_TYPES}: \
${XMLTOHB_MERGE_SCRIPT} ${XMLTOHB_SRC_ATTRIBUTE_SOURCES}
$< $(wordlist 2,$(words $^),$^) > $@
# create merged src target xml
${GENDIR}/${XMLTOHB_SRC_CUSTOMIZE_TARGET_SOURCES}: \
${XMLTOHB_MERGE_SCRIPT} ${XMLTOHB_SRC_EXT_TARGET_SOURCES}
$< $(wordlist 2,$(words $^),$^) > $@
# TODO RTC: 178228 Review usage of XMLTOHB_TARGET_MERGE_SCRIPT in this makefile
${GENDIR}/${XMLTOHB_SRC_TARGET_TYPES}: \
${XMLTOHB_TARGET_MERGE_SCRIPT} ${COMMON_TARGETING_REL_PATH}/${XMLTOHB_COMMON_TARGET_TYPES} \
${GENDIR}/${XMLTOHB_SRC_CUSTOMIZE_TARGET_SOURCES}
./${XMLTOHB_TARGET_MERGE_SCRIPT} $(addprefix --hb=,${GENDIR}/${XMLTOHB_SRC_CUSTOMIZE_TARGET_SOURCES}) \
$(addprefix --common=,${COMMON_TARGETING_REL_PATH}/${XMLTOHB_COMMON_TARGET_TYPES}) > $@
# create merged config target xml
${GENDIR}/${XMLTOHB_CONFIG_CUSTOMIZE_TARGET_SOURCES}: \
${XMLTOHB_MERGE_SCRIPT} ${XMLTOHB_CONFIG_EXT_TARGET_SOURCES}
$< $(wordlist 2,$(words $^),$^) > $@
# TODO RTC: 178228 Review usage of XMLTOHB_TARGET_MERGE_SCRIPT in this makefile
${GENDIR}/${XMLTOHB_CONFIG_TARGET_TYPES}: \
${XMLTOHB_TARGET_MERGE_SCRIPT} ${COMMON_TARGETING_REL_PATH}/${XMLTOHB_COMMON_TARGET_TYPES} \
${GENDIR}/${XMLTOHB_CONFIG_CUSTOMIZE_TARGET_SOURCES}
./${XMLTOHB_TARGET_MERGE_SCRIPT} $(addprefix --hb=,${GENDIR}/${XMLTOHB_CONFIG_CUSTOMIZE_TARGET_SOURCES}) \
$(addprefix --common=,${COMMON_TARGETING_REL_PATH}/${XMLTOHB_COMMON_TARGET_TYPES}) > $@
# TODO RTC: 178228 Review usage of XMLTOHB_TARGET_MERGE_SCRIPT in this makefile
# create merged full target xml
${GENDIR}/${XMLTOHB_FULL_TARGET_TYPES}: \
${XMLTOHB_TARGET_MERGE_SCRIPT} ${GENDIR}/${XMLTOHB_EKB_TARGET_TYPES} \
${GENDIR}/${XMLTOHB_SRC_TARGET_TYPES} ${GENDIR}/${XMLTOHB_SRC_ATTRIBUTE_TYPES} \
${GENDIR}/${XMLTOHB_EKB_TARGET_TYPES} ${GENDIR}/${XMLTOHB_FULL_ATTRIBUTE_TYPES}
./${XMLTOHB_TARGET_MERGE_SCRIPT} $(addprefix --hb=,${GENDIR}/${XMLTOHB_EKB_TARGET_TYPES}) \
$(addprefix --common=,${GENDIR}/${XMLTOHB_SRC_TARGET_TYPES}) > $@
${COMMON_TARGETING_REL_PATH}/${XMLTOHB_SWAP_MAPPED_ATTR_SCRIPT} \
$(addprefix --srcTargetXml=,${GENDIR}/${XMLTOHB_SRC_TARGET_TYPES}) \
$(addprefix --ekbTargetXml=,${GENDIR}/${XMLTOHB_EKB_TARGET_TYPES}) \
$(addprefix --fullAttrXml=,${GENDIR}/${XMLTOHB_FULL_ATTRIBUTE_TYPES}) \
$(addprefix --fullTargetXml=,${GENDIR}/${XMLTOHB_FULL_TARGET_TYPES}) \
$(addprefix --fapi2Header=,${ROOTPATH}/src/include/usr/fapi2/attribute_service.H)
echo '<attributes>' | cat - ${GENDIR}/${XMLTOHB_FULL_TARGET_TYPES} > tempFull && mv tempFull ${GENDIR}/${XMLTOHB_FULL_TARGET_TYPES}
echo '</attributes>' | cat ${GENDIR}/${XMLTOHB_FULL_TARGET_TYPES} - > tempFull && mv tempFull ${GENDIR}/${XMLTOHB_FULL_TARGET_TYPES}
# TODO RTC: 178228 Review usage of XMLTOHB_TARGET_MERGE_SCRIPT in this makefile
# create merged sp target xml
${GENDIR}/${XMLTOHB_SP_TARGET_TYPES}: \
${XMLTOHB_TARGET_MERGE_SCRIPT} ${GENDIR}/${XMLTOHB_EKB_TARGET_TYPES} \
${GENDIR}/${XMLTOHB_CONFIG_TARGET_TYPES} ${GENDIR}/${XMLTOHB_CONFIG_ATTRIBUTE_TYPES} \
${GENDIR}/${XMLTOHB_EKB_TARGET_TYPES} ${GENDIR}/${XMLTOHB_SP_ATTRIBUTE_TYPES}
./${XMLTOHB_TARGET_MERGE_SCRIPT} $(addprefix --hb=,${GENDIR}/${XMLTOHB_EKB_TARGET_TYPES}) \
$(addprefix --common=,${GENDIR}/${XMLTOHB_CONFIG_TARGET_TYPES}) > $@
${COMMON_TARGETING_REL_PATH}/${XMLTOHB_SWAP_MAPPED_ATTR_SCRIPT} \
$(addprefix --srcTargetXml=,${GENDIR}/${XMLTOHB_CONFIG_TARGET_TYPES}) \
$(addprefix --ekbTargetXml=,${GENDIR}/${XMLTOHB_EKB_TARGET_TYPES}) \
$(addprefix --fullAttrXml=,${GENDIR}/${XMLTOHB_SP_ATTRIBUTE_TYPES}) \
$(addprefix --fullTargetXml=,${GENDIR}/${XMLTOHB_SP_TARGET_TYPES}) \
$(addprefix --fapi2Header=,${ROOTPATH}/src/include/usr/fapi2/attribute_service.H)
echo '<attributes>' | cat - ${GENDIR}/${XMLTOHB_SP_TARGET_TYPES} > tempSp && mv tempSp ${GENDIR}/${XMLTOHB_SP_TARGET_TYPES}
echo '</attributes>' | cat ${GENDIR}/${XMLTOHB_SP_TARGET_TYPES} - > tempSp && mv tempSp ${GENDIR}/${XMLTOHB_SP_TARGET_TYPES}
${COMMON_TARGETING_REL_PATH}/${XMLTOHB_REMOVE_HB_MAPPED_ATTR_SCRIPT} \
$(addprefix --spAttrXml=,${GENDIR}/${XMLTOHB_SP_ATTRIBUTE_TYPES}) \
$(addprefix --spTargXml=,${GENDIR}/${XMLTOHB_SP_TARGET_TYPES}) \
$(addprefix --hbAttrXml=,${COMMON_TARGETING_REL_PATH}/${XMLTOHB_HB_ATTRIBUTE_TYPES}) \
# merge all FAPI attribute files into one
${GENDIR}/${XMLTOHB_FAPI_XML}: ${XMLTOHB_MERGE_SCRIPT} \
${XMLTOHB_FAPIATTR_SOURCES}
$< $(wordlist 2,$(words $^),$^) > $@
# copy FAPI attribute service header file
$(call GENTARGET,$(XMLTOHB_TARGETS)) : $(COPYHDR_RAN_INDICATION)
$(COPYHDR_RAN_INDICATION): ${FAPIATTRSRVC_SOURCE}
cp ${FAPIATTRSRVC_SOURCE} ${GENDIR}/${HB_PLAT_ATTR_SRVC_H}
touch $(COPYHDR_RAN_INDICATION)
# merge all attribute customization srcs together
${GENDIR}/${XMLTOHB_ATTRIBUTE_CUSTOMIZATION}: ${XMLTOHB_MERGE_SCRIPT} \
${XMLTOHB_ATTRIBUTE_CUSTOMIZATION_SOURCES}
$< $(wordlist 2,$(words $^),$^) > $@
# convert FAPI attrs to HB attrs
${GENDIR}/${XMLTOHB_EKB_ATTRIBUTE_TYPES} \
${GENDIR}/${XMLTOHB_EKB_TARGET_TYPES}: \
${XMLTOHB_EKB_TARGATTR_SCRIPT} ${GENDIR}/${XMLTOHB_FAPI_XML} \
fapi_utils.pl ${GENDIR}/${XMLTOHB_ATTRIBUTE_CUSTOMIZATION}
${COMMON_TARGETING_REL_PATH}/${XMLTOHB_EKB_TARGATTR_SCRIPT} \
$(addprefix --fapi=,${GENDIR}/${XMLTOHB_FAPI_XML}) \
$(addprefix --attr=,${GENDIR}/${XMLTOHB_EKB_ATTRIBUTE_TYPES}) \
$(addprefix --targ=,${GENDIR}/${XMLTOHB_EKB_TARGET_TYPES}) \
$(addprefix --default=,${GENDIR}/${XMLTOHB_ATTRIBUTE_CUSTOMIZATION})\
# Add EKB attribute xml to src xml to produce the final output.
# Skip adding any attributes that already exists in the src xml
${GENDIR}/${XMLTOHB_FULL_ATTRIBUTE_TYPES}: \
${XMLTOHB_DUPLICATE_SCRIPT} ${GENDIR}/${XMLTOHB_EKB_ATTRIBUTE_TYPES} \
${GENDIR}/${XMLTOHB_SRC_ATTRIBUTE_TYPES}
${COMMON_TARGETING_REL_PATH}/${XMLTOHB_DUPLICATE_SCRIPT} \
$(addprefix --ekbXmlFile=,${GENDIR}/${XMLTOHB_EKB_ATTRIBUTE_TYPES}) \
$(addprefix --hbXmlFile=,${GENDIR}/${XMLTOHB_SRC_ATTRIBUTE_TYPES}) \
$(addprefix --fapi2Header=,${ROOTPATH}/src/include/usr/fapi2/attribute_service.H) \
$(addprefix --outFile=,${GENDIR}/${XMLTOHB_FULL_ATTRIBUTE_TYPES}) \
--verbose
# Add EKB attribute xml to config xml to produce the final output.
# Skip adding any attributes that already exists in the src xml
${GENDIR}/${XMLTOHB_SP_ATTRIBUTE_TYPES}: \
${XMLTOHB_DUPLICATE_SCRIPT} ${GENDIR}/${XMLTOHB_EKB_ATTRIBUTE_TYPES} \
${GENDIR}/${XMLTOHB_CONFIG_ATTRIBUTE_TYPES}
${COMMON_TARGETING_REL_PATH}/${XMLTOHB_DUPLICATE_SCRIPT} \
$(addprefix --ekbXmlFile=,${GENDIR}/${XMLTOHB_EKB_ATTRIBUTE_TYPES}) \
$(addprefix --hbXmlFile=,${GENDIR}/${XMLTOHB_CONFIG_ATTRIBUTE_TYPES}) \
$(addprefix --fapi2Header=,${ROOTPATH}/src/include/usr/fapi2/attribute_service.H) \
$(addprefix --outFile=,${GENDIR}/${XMLTOHB_SP_ATTRIBUTE_TYPES}) \
--verbose
# generic XML is created from the generic sources only
${GENDIR}/${XMLTOHB_GENERIC_XML}: \
${XMLTOHB_MERGE_SCRIPT} ${XMLTOHB_GENERIC_SOURCES}
$< $(wordlist 2,$(words $^),$^) > $@
# create the header files, only needs generic xml
$(call GENTARGET,$(XMLTOHB_TARGETS)) : $(XMLTOHB_RAN_INDICATION)
$(XMLTOHB_RAN_INDICATION): ${XMLTOHB_COMPILER_SCRIPT} \
${GENDIR}/${XMLTOHB_GENERIC_XML} ${GENDIR}/${XMLTOHB_FAPI_XML}
$< $(addprefix --hb-xml-file=,${GENDIR}/${XMLTOHB_GENERIC_XML}) \
$(addprefix --fapi-attributes-xml-file=,${GENDIR}/${XMLTOHB_FAPI_XML}) \
--src-output-dir=$(GENDIR) --img-output-dir=none \
--img-output-file=none
cp ${GENDIR_ERRL}/errludattribute.H ${GENDIR_PLUGINS}
cp ${GENDIR_ERRL}/errludtarget.H ${GENDIR_PLUGINS}
touch $(XMLTOHB_RAN_INDICATION)
# .PRECIOUS: ${GENDIR}/%.hb.xml
# system-specific XML needs the generic xml plus the xxx.system.xml file + the
# MRW file
${GENDIR}/%.hb.xml: %.system.xml ${GENDIR}/${XMLTOHB_GENERIC_XML} %.mrw.xml
${COMMON_TARGETING_REL_PATH}/${XMLTOHB_MERGE_SCRIPT} $^ > $@
# create the binary files
${GENDIR}/%_targeting.bin \
${GENDIR}/%_targeting.bin.protected \
${GENDIR}/%_targeting.bin.unprotected: \
${XMLTOHB_COMPILER_SCRIPT} ${GENDIR}/%.hb.xml \
${GENDIR}/${XMLTOHB_FAPI_XML} ${VMM_CONSTS_FILE}
$< $(addprefix --hb-xml-file=,${GENDIR}/$*.hb.xml) \
$(addprefix --fapi-attributes-xml-file=,${GENDIR}/${XMLTOHB_FAPI_XML}) \
--src-output-dir=none --img-output-dir=$(dir $@) \
--img-output-file=$*_targeting.bin \
--vmm-consts-file=$(VMM_CONSTS_FILE) --noshort-enums
|