From: "Andreas Färber" <afaerber@suse.de>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
qemu-devel <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] optionroms: Silence intermediate file removal
Date: Fri, 27 Jan 2012 11:22:14 +0100 [thread overview]
Message-ID: <4F227AD6.5020408@suse.de> (raw)
In-Reply-To: <4F1DA82F.4090808@siemens.com>
Am 23.01.2012 19:34, schrieb Jan Kiszka:
> The build process of optionroms spits out an "rm ..." line. Moreover, it
> removes all .o files that can be handy for debugging purposes.
>
> Disable automatic intermediate removal and only clean up the unneeded
> and large .img and .raw files.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> pc-bios/optionrom/Makefile | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
> index 51da288..3edde85 100644
> --- a/pc-bios/optionrom/Makefile
> +++ b/pc-bios/optionrom/Makefile
> @@ -16,14 +16,16 @@ QEMU_CFLAGS = $(CFLAGS)
>
> build-all: multiboot.bin linuxboot.bin
>
> +.SECONDARY:
> +
> %.img: %.o
> $(call quiet-command,$(LD) -Ttext 0 -e _start -s -o $@ $<," Building $(TARGET_DIR)$@")
>
> %.raw: %.img
> - $(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@," Building $(TARGET_DIR)$@")
> + $(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@; rm -f $<," Building $(TARGET_DIR)$@")
>
> %.bin: %.raw
> - $(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/signrom.sh $< $@," Signing $(TARGET_DIR)$@")
> + $(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/signrom.sh $< $@; rm -f $<," Signing $(TARGET_DIR)$@")
>
> clean:
> rm -f *.o *.d *.raw *.img *.bin *~
It's possible that objcopy or a shell script fails. In that case,
&& rm -f $<
or a second output-suppressed Makefile line might be a better than
; rm -f $<
Stefan's comment on .SECONDARY seconded. :)
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
WARNING: multiple messages have this Message-ID (diff)
From: "Andreas Färber" <afaerber@suse.de>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: qemu-trivial <qemu-trivial@nongnu.org>,
qemu-devel <qemu-devel@nongnu.org>,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH] optionroms: Silence intermediate file removal
Date: Fri, 27 Jan 2012 11:22:14 +0100 [thread overview]
Message-ID: <4F227AD6.5020408@suse.de> (raw)
In-Reply-To: <4F1DA82F.4090808@siemens.com>
Am 23.01.2012 19:34, schrieb Jan Kiszka:
> The build process of optionroms spits out an "rm ..." line. Moreover, it
> removes all .o files that can be handy for debugging purposes.
>
> Disable automatic intermediate removal and only clean up the unneeded
> and large .img and .raw files.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> pc-bios/optionrom/Makefile | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
> index 51da288..3edde85 100644
> --- a/pc-bios/optionrom/Makefile
> +++ b/pc-bios/optionrom/Makefile
> @@ -16,14 +16,16 @@ QEMU_CFLAGS = $(CFLAGS)
>
> build-all: multiboot.bin linuxboot.bin
>
> +.SECONDARY:
> +
> %.img: %.o
> $(call quiet-command,$(LD) -Ttext 0 -e _start -s -o $@ $<," Building $(TARGET_DIR)$@")
>
> %.raw: %.img
> - $(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@," Building $(TARGET_DIR)$@")
> + $(call quiet-command,$(OBJCOPY) -O binary -j .text $< $@; rm -f $<," Building $(TARGET_DIR)$@")
>
> %.bin: %.raw
> - $(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/signrom.sh $< $@," Signing $(TARGET_DIR)$@")
> + $(call quiet-command,$(SHELL) $(SRC_PATH)/scripts/signrom.sh $< $@; rm -f $<," Signing $(TARGET_DIR)$@")
>
> clean:
> rm -f *.o *.d *.raw *.img *.bin *~
It's possible that objcopy or a shell script fails. In that case,
&& rm -f $<
or a second output-suppressed Makefile line might be a better than
; rm -f $<
Stefan's comment on .SECONDARY seconded. :)
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-01-27 10:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-23 18:34 [Qemu-trivial] [PATCH] optionroms: Silence intermediate file removal Jan Kiszka
2012-01-23 18:34 ` [Qemu-devel] " Jan Kiszka
2012-01-27 6:19 ` [Qemu-trivial] " Stefan Hajnoczi
2012-01-27 6:19 ` [Qemu-devel] " Stefan Hajnoczi
2012-01-27 10:22 ` Andreas Färber [this message]
2012-01-27 10:22 ` [Qemu-devel] " Andreas Färber
2012-01-27 12:26 ` [Qemu-trivial] [PATCH v2] " Jan Kiszka
2012-01-27 12:26 ` [Qemu-devel] " Jan Kiszka
2012-01-27 13:24 ` [Qemu-trivial] " Andreas Färber
2012-01-27 13:24 ` [Qemu-devel] " Andreas Färber
2012-01-30 10:27 ` [Qemu-trivial] [PATCH v3] " Jan Kiszka
2012-01-30 10:27 ` [Qemu-devel] " Jan Kiszka
2012-02-01 22:11 ` [Qemu-trivial] " Anthony Liguori
2012-02-01 22:11 ` Anthony Liguori
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=4F227AD6.5020408@suse.de \
--to=afaerber@suse.de \
--cc=jan.kiszka@siemens.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=stefanha@linux.vnet.ibm.com \
/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.