All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sheng Yang <sheng@linux.intel.com>
To: kvm@vger.kernel.org
Cc: Avi Kivity <avi@redhat.com>, ehrhardt@linux.vnet.ibm.com
Subject: Re: [PATCH] kvm: fix unifdef problem
Date: Tue, 21 Oct 2008 16:57:22 +0800	[thread overview]
Message-ID: <200810211657.23213.sheng@linux.intel.com> (raw)
In-Reply-To: <1224574264-27116-1-git-send-email-sheng@linux.intel.com>

On Tuesday 21 October 2008 15:31:04 Sheng Yang wrote:
> Reminder by Avi, unifdef need a -U parameter to deal undefined macro, other
> wise it can't deal with #if defined() || defined().
>
> Also fix a historic bug on never execute unifdef...
>
> Also discard "set -e" before unifdef, because unifdef would return 1 if it
> have done something to the file.

Hi, Christian

Can you help to check if it's affect powerpc side?

Thanks!
--
regards
Yang, Sheng
>
> Signed-off-by: Sheng Yang <sheng@linux.intel.com>
> ---
>  kernel/Makefile |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/kernel/Makefile b/kernel/Makefile
> index ef18fa6..fed3bd4 100644
> --- a/kernel/Makefile
> +++ b/kernel/Makefile
> @@ -3,6 +3,8 @@ include config.kbuild
>
>  ARCH_DIR = $(if $(filter $(ARCH),x86_64 i386),x86,$(ARCH))
>  ARCH_CONFIG := $(shell echo $(ARCH_DIR) | tr '[:lower:]' '[:upper:]')
> +# NONARCH_CONFIG used for unifdef, and only cover X86 and IA64 now
> +NONARCH_CONFIG = $(filter-out $(ARCH_CONFIG),X86 IA64)
>
>  KVERREL = $(patsubst /lib/modules/%/build,%,$(KERNELDIR))
>
> @@ -24,8 +26,8 @@ _hack = mv $1 $1.orig && \
>
>  	    | sed '/\#include/! s/\blapic\b/l_apic/g' > $1 && rm $1.orig
>
>  unifdef = mv $1 $1.orig && \
> -	  unifdef -DCONFIG_$(ARCH_CONFIG) $1.orig > $1; \
> -          [ $$? -le 1 ] && rm $1.orig
> +	  unifdef -DCONFIG_$(ARCH_CONFIG) -UCONFIG_$(NONARCH_CONFIG) $1.orig >
> $1; \ +          [ $$? -le 2 ] && rm $1.orig
>
>  hack = $(call _hack,$T/$(strip $1))
>
> @@ -67,7 +69,7 @@ header-sync:
>  	     "$(LINUX)"/arch/$(ARCH_DIR)/include/asm/./kvm*.h \
>               $T/include/asm-$(ARCH_DIR)/
>
> -	set -e && for i in $(find $T -name '*.h'); do \
> +	for i in $$(find $T -name '*.h'); do \
>  		$(call unifdef,$$i); done
>  	$(call hack, include/linux/kvm.h)
>  	set -e && for i in $$(find $T -type f -printf '%P '); \
> @@ -81,7 +83,7 @@ source-sync:
>  	     "$(LINUX)"/virt/kvm/./*.[cSh] \
>  	     $T/
>
> -	set -e && for i in $(find $T -name '*.c'); do \
> +	for i in $$(find $T -name '*.c'); do \
>  		$(call unifdef,$$i); done
>
>  	for i in $(hack-files); \



  reply	other threads:[~2008-10-21  8:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21  7:31 [PATCH] kvm: fix unifdef problem Sheng Yang
2008-10-21  8:57 ` Sheng Yang [this message]
2008-10-22 10:31 ` Avi Kivity

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=200810211657.23213.sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=avi@redhat.com \
    --cc=ehrhardt@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.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.