This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2 of 6] kernel/linux: Extract custom location function and use generic GetCustom


David, Bryan, All,

On Wednesday 10 October 2012 08:07:55 David Holsgrove wrote:
> # HG changeset patch
> # User David Holsgrove <david.holsgrove@xilinx.com>
> # 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]