All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: TeLeMan <geleman@gmail.com>
Cc: blauwirbel@gmail.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] w32: Build windows and console executables
Date: Fri, 23 Dec 2011 14:47:31 +0100	[thread overview]
Message-ID: <4EF48673.40705@weilnetz.de> (raw)
In-Reply-To: <CAETRQW=jqYjkf8TTcGfQ465Qea2fgOT6sCFgiH8Q7RQszzodhw@mail.gmail.com>

Am 23.12.2011 03:31, schrieb TeLeMan:
> On Thu, Dec 22, 2011 at 18:20, Stefan Weil <sw@weilnetz.de> wrote:
>> System emulation executables with SDL are typically windows
>> executables. Sometimes console executables are more useful,
>> so create both variants if linker option -mwindows was detected.
>>
>> v2:
>> This version uses QEMU_PROGW / QEMU_PROG instead of QEMU_PROG / 
>> QEMU_PROGC.
>>
>> Signed-off-by: Stefan Weil <sw@weilnetz.de>
>> ---
>>  Makefile.target |   16 +++++++++++++++-
>>  1 files changed, 15 insertions(+), 1 deletions(-)
>>
>> diff --git a/Makefile.target b/Makefile.target
>> index 3261383..0182e41 100644
>> --- a/Makefile.target
>> +++ b/Makefile.target
>> @@ -27,10 +27,17 @@ ifdef CONFIG_USER_ONLY
>>  QEMU_PROG=qemu-$(TARGET_ARCH2)
>>  else
>>  # system emulator name
>> +ifneq (,$(findstring -mwindows,$(LIBS)))
>> +# Terminate program name with a 'w' because the linker builds a 
>> windows executable.
>> +QEMU_PROGW=qemu-system-$(TARGET_ARCH2)w$(EXESUF)
>> +endif # windows executable
>>  QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF)
>>  endif
>>
>>  PROGS=$(QEMU_PROG)
>> +ifdef QEMU_PROGW
>> +PROGS+=$(QEMU_PROGW)
>> +endif
>>  STPFILES=
>>
>>  ifndef CONFIG_HAIKU
>> @@ -403,9 +410,16 @@ endif # CONFIG_LINUX_USER
>>
>>  obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
>>
>> +ifdef QEMU_PROGW
>> +# The linker builds a windows executable. Make also a console 
>> executable.
>> +$(QEMU_PROGW): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
>> +       $(call LINK,$^)
>> +$(QEMU_PROG): $(QEMU_PROGW)
>> +       $(call quiet-command,$(OBJCOPY) --subsystem console 
>> $(QEMU_PROGW) $(QEMU_PROG),"  GEN   $(TARGET_DIR)$(QEMU_PROG)")
>> +else
>>  $(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
>>        $(call LINK,$^)
>> -
>> +endif
>>
>>  gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh
>>        $(call quiet-command,rm -f $@ && $(SHELL) 
>> $(SRC_PATH)/scripts/feature_to_c.sh $@ $(TARGET_XML_FILES),"  GEN   
>> $(TARGET_DIR)$@")
>> --
>> 1.7.2.5
>>
> Failed to make:
> Makefile:416: *** multiple target patterns. Stop.

It works here (native and cross compilations) with MinGW,
so I have to guess and need your help.

This is the relevant code from Makefile.target when my patch was applied:

$(QEMU_PROGW): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
         $(call LINK,$^)
$(QEMU_PROG): $(QEMU_PROGW)
         $(call quiet-command,$(OBJCOPY) --subsystem console 
$(QEMU_PROGW) $(QEMU_PROG),"  GEN   $(TARGET_DIR)$(QEMU_PROG)")

Line 416 is the 2nd line which was not changed by my patch.
It contains no target pattern at all.

Or do you have a different line counting caused by local
modifications or an older version of the QEMU sources?

Does an empty line between 2nd and 3rd line help?

Do you run a native or a cross compilation?

If native: which line endings do you use (CRLF or LF,
depends on git settings and MinGW mount options)?
Do you use Cygwin, MinGW or MinGW-w64?
Which make do you use?

Try to run make in verbose mode (make V=1).

This page describes the error which you got:
http://www.gnu.org/savannah-checkouts/gnu/make/manual/html_node/Error-Messages.html

Cheers,
Stefan Weil

  reply	other threads:[~2011-12-23 13:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-22 10:20 [Qemu-devel] [PATCH v2] w32: Build windows and console executables Stefan Weil
2011-12-23  2:31 ` TeLeMan
2011-12-23 13:47   ` Stefan Weil [this message]
2011-12-26  2:14     ` TeLeMan
2012-01-13 21:13 ` Stefan Weil
2012-01-13 21:31   ` Andreas Färber
2012-01-13 21:57     ` Stefan Weil

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=4EF48673.40705@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=blauwirbel@gmail.com \
    --cc=geleman@gmail.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 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.