From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oren Laadan Subject: Re: [PATCH user-cr] User can override SUBARCH for cross-compilation Date: Mon, 01 Mar 2010 14:05:45 -0500 Message-ID: <4B8C1009.7090905@cs.columbia.edu> References: <1267217669.15300.118.camel@localhost.localdomain> <1267458606-1622-1-git-send-email-orenl@cs.columbia.edu> <1267465468.4347.6.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1267465468.4347.6.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Nathan Lynch Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: containers.vger.kernel.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 >> --- >> 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