From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28266 invoked by alias); 10 Oct 2012 22:25:15 -0000 Received: (qmail 28257 invoked by uid 22791); 10 Oct 2012 22:25:14 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,URIBL_DBL_SPAM X-Spam-Check-By: sourceware.org Received: from smtp10.smtpout.orange.fr (HELO smtp.smtpout.orange.fr) (80.12.242.132) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 10 Oct 2012 22:25:03 +0000 Received: from treguer.localnet ([90.32.124.216]) by mwinf5d19 with ME id 9aR11k0084gEsci03aR1Sl; Thu, 11 Oct 2012 00:25:02 +0200 From: "Yann E. MORIN" To: crossgcc@sourceware.org Subject: Re: [PATCH 2 of 6] kernel/linux: Extract custom location function and use generic GetCustom Date: Wed, 10 Oct 2012 22:25:00 -0000 User-Agent: KMail/1.13.5 (Linux/3.6.1-treguer; KDE/4.4.5; x86_64; ; ) Cc: David Holsgrove , bryanhundven@gmail.com References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210110025.01188.yann.morin.1998@free.fr> X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2012-10/txt/msg00057.txt.bz2 David, Bryan, All, On Wednesday 10 October 2012 08:07:55 David Holsgrove wrote: > # HG changeset patch > # User David Holsgrove > # Date 1349847853 -36000 > # Node ID b6b1b07f7ab14184f457e907db6269057cdd6126 > # Parent 54e6f8f3b141d3502e51e35cdda8aded03b597f4 > kernel/linux: Extract custom location function and use generic GetCustom Nit-picking, but as you need to resend anyway with your SoB-line: kernel/linux: use generic custom infrastrcuture Config options remain the same as before, just generalised to be used by other components also. Signed-off-by: You. ;-) > diff -r 54e6f8f3b141 -r b6b1b07f7ab1 scripts/build/kernel/linux.sh > --- a/scripts/build/kernel/linux.sh Thu Oct 04 13:26:14 2012 +1000 > +++ b/scripts/build/kernel/linux.sh Wed Oct 10 15:44:13 2012 +1000 > @@ -29,23 +29,12 @@ [--SNIP--] > + CT_TestAndAbort "Custom linux: CT_CUSTOM_LOCATION_ROOT_DIR or CT_KERNEL_LINUX_CUSTOM_LOCATION must be set." \ > + -z "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" Can't we do this check only once in the generic CT_GetCustom function, instead or repeating it in every components? > + if [ -n "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" ]; then > + CT_KERNEL_LINUX_CUSTOM_LOCATION="${CT_CUSTOM_LOCATION_ROOT_DIR}/linux" > fi Ditto: can't we just pass the component's custom location string to CT_GetCustom; then in CT_GetCustom, if the string is empty, use the CT_CUSTOM_LOCATION_ROOT_DIR location, instead of repeating it everywher? Then, you'd just need this one line: > + CT_GetCustom "linux-${CT_KERNEL_VERSION}" "${CT_KERNEL_LINUX_CUSTOM_LOCATION}" ... which you be splitted as it is longer than 80 chars. Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' -- For unsubscribe information see http://sourceware.org/lists.html#faq