qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Froyd <froydnj@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH] work around make bug for *-user builds
Date: Tue, 27 Apr 2010 08:07:20 -0700	[thread overview]
Message-ID: <1272380840-1132-1-git-send-email-froydnj@codesourcery.com> (raw)

When I try to build a linux-user target, I get:

Makefile:84: *** missing `endif'.  Stop.

As best as I can figure out, what happens is that when we call eval from
set-vpath, make is checking that there are no dangling conditionals at
the end of the input.  But in this case make is doing the wrong thing:
the input is just what gets fed to eval, not the wider Makefile from
which eval was called.

To restore buildability of the *-user configs, move calls to set-vpath
out from under ifdefs, and conditionally provide a path for set-vpath.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
---
 Makefile.target |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 65beed5..e1c0f4a 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -79,9 +79,11 @@ signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
 #########################################################
 # Linux user emulator target
 
-ifdef CONFIG_LINUX_USER
+# This call (sans `if') ought to be under the ifdef below, but that
+# triggers bugs in make.
+$(call set-vpath,$(if $CONFIG_LINUX_USER,$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)))
 
-$(call set-vpath, $(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR))
+ifdef CONFIG_LINUX_USER
 
 QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
 obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \
@@ -111,9 +113,9 @@ endif #CONFIG_LINUX_USER
 #########################################################
 # Darwin user emulator target
 
-ifdef CONFIG_DARWIN_USER
+$(call set-vpath,$(if $CONFIG_DARWIN_USER,$(SRC_PATH)/darwin-user))
 
-$(call set-vpath, $(SRC_PATH)/darwin-user)
+ifdef CONFIG_DARWIN_USER
 
 QEMU_CFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
 
@@ -138,9 +140,9 @@ endif #CONFIG_DARWIN_USER
 #########################################################
 # BSD user emulator target
 
-ifdef CONFIG_BSD_USER
+$(call set-vpath,$(if $CONFIG_BSD_USER,$(SRC_PATH)/bsd-user))
 
-$(call set-vpath, $(SRC_PATH)/bsd-user)
+ifdef CONFIG_BSD_USER
 
 QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
 
-- 
1.6.3.2

             reply	other threads:[~2010-04-27 15:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-27 15:07 Nathan Froyd [this message]
2010-04-27 16:10 ` [Qemu-devel] Re: [PATCH] work around make bug for *-user builds Paolo Bonzini
2010-04-27 16:21   ` Nathan Froyd
2010-04-27 16:22     ` Paolo Bonzini

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=1272380840-1132-1-git-send-email-froydnj@codesourcery.com \
    --to=froydnj@codesourcery.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).