WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

Re: [XenPPC] [PATCH] Builtin cmdline dependency rule

To: Amos Waterland <apw@xxxxxxxxxx>
Subject: Re: [XenPPC] [PATCH] Builtin cmdline dependency rule
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Thu, 05 Oct 2006 16:07:31 -0500
Cc: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 05 Oct 2006 14:07:46 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20061005003424.GA30073@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
References: <20061005003424.GA30073@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
Committed, thanks.

-- 
Hollis Blanchard
IBM Linux Technology Center

On Wed, 2006-10-04 at 20:34 -0400, Amos Waterland wrote:
> Rebuild cmdline.o when the user changes the CMDLINE=X argument passed to
> the make invocation.  I couldn't find an example of another project that
> handles this case properly, so I came up with this.
> 
> Signed-off-by: Amos Waterland <apw@xxxxxxxxxx>
> 
> ---
> 
>  .hgignore                 |    1 +
>  xen/arch/powerpc/Makefile |   16 +++++++++++++++-
>  2 files changed, 16 insertions(+), 1 deletion(-)
> 
> diff -r 1b759b2522cd .hgignore
> --- a/.hgignore       Wed Oct 04 17:27:16 2006 -0500
> +++ b/.hgignore       Wed Oct 04 20:26:04 2006 -0400
> @@ -207,6 +207,7 @@
>  ^xen/arch/powerpc/xen\.lds$
>  ^xen/arch/powerpc/.xen-syms$
>  ^xen/arch/powerpc/xen-syms.S$
> +^xen/arch/powerpc/cmdline.dep$
>  ^unmodified_drivers/linux-2.6/\.tmp_versions
>  ^unmodified_drivers/linux-2.6/.*\.cmd$
>  ^unmodified_drivers/linux-2.6/.*\.ko$
> diff -r 1b759b2522cd xen/arch/powerpc/Makefile
> --- a/xen/arch/powerpc/Makefile       Wed Oct 04 17:27:16 2006 -0500
> +++ b/xen/arch/powerpc/Makefile       Wed Oct 04 20:26:24 2006 -0400
> @@ -80,6 +80,20 @@ ifneq ($(CMDLINE),)
>  # The first token in the arguments will be silently dropped.
>  FULL_CMDLINE := xen $(CMDLINE)
>  endif
> +
> +ifeq ($(wildcard cmdline.dep),)
> +cmdline.dep:
> +     echo $(FULL_CMDLINE) > cmdline.dep
> +else
> +ifneq ($(FULL_CMDLINE),$(shell cat cmdline.dep))
> +cmdline.dep::
> +     echo $(FULL_CMDLINE) > cmdline.dep
> +else
> +cmdline.dep:
> +endif
> +endif
> +
> +cmdline.o: cmdline.dep
>  cmdline.o: CFLAGS += -DCMDLINE="\"$(FULL_CMDLINE)\""
>  
>  TARGET_OPTS = $(OMAGIC) -Wl,-Ttext,0x400000,-T,xen.lds
> @@ -122,4 +136,4 @@ dom0.bin: $(DOM0_IMAGE)
>  
>  clean::
>       $(MAKE) -f $(BASEDIR)/Rules.mk -C of_handler clean
> -     rm -f firmware firmware_image.bin dom0.bin .xen-syms
> +     rm -f firmware firmware_image.bin dom0.bin .xen-syms cmdline.dep
> 
> _______________________________________________
> Xen-ppc-devel mailing list
> Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-ppc-devel


_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

<Prev in Thread] Current Thread [Next in Thread>