summaryrefslogtreecommitdiff
path: root/docs/usermanual/reference/class_binconfig.xml
blob: 049f85e1f06b2a605e1d72eac5ee964c6ab40374 (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<section id="binconfig_class" xreflabel="binconfig class">
  <title>binconfig class</title>

  <para>The binconfig class is for packages that install
  <command>&lt;pkg&gt;-config</command> scripts that provide information about
  the build settings for the package. It is usually provided by libraries and
  then used by other packages to determine various compiler options.</para>

  <para>Since the script is used at build time it is required to be copied
  into the staging area. All the actions performed by the class are appended
  to the <emphasis>stage</emphasis> task.</para>

  <para>The actions performed by the binconfig class are:</para>

  <orderedlist>
    <listitem>
      <para>Copies the <command>&lt;x&gt;-config</command> script from the
      package into <command>${STAGING_BINDIR} </command>directory;</para>
    </listitem>

    <listitem>
      <para>If the package is not native then it modifies the contents of the
      <command>&lt;x&gt;-config</command> script in the staging area to ensure
      that all the paths in the script refer to the staging area;</para>
    </listitem>

    <listitem>
      <para>If the package is native then
      the<command>&lt;x&gt;-config</command> script is renamed to
      <command>&lt;x&gt;-config-native</command> to ensure that the native and
      non-native versions do not interfere with each other.</para>
    </listitem>
  </orderedlist>

  <para>A package is considered to be native if it also inherits the native
  class.</para>

  <para>The class will search in source directory, <command>${S}</command>,
  and all it's subdirectories, for files that end in
  <command>-config</command> and process them as described above. All that is
  required to use the class is the addition of binconfig in an inherit
  statement:</para>

  <para><screen>inherit autotools binconfig</screen></para>
</section>