Symbian3/PDK/Source/GUID-C07B506E-A1C8-537C-A7BF-DD7F449DF8A5.dita
changeset 12 80ef3a206772
parent 11 5072524fcc79
child 13 48780e181b38
equal deleted inserted replaced
11:5072524fcc79 12:80ef3a206772
     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 xml:lang="en" id="GUID-C07B506E-A1C8-537C-A7BF-DD7F449DF8A5"><title>How to write an extension makefile template</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>A makefile can be defined as a collection of instructions (build steps) that are needed to build a program. <xref href="GUID-3100800B-B2F7-50EF-BD4C-3C345ECCB2A5.dita">The Symbian build process</xref> generates the required makefiles from project (<filepath>.mmp</filepath>) files, and these makefiles cater to all the usual build steps. There might be few build steps which are specific to your project, and are not catered for by the generated makefiles. These build steps are addressed by separate set of makefiles called extension makefiles. The need for extension makefiles purely depend on requirements of the project you are working with. </p> <p>Since Symbian OS v9.3 the functionality and data for extension makefiles are kept separate. That is, extension makefiles with similar functionality can be generalised into a template makefile, which contains only the basic functionality. The same template can be used for various use cases by passing appropriate parameters (data). The parameters can be passed using the <xref href="GUID-2910AB26-CA7C-50B9-A187-0C8406C1ED1F.dita">prj_extensions</xref> and <xref href="GUID-7FA5898D-8898-53CE-875E-1DE97BE02C81.dita">prj_testextensions</xref> call mechanism in the <filepath>bld.inf</filepath> file, which deprecates the old approach of referring to the extension makefiles using the <codeph>makefile</codeph> or <codeph>gnumakefile</codeph> directive. </p> <p>This template makefile approach reduces the number of makefiles, as the extension makefiles with similar functionality are generalized into a single template. </p> <p>The following provides an overview of designing an extension makefile template. Details of the syntax are given in the reference topic <xref href="GUID-7A52BD40-E1C1-5C67-AAA0-1B79A34CF24C.dita">Template extension makefiles</xref>. </p> <ol id="GUID-7F7E55AD-8FF3-5B15-86CD-42F0A2FA6849"><li id="GUID-B770DD49-E546-551E-BF7E-B99BBD3ED19C"><p>Define the input variables used by the template. The values for these variables are passed through a component's <filepath>bld.inf</filepath> file. If necessary, assign the default values for these variables in the corresponding meta file (see <xref href="GUID-E6CB4891-AFC8-50BB-A2C8-057DB1269DA9.dita">Meta files</xref>). </p> </li> <li id="GUID-55F18BBE-9F63-525C-B36F-975E9471DE97"><p>Specify the set of targets that the makefile should respond to. An extension makefile responds to a few mandatory targets, apart from the project-specific targets. For more information on mandatory targets, refer to <xref href="GUID-60B98AFE-6DE6-5086-B70C-F377562E60D9.dita">Extension makefile targets</xref>. </p> </li> <li id="GUID-6CC0F7AE-B273-5317-9C78-6F637A81A502"><p>Specify the build steps to create/update the target. These build steps can include basic shell operations, called through platform independent variables, such as <codeph>CP</codeph> to copy a file, and <codeph>RM</codeph> to delete a file. Other than calling these basic shell commands, the makefile can call other tools required to complete the build step, such as calling a Perl program. </p> </li> </ol> <p>For more information on the syntax of template extension makefiles and variables, refer to <xref href="GUID-7A52BD40-E1C1-5C67-AAA0-1B79A34CF24C.dita">Template extension makefiles</xref>. </p> </conbody></concept>