|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-F8B8C030-B5E1-5EB3-A672-83BF35555801" xml:lang="en"><title>halcfg.pl |
|
13 Syntax</title><shortdesc><filepath>halcfg.pl</filepath> is a Perl script that is used by |
|
14 the build system to generate the C++ source files from the Config and Values |
|
15 files. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
16 <p> </p> |
|
17 <p>There are four modes in which the Perl script <codeph>halcfg.pl</codeph> can |
|
18 be used. </p> |
|
19 <ul> |
|
20 <li id="GUID-9EABDCC1-4C8A-5850-9631-0FC96CCC50F8"><codeblock id="GUID-4E07A1C2-DAD6-5603-BD1B-6FECE39B419D" xml:space="preserve">perl halcfg.pl hal_data.h values.hda values.cpp</codeblock> <p>takes the <filepath>values.hda</filepath> text file and generates a table |
|
21 of initial values for items stored by the HAL. </p> </li> |
|
22 <li id="GUID-04ABED61-2606-50DF-AD74-C80A12F0692F"><codeblock id="GUID-38B36C83-FCDF-597B-B73D-F6A2CE8CC3D9" xml:space="preserve">perl halcfg.pl -x hal_data.h config.hcf config.cpp</codeblock> <p>generates three tables: </p> <ul> |
|
23 <li id="GUID-054BE9E6-8582-527E-BEA3-FED29CD9DFD3"><p>the properties, i.e. |
|
24 whether valid and/or writable, for each item </p> </li> |
|
25 <li id="GUID-0D4A169F-4E5D-5569-9D77-CA45E94402D4"><p>the offset of each item |
|
26 within the <codeph>DllGlobal</codeph> block </p> </li> |
|
27 <li id="GUID-28AF093B-5D68-57CF-900B-206F29F67003"><p>the function implementing |
|
28 each item, for derived attributes (i.e. those attributes that are not simply |
|
29 stored by the HAL. </p> </li> |
|
30 </ul> </li> |
|
31 <li id="GUID-82EDD6DB-9256-560B-8400-39789B02504D"><codeblock id="GUID-495F247E-1ED9-533A-9780-8D328E3499D7" xml:space="preserve">perl halcfg.pl -s hal_data.h config.hcf source.cpp</codeblock> <p>generates a source file containing skeleton code for the implementation |
|
32 of the accessor function for each derived attribute </p> </li> |
|
33 <li id="GUID-33E34298-1367-5FBC-B582-37EB413345AF"><codeblock id="GUID-B291494F-3D32-5A32-A775-3425E4F1750A" xml:space="preserve">perl halcfg.pl -h hal_data.h config.hcf header.h</codeblock> <p>generates a header file containing prototypes for the accessor functions |
|
34 for each derived attribute </p> </li> |
|
35 </ul> |
|
36 <p>Note that the header file <filepath>hal_data.h</filepath> containing the |
|
37 attributes and values used by the HAL is passed on all calls to the Perl script. </p> |
|
38 </conbody></concept> |