All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denys@ti.com>
To: <meta-arago@arago-project.org>
Subject: Re: [PATCH] meta-toolchain-arago: remove MULTIMACH_TARGET_SYS suffix from top level files
Date: Thu, 1 Nov 2012 15:35:00 -0400	[thread overview]
Message-ID: <20121101193500.GH22705@edge> (raw)
In-Reply-To: <1351798334-12904-1-git-send-email-denys@ti.com>

On Thu, Nov 01, 2012 at 03:32:14PM -0400, Denys Dmytriyenko wrote:
> Signed-off-by: Denys Dmytriyenko <denys@ti.com>

Well, I don't like this patch - to drop those suffixes, I need to duplicate 
two more general functions locally. Arguably, having own copy of "version" 
function is good - we can extend it. But there's no use for the "site-config" 
one. As an alternative, we can leave "site-config" one with the suffix, which 
is not very consistent, but bearable... Thoughts?

-- 
Denys


> ---
>  .../recipes-core/meta/meta-toolchain-arago.bb      | 40 +++++++++++++++++++---
>  1 file changed, 35 insertions(+), 5 deletions(-)
> 
> diff --git a/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb b/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb
> index 1e5d140..8c92b10 100644
> --- a/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb
> +++ b/meta-arago-extras/recipes-core/meta/meta-toolchain-arago.bb
> @@ -4,19 +4,19 @@ TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-${ARMPKGARCH}-${TARGET_OS}-sdk-${SDK_ARCH}"
>  
>  require recipes-core/meta/meta-toolchain.bb
>  
> -PR = "r2"
> +PR = "r3"
>  
>  SDKTARGETSYSROOT = "${SDKPATH}/${ARAGO_TARGET_SYS}"
>  
>  # This function creates an environment-setup-script for use in a deployable SDK
>  toolchain_create_sdk_env_script () {
>  	# Create environment setup script
> -	script=${SDK_OUTPUT}/${SDKPATH}/environment-setup-${MULTIMACH_TARGET_SYS}
> +	script=${SDK_OUTPUT}/${SDKPATH}/environment-setup
>  	rm -f $script
>  	touch $script
>  	echo 'SDK_PATH="${SDKPATHNATIVE}"' >> $script
> -	echo 'if [ -z "$ZSH_NAME" ] && [ "x$0" = "x./environment-setup-${MULTIMACH_TARGET_SYS}" ]; then' >> $script
> -	echo '    echo "Error: This script needs to be sourced. Please run as \". ./environment-setup-${MULTIMACH_TARGET_SYS}\""' >> $script
> +	echo 'if [ -z "$ZSH_NAME" ] && [ "x$0" = "x./environment-setup" ]; then' >> $script
> +	echo '    echo "Error: This script needs to be sourced. Please run as \". ./environment-setup\""' >> $script
>  	echo '    exit 1' >> $script
>  	echo 'else' >> $script
>  	echo '    if [ -n "$BASH_SOURCE" ]; then' >> $script
> @@ -31,7 +31,7 @@ toolchain_create_sdk_env_script () {
>  	echo 'export CPATH=$SDK_PATH/$TARGET_SYS/usr/include:$CPATH' >> $script
>  	echo 'export PKG_CONFIG_SYSROOT_DIR=$SDK_PATH/$TARGET_SYS' >> $script
>  	echo 'export PKG_CONFIG_PATH=$SDK_PATH/$TARGET_SYS${libdir}/pkgconfig' >> $script
> -	echo 'export CONFIG_SITE=$SDK_PATH/site-config-${MULTIMACH_TARGET_SYS}' >> $script
> +	echo 'export CONFIG_SITE=$SDK_PATH/site-config' >> $script
>  	echo -e 'export CC=\x24{TARGET_PREFIX}gcc' >> $script
>  	echo -e 'export CXX=\x24{TARGET_PREFIX}g++' >> $script
>  	echo -e 'export GDB=\x24{TARGET_PREFIX}gdb' >> $script
> @@ -46,3 +46,33 @@ toolchain_create_sdk_env_script () {
>  	echo 'export OECORE_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script
>  	echo 'export OECORE_SDK_VERSION="${SDK_VERSION}"' >> $script
>  }
> +
> +#This function create a site config file
> +toolchain_create_sdk_siteconfig () {
> +	local siteconfig=${SDK_OUTPUT}/${SDKPATH}/site-config
> +
> +	rm -f $siteconfig
> +	touch $siteconfig
> +
> +	for sitefile in ${TOOLCHAIN_CONFIGSITE_NOCACHE} ; do
> +		cat $sitefile >> $siteconfig
> +	done
> +
> +	#get cached site config
> +	for sitefile in ${TOOLCHAIN_NEED_CONFIGSITE_CACHE}; do
> +		if [ -r ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config ]; then
> +			cat ${TOOLCHAIN_CONFIGSITE_SYSROOTCACHE}/${sitefile}_config >> $siteconfig
> +		fi
> +	done
> +}
> +
> +#This function create a version information file
> +toolchain_create_sdk_version () {
> +	local versionfile=${SDK_OUTPUT}/${SDKPATH}/version
> +	rm -f $versionfile
> +	touch $versionfile
> +	echo 'Distro: ${DISTRO}' >> $versionfile
> +	echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
> +	echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
> +	echo 'Timestamp: ${DATETIME}' >> $versionfile
> +}
> -- 
> 1.7.12.4
> 


  reply	other threads:[~2012-11-01 19:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-01 19:32 [PATCH] meta-toolchain-arago: remove MULTIMACH_TARGET_SYS suffix from top level files Denys Dmytriyenko
2012-11-01 19:35 ` Denys Dmytriyenko [this message]
2012-11-02  2:30   ` Cooper Jr., Franklin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121101193500.GH22705@edge \
    --to=denys@ti.com \
    --cc=meta-arago@arago-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.