All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
To: Nathan Lynch <ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH user-cr] User can override SUBARCH for cross-compilation
Date: Mon, 01 Mar 2010 14:05:45 -0500	[thread overview]
Message-ID: <4B8C1009.7090905@cs.columbia.edu> (raw)
In-Reply-To: <1267465468.4347.6.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>



Nathan Lynch wrote:
> Hey Oren,
> 
> On Mon, 2010-03-01 at 10:50 -0500, Oren Laadan wrote:
>> Detecting the architecture via uname is fine as long as the user is
>> able to override it (make SUBARCH=foo).
>>
>> Signed-of-by: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
>> ---
>>  Makefile |   10 +++++++++-
>>  1 files changed, 9 insertions(+), 1 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index 60ddccd..64b5f73 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1,3 +1,11 @@
>> +# *DOCUMENTATION*
>> +#
>> +# List of environment variables that may be set by caller:
>> +#  KERNELSRC	- path of kernel sources (def: ../linux)
>> +#  SUBARCH	- sub-architecture (def: extract with 'uname')
>> +#  PREFIX	- prefix path for installation (def: /usr/local)
>> +#
>> +
>>  KERNELSRC ?= ../linux
>>  
>>  CKPT_INCLUDE = -I./include
>> @@ -6,7 +14,7 @@ CKPT_HEADERS = include/linux/checkpoint.h \
>>  		include/asm/checkpoint_hdr.h
>>  
>>  # detect architecture (for eclone)
>> -SUBARCH = $(patsubst i%86,x86_32,$(shell uname -m))
>> +SUBARCH ?= $(patsubst i%86,x86_32,$(shell uname -m))
> 
> I didn't mean to imply that the user-cr Makefile didn't already honor
> the user's SUBARCH setting on the command line.  That is, "make
> SUBARCH=ppc" works fine already, since command line assignment of
> variables overrides assignment within the Makefile.
> 

Using "?=" allows a user to set SUBARCH as an environment variable
(and not have to repeatedly type it). Sinmple "=" does not pick up
a default value from the environment.

I'll fix the commit message to be more accurate.

Oren

  parent reply	other threads:[~2010-03-01 19:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26 20:37 [PATCH] [RFC] user-cr: Eliminate SUBARCH from Makefile Matt Helsley
     [not found] ` <0c6c11c99f939c74b86893d5eac268ce5c612fe7.1267216666.git.matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-02-26 20:54   ` Nathan Lynch
     [not found]     ` <1267217669.15300.118.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-03-01 15:50       ` [PATCH user-cr] User can override SUBARCH for cross-compilation Oren Laadan
     [not found]         ` <1267458606-1622-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-03-01 17:44           ` Nathan Lynch
     [not found]             ` <1267465468.4347.6.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-03-01 19:05               ` Oren Laadan [this message]
     [not found]                 ` <4B8C1009.7090905-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2010-03-01 19:16                   ` Nathan Lynch

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=4B8C1009.7090905@cs.columbia.edu \
    --to=orenl-eqauephvms7envbuuze7ea@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=ntl-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.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.