summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-11-26 09:09:07 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-11-29 17:43:40 +0000
commit52a6734881b65b4695654e5d6f1c50d632f4fbba (patch)
tree08a109c756dbc8eae868dbaf5b29809d3c667aa6
parente41dac1a8e5186972f892a91cef396a02247faaa (diff)
downloadpoky-52a6734881b65b4695654e5d6f1c50d632f4fbba.tar.gz
python: move make override variables to EXTRA_OEMAKE
Instead of passing the same five variables to oe_runmake repeatedly, add them to EXTRA_OEMAKE once. (From OE-Core rev: c4ae09134732e4e95f17d6e572756bec49a9e3d0) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/python/python_2.7.17.bb31
1 files changed, 10 insertions, 21 deletions
diff --git a/meta/recipes-devtools/python/python_2.7.17.bb b/meta/recipes-devtools/python/python_2.7.17.bb
index 6199a5da76..ef5d564481 100644
--- a/meta/recipes-devtools/python/python_2.7.17.bb
+++ b/meta/recipes-devtools/python/python_2.7.17.bb
@@ -45,7 +45,13 @@ PACKAGECONFIG[bdb] = ",,db"
45PACKAGECONFIG[tk] = ",,tk" 45PACKAGECONFIG[tk] = ",,tk"
46 46
47# pgen isn't needed in the current build, but use the binary from python-native just in case. 47# pgen isn't needed in the current build, but use the binary from python-native just in case.
48EXTRA_OEMAKE = "PGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen" 48EXTRA_OEMAKE = "PGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
49 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
50 CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
51 STAGING_LIBDIR=${STAGING_LIBDIR} \
52 STAGING_INCDIR=${STAGING_INCDIR} \
53 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
54 "
49 55
50do_configure_append() { 56do_configure_append() {
51 rm -f ${S}/Makefile.orig 57 rm -f ${S}/Makefile.orig
@@ -85,12 +91,7 @@ do_compile() {
85 export CROSS_COMPILE="${TARGET_PREFIX}" 91 export CROSS_COMPILE="${TARGET_PREFIX}"
86 export PYTHONBUILDDIR="${B}" 92 export PYTHONBUILDDIR="${B}"
87 93
88 oe_runmake \ 94 oe_runmake OPT="${CFLAGS}"
89 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
90 STAGING_LIBDIR=${STAGING_LIBDIR} \
91 STAGING_INCDIR=${STAGING_INCDIR} \
92 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
93 OPT="${CFLAGS}"
94} 95}
95 96
96do_install() { 97do_install() {
@@ -103,21 +104,9 @@ do_install() {
103 104
104 # After swizzling the makefile, we need to run the build again. 105 # After swizzling the makefile, we need to run the build again.
105 # install can race with the build so we have to run this first, then install 106 # install can race with the build so we have to run this first, then install
106 oe_runmake \ 107 oe_runmake DESTDIR=${D} LIBDIR=${libdir}
107 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
108 CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
109 STAGING_LIBDIR=${STAGING_LIBDIR} \
110 STAGING_INCDIR=${STAGING_INCDIR} \
111 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
112 DESTDIR=${D} LIBDIR=${libdir}
113 108
114 oe_runmake \ 109 oe_runmake DESTDIR=${D} LIBDIR=${libdir} install
115 HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
116 CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
117 STAGING_LIBDIR=${STAGING_LIBDIR} \
118 STAGING_INCDIR=${STAGING_INCDIR} \
119 STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
120 DESTDIR=${D} LIBDIR=${libdir} install
121 110
122 install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile 111 install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
123 112