diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-09-16 23:09:44 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-09-17 22:24:36 +0100 |
commit | af85ce4b4e675feb5796f87137c86d70c2f15b9a (patch) | |
tree | f19dbb9bcf1eec671b26685458f7cc47ebb3721e /meta/classes | |
parent | 046ae6a38d829048663fe1afb1f67de1fbe2e3b5 (diff) | |
download | openembedded-core-af85ce4b4e675feb5796f87137c86d70c2f15b9a.tar.gz openembedded-core-af85ce4b4e675feb5796f87137c86d70c2f15b9a.tar.bz2 openembedded-core-af85ce4b4e675feb5796f87137c86d70c2f15b9a.tar.xz openembedded-core-af85ce4b4e675feb5796f87137c86d70c2f15b9a.zip |
Remove layout_* variables
Remove layout_* variables and replace them with variables specific to the
different classes. The layout variables were only useful for the native/cross
classes and caused more confusion than they solved. They didn't scale to the
sdk class. It now clear a small set of native/cross variables fulfil the needs.
This patch also changes native.bbclass to use "/" as the STAGING_DIR which makes
sense since we're installing binaries into the locations we're compiling them for.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/autotools.bbclass | 12 | ||||
-rw-r--r-- | meta/classes/base.bbclass | 4 | ||||
-rw-r--r-- | meta/classes/binconfig.bbclass | 8 | ||||
-rw-r--r-- | meta/classes/cross.bbclass | 25 | ||||
-rw-r--r-- | meta/classes/distutils.bbclass | 8 | ||||
-rw-r--r-- | meta/classes/native.bbclass | 35 | ||||
-rw-r--r-- | meta/classes/packaged-staging.bbclass | 16 | ||||
-rw-r--r-- | meta/classes/sdk.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/xlibs.bbclass | 4 |
9 files changed, 37 insertions, 77 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index d7fc37566..8aa035191 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass @@ -206,11 +206,11 @@ autotools_stage_all() { oe_runmake DESTDIR="${STAGE_TEMP}" install autotools_stage_dir ${STAGE_TEMP}/${includedir} ${STAGING_INCDIR} if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then - autotools_stage_dir ${STAGE_TEMP}/${bindir} ${STAGING_DIR_HOST}${layout_bindir} - autotools_stage_dir ${STAGE_TEMP}/${sbindir} ${STAGING_DIR_HOST}${layout_sbindir} - autotools_stage_dir ${STAGE_TEMP}/${base_bindir} ${STAGING_DIR_HOST}${layout_base_bindir} - autotools_stage_dir ${STAGE_TEMP}/${base_sbindir} ${STAGING_DIR_HOST}${layout_base_sbindir} - autotools_stage_dir ${STAGE_TEMP}/${libexecdir} ${STAGING_DIR_HOST}${layout_libexecdir} + autotools_stage_dir ${STAGE_TEMP}/${bindir} ${STAGING_DIR_HOST}${bindir} + autotools_stage_dir ${STAGE_TEMP}/${sbindir} ${STAGING_DIR_HOST}${sbindir} + autotools_stage_dir ${STAGE_TEMP}/${base_bindir} ${STAGING_DIR_HOST}${base_bindir} + autotools_stage_dir ${STAGE_TEMP}/${base_sbindir} ${STAGING_DIR_HOST}${base_sbindir} + autotools_stage_dir ${STAGE_TEMP}/${libexecdir} ${STAGING_DIR_HOST}${libexecdir} fi if [ -d ${STAGE_TEMP}/${libdir} ] then @@ -218,7 +218,7 @@ autotools_stage_all() { fi if [ -d ${STAGE_TEMP}/${base_libdir} ] then - autotools_stage_libdir ${STAGE_TEMP}/${base_libdir} ${STAGING_DIR_HOST}${layout_base_libdir} + autotools_stage_libdir ${STAGE_TEMP}/${base_libdir} ${STAGING_DIR_HOST}${base_libdir} fi rm -rf ${STAGE_TEMP}/${mandir} || true rm -rf ${STAGE_TEMP}/${infodir} || true diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 0733cddd9..0605c8a0e 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -926,8 +926,8 @@ base_do_stage () { : } -do_populate_staging[dirs] = "${STAGING_DIR_TARGET}/${layout_bindir} ${STAGING_DIR_TARGET}/${layout_libdir} \ - ${STAGING_DIR_TARGET}/${layout_includedir} \ +do_populate_staging[dirs] = "${STAGING_DIR_TARGET}/${bindir} ${STAGING_DIR_TARGET}/${libdir} \ + ${STAGING_DIR_TARGET}/${includedir} \ ${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \ ${STAGING_INCDIR_NATIVE} \ ${STAGING_DATADIR} \ diff --git a/meta/classes/binconfig.bbclass b/meta/classes/binconfig.bbclass index 50c66ae8d..9ebb54887 100644 --- a/meta/classes/binconfig.bbclass +++ b/meta/classes/binconfig.bbclass @@ -14,8 +14,8 @@ def get_binconfig_mangle(d): s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'" s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'" s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'" - s += " -e 's:OEPREFIX:${STAGING_DIR_HOST}${layout_prefix}:'" - s += " -e 's:OEEXECPREFIX:${STAGING_DIR_HOST}${layout_exec_prefix}:'" + s += " -e 's:OEPREFIX:${STAGING_DIR_HOST}${prefix}:'" + s += " -e 's:OEEXECPREFIX:${STAGING_DIR_HOST}${exec_prefix}:'" s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'" s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'" return s @@ -31,7 +31,7 @@ do_install_append() { -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ -e 's:${STAGING_INCDIR}:${includedir}:g;' \ -e 's:${STAGING_DATADIR}:${datadir}:' \ - -e 's:${STAGING_DIR_HOST}${layout_prefix}:${prefix}:' > ${D}${bindir}/`basename $config` + -e 's:${STAGING_DIR_HOST}${prefix}:${prefix}:' > ${D}${bindir}/`basename $config` done fi @@ -40,7 +40,7 @@ do_install_append() { -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ -e 's:${STAGING_INCDIR}:${includedir}:g;' \ -e 's:${STAGING_DATADIR}:${datadir}:' \ - -e 's:${STAGING_DIR_HOST}${layout_prefix}:${prefix}:' \ + -e 's:${STAGING_DIR_HOST}${prefix}:${prefix}:' \ $lafile done } diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass index 9dddca127..1eaee1434 100644 --- a/meta/classes/cross.bbclass +++ b/meta/classes/cross.bbclass @@ -26,34 +26,11 @@ LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE}" TOOLCHAIN_OPTIONS = "" # Overrides for paths - -# Path prefixes -base_prefix = "${exec_prefix}" prefix = "${CROSS_DIR}" +base_prefix = "${prefix}" exec_prefix = "${prefix}" - -# Base paths -base_bindir = "${base_prefix}/bin" base_sbindir = "${base_prefix}/bin" -base_libdir = "${base_prefix}/lib" - -# Architecture independent paths -datadir = "${prefix}/share" -sysconfdir = "${prefix}/etc" -sharedstatedir = "${prefix}/com" -localstatedir = "${prefix}/var" -infodir = "${datadir}/info" -mandir = "${datadir}/man" -docdir = "${datadir}/doc" -servicedir = "${prefix}/srv" - -# Architecture dependent paths -bindir = "${exec_prefix}/bin" sbindir = "${exec_prefix}/bin" -libexecdir = "${exec_prefix}/libexec" -libdir = "${exec_prefix}/lib" -includedir = "${exec_prefix}/include" -oldincludedir = "${exec_prefix}/include" do_stage () { oe_runmake install diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass index 2fcf0fd6c..0b9bdfe1a 100644 --- a/meta/classes/distutils.bbclass +++ b/meta/classes/distutils.bbclass @@ -2,7 +2,7 @@ inherit distutils-base DISTUTILS_BUILD_ARGS ?= "" DISTUTILS_STAGE_HEADERS_ARGS ?= "--install-dir=${STAGING_INCDIR}/${PYTHON_DIR}" -DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${layout_prefix} \ +DISTUTILS_STAGE_ALL_ARGS ?= "--prefix=${STAGING_DIR_HOST}${prefix} \ --install-data=${STAGING_DATADIR}" DISTUTILS_INSTALL_ARGS ?= "--prefix=${D}/${prefix} \ --install-data=${D}/${datadir}" @@ -16,7 +16,7 @@ distutils_do_compile() { } distutils_stage_headers() { - install -d ${STAGING_DIR_HOST}${layout_libdir}/${PYTHON_DIR}/site-packages + install -d ${STAGING_DIR_HOST}${libdir}/${PYTHON_DIR}/site-packages STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ @@ -25,10 +25,10 @@ distutils_stage_headers() { } distutils_stage_all() { - install -d ${STAGING_DIR_HOST}${layout_prefix}/${PYTHON_DIR}/site-packages + install -d ${STAGING_DIR_HOST}${prefix}/${PYTHON_DIR}/site-packages STAGING_INCDIR=${STAGING_INCDIR} \ STAGING_LIBDIR=${STAGING_LIBDIR} \ - PYTHONPATH=${STAGING_DIR_HOST}${layout_prefix}/${PYTHON_DIR}/site-packages \ + PYTHONPATH=${STAGING_DIR_HOST}${prefix}/${PYTHON_DIR}/site-packages \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ ${STAGING_BINDIR_NATIVE}/python setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \ oefatal "python setup.py install (stage) execution failed." diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass index de6b6fff4..5da766426 100644 --- a/meta/classes/native.bbclass +++ b/meta/classes/native.bbclass @@ -50,32 +50,15 @@ export RANLIB = "${HOST_PREFIX}ranlib" export STRIP = "${HOST_PREFIX}strip" # Path prefixes -export base_prefix = "${STAGING_DIR_NATIVE}" -export prefix = "${STAGING_DIR_NATIVE}${layout_prefix}" -export exec_prefix = "${STAGING_DIR_NATIVE}${layout_exec_prefix}" - -# Base paths -export base_bindir = "${STAGING_DIR_NATIVE}${layout_base_bindir}" -export base_sbindir = "${STAGING_DIR_NATIVE}${layout_base_sbindir}" -export base_libdir = "${STAGING_DIR_NATIVE}${layout_base_libdir}" - -# Architecture independent paths -export datadir = "${STAGING_DIR_NATIVE}${layout_datadir}" -export sysconfdir = "${STAGING_DIR_NATIVE}${layout_sysconfdir}" -export sharedstatedir = "${STAGING_DIR_NATIVE}${layout_sharedstatedir}" -export localstatedir = "${STAGING_DIR_NATIVE}${layout_localstatedir}" -export infodir = "${STAGING_DIR_NATIVE}${layout_infodir}" -export mandir = "${STAGING_DIR_NATIVE}${layout_mandir}" -export docdir = "${STAGING_DIR_NATIVE}${layout_docdir}" -export servicedir = "${STAGING_DIR_NATIVE}${layout_servicedir}" - -# Architecture dependent paths -export bindir = "${STAGING_DIR_NATIVE}${layout_bindir}" -export sbindir = "${STAGING_DIR_NATIVE}${layout_sbindir}" -export libexecdir = "${STAGING_DIR_NATIVE}${layout_libexecdir}" -export libdir = "${STAGING_DIR_NATIVE}${layout_libdir}" -export includedir = "${STAGING_DIR_NATIVE}${layout_includedir}" -export oldincludedir = "${STAGING_DIR_NATIVE}${layout_includedir}" +base_prefix = "${STAGING_DIR_NATIVE}" +prefix = "${STAGING_DIR_NATIVE}/usr" +exec_prefix = "${STAGING_DIR_NATIVE}/usr" + +# Since we actually install these into situ there is no staging prefix +STAGING_DIR_HOST = "" +STAGING_DIR_TARGET = "" +SHLIBSDIR = "${STAGING_DIR_NATIVE}/shlibs" +PKG_CONFIG_DIR = "${libdir}/pkgconfig" # # If changing this function, please make sure packaged-staging.bbclass is diff --git a/meta/classes/packaged-staging.bbclass b/meta/classes/packaged-staging.bbclass index 3dad4e8e0..68aad800a 100644 --- a/meta/classes/packaged-staging.bbclass +++ b/meta/classes/packaged-staging.bbclass @@ -174,11 +174,11 @@ staging_helper () { done echo "dest root /" >> $conffile fi - if [ ! -e ${TMPDIR}${layout_libdir}/opkg/info/ ]; then - mkdir -p ${TMPDIR}${layout_libdir}/opkg/info/ + if [ ! -e ${TMPDIR}${libdir}/opkg/info/ ]; then + mkdir -p ${TMPDIR}${libdir}/opkg/info/ fi - if [ ! -e ${TMPDIR}${layout_libdir}/ipkg/ ]; then - cd ${TMPDIR}${layout_libdir}/ + if [ ! -e ${TMPDIR}${libdir}/ipkg/ ]; then + cd ${TMPDIR}${libdir}/ ln -sf opkg/ ipkg || true fi } @@ -210,7 +210,7 @@ python packagestage_scenefunc () { # # Install the staging package somewhere temporarily so we can extract the stamp files # - bb.mkdirhier(bb.data.expand("${WORKDIR}/tstage/${layout_libdir}/opkg/info/ ", d)) + bb.mkdirhier(bb.data.expand("${WORKDIR}/tstage/${libdir}/opkg/info/ ", d)) cmd = bb.data.expand("${PSTAGE_PKGMANAGER} -f ${PSTAGE_MACHCONFIG} -force-depends -o ${WORKDIR}/tstage install", d) ret = os.system("PATH=\"%s\" %s %s" % (path, cmd, stagepkg)) if ret != 0: @@ -379,20 +379,20 @@ staging_packager () { staging_package_installer () { #${PSTAGE_INSTALL_CMD} ${PSTAGE_PKG} - STATUSFILE=${TMPDIR}${layout_libdir}/opkg/status + STATUSFILE=${TMPDIR}${libdir}/opkg/status echo "Package: ${PSTAGE_PKGPN}" >> $STATUSFILE echo "Version: ${PSTAGE_PKGVERSION}" >> $STATUSFILE echo "Status: install user installed" >> $STATUSFILE echo "Architecture: ${PSTAGE_PKGARCH}" >> $STATUSFILE echo "" >> $STATUSFILE - CTRLFILE=${TMPDIR}${layout_libdir}/opkg/info/${PSTAGE_PKGPN}.control + CTRLFILE=${TMPDIR}${libdir}/opkg/info/${PSTAGE_PKGPN}.control echo "Package: ${PSTAGE_PKGPN}" > $CTRLFILE echo "Version: ${PSTAGE_PKGVERSION}" >> $CTRLFILE echo "Architecture: ${PSTAGE_PKGARCH}" >> $CTRLFILE cd ${PSTAGE_TMPDIR_STAGE} - find -type f | grep -v ./CONTROL | sed -e 's/^\.//' > ${TMPDIR}${layout_libdir}/opkg/info/${PSTAGE_PKGPN}.list + find -type f | grep -v ./CONTROL | sed -e 's/^\.//' > ${TMPDIR}${libdir}/opkg/info/${PSTAGE_PKGPN}.list } staging_package_libtoolhack () { diff --git a/meta/classes/sdk.bbclass b/meta/classes/sdk.bbclass index a10933311..97fa8552c 100644 --- a/meta/classes/sdk.bbclass +++ b/meta/classes/sdk.bbclass @@ -59,7 +59,7 @@ FILES_${PN}-dbg += "${prefix}/.debug \ ${prefix}/bin/.debug \ " -export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig" +export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig" export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" python () { diff --git a/meta/classes/xlibs.bbclass b/meta/classes/xlibs.bbclass index ae8f928f1..fc52400b9 100644 --- a/meta/classes/xlibs.bbclass +++ b/meta/classes/xlibs.bbclass @@ -6,10 +6,10 @@ XLIBS_CVS = "${FREEDESKTOP_CVS}/xlibs" inherit autotools pkgconfig do_stage() { - oe_runmake install prefix=${STAGING_DIR_HOST}${layout_prefix} \ + oe_runmake install prefix=${STAGING_DIR_HOST}${prefix} \ bindir=${STAGING_BINDIR} \ includedir=${STAGING_INCDIR} \ libdir=${STAGING_LIBDIR} \ datadir=${STAGING_DATADIR} \ - mandir=${STAGING_DIR_HOST}${layout_mandir} + mandir=${STAGING_DIR_HOST}${mandir} } |