1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

sdk-manual: Edits to "Adding Makefile-Only Software"

Fixed some prose in various places.

(From yocto-docs rev: f368408a3764ad9248478383236261066772f0b6)

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Scott Rifenbark
2018-05-31 10:20:37 -07:00
committed by Richard Purdie
parent b598e35761
commit 85645c7dc2
+17 -17
View File
@@ -1202,8 +1202,8 @@
<title>Adding Makefile-Only Software</title> <title>Adding Makefile-Only Software</title>
<para> <para>
The use of <filename>make</filename> by itself is very common The use of Make by itself is very common in both proprietary
in both proprietary and open source software. and open-source software.
Unfortunately, Makefiles are often not written with Unfortunately, Makefiles are often not written with
cross-compilation in mind. cross-compilation in mind.
Thus, <filename>devtool add</filename> often cannot do very Thus, <filename>devtool add</filename> often cannot do very
@@ -1216,7 +1216,7 @@
<filename>gcc</filename> is the compiler for the build host <filename>gcc</filename> is the compiler for the build host
and the cross-compiler is named something similar to and the cross-compiler is named something similar to
<filename>arm-poky-linux-gnueabi-gcc</filename> and might <filename>arm-poky-linux-gnueabi-gcc</filename> and might
require some arguments (e.g. to point to the associated sysroot require arguments (e.g. to point to the associated sysroot
for the target machine). for the target machine).
</para> </para>
@@ -1231,18 +1231,17 @@
<filename>g++</filename>. <filename>g++</filename>.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
The environment in which <filename>make</filename> runs The environment in which Make runs is set up with
is set up with various standard variables for various standard variables for compilation (e.g.
compilation (e.g. <filename>CC</filename>, <filename>CC</filename>, <filename>CXX</filename>, and
<filename>CXX</filename>, and so forth) in a similar so forth) in a similar manner to the environment set
manner to the environment set up by the SDK's up by the SDK's environment setup script.
environment setup script.
One easy way to see these variables is to run the One easy way to see these variables is to run the
<filename>devtool build</filename> command on the <filename>devtool build</filename> command on the
recipe and then look in recipe and then look in
<filename>oe-logs/run.do_compile</filename>. <filename>oe-logs/run.do_compile</filename>.
Towards the top of this file you will see a list of Towards the top of this file, a list of environment
environment variables that are being set. variables exists that are being set.
You can take advantage of these variables within the You can take advantage of these variables within the
Makefile. Makefile.
</para></listitem> </para></listitem>
@@ -1250,7 +1249,7 @@
If the Makefile sets a default for a variable using "=", If the Makefile sets a default for a variable using "=",
that default overrides the value set in the environment, that default overrides the value set in the environment,
which is usually not desirable. which is usually not desirable.
In this situation, you can either patch the Makefile For this case, you can either patch the Makefile
so it sets the default using the "?=" operator, or so it sets the default using the "?=" operator, or
you can alternatively force the value on the you can alternatively force the value on the
<filename>make</filename> command line. <filename>make</filename> command line.
@@ -1275,16 +1274,17 @@
This is particularly true because those hardcoded paths This is particularly true because those hardcoded paths
often point to locations on the build host and thus often point to locations on the build host and thus
will either be read-only or will introduce will either be read-only or will introduce
contamination into the cross-compilation by virtue of contamination into the cross-compilation because they
being specific to the build host rather than the target. are specific to the build host rather than the target.
Patching the Makefile to use prefix variables or other Patching the Makefile to use prefix variables or other
path variables is usually the way to handle this. path variables is usually the way to handle this
situation.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>
Sometimes a Makefile runs target-specific commands such Sometimes a Makefile runs target-specific commands such
as <filename>ldconfig</filename>. as <filename>ldconfig</filename>.
For such cases, you might be able to simply apply For such cases, you might be able to apply patches that
patches that remove these commands from the Makefile. remove these commands from the Makefile.
</para></listitem> </para></listitem>
</itemizedlist> </itemizedlist>
</para> </para>