* [Qemu-devel] [PATCH] optionroms: Silence intermediate file removal
@ 2012-01-23 18:34 Jan Kiszka
2012-01-27 6:19 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Jan Kiszka @ 2012-01-23 18:34 UTC (permalink / raw)
To: qemu-devel, qemu-trivial
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 *~
--
1.7.3.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [Qemu-trivial] [PATCH] optionroms: Silence intermediate file removal
2012-01-23 18:34 [Qemu-devel] [PATCH] optionroms: Silence intermediate file removal Jan Kiszka
@ 2012-01-27 6:19 ` Stefan Hajnoczi
2012-01-27 10:22 ` [Qemu-devel] " Andreas Färber
2012-01-27 12:26 ` [Qemu-devel] [PATCH v2] " Jan Kiszka
2 siblings, 0 replies; 7+ messages in thread
From: Stefan Hajnoczi @ 2012-01-27 6:19 UTC (permalink / raw)
To: Jan Kiszka; +Cc: qemu-trivial, qemu-devel
On Mon, Jan 23, 2012 at 07:34:23PM +0100, Jan Kiszka wrote:
> 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:
I suggest a comment explaining what this built-in target name does.
Otherwise someone might delete it because it is empty.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH] optionroms: Silence intermediate file removal
2012-01-23 18:34 [Qemu-devel] [PATCH] optionroms: Silence intermediate file removal Jan Kiszka
2012-01-27 6:19 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
@ 2012-01-27 10:22 ` Andreas Färber
2012-01-27 12:26 ` [Qemu-devel] [PATCH v2] " Jan Kiszka
2 siblings, 0 replies; 7+ messages in thread
From: Andreas Färber @ 2012-01-27 10:22 UTC (permalink / raw)
To: Jan Kiszka; +Cc: qemu-trivial, qemu-devel, Stefan Hajnoczi
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH v2] optionroms: Silence intermediate file removal
2012-01-23 18:34 [Qemu-devel] [PATCH] optionroms: Silence intermediate file removal Jan Kiszka
2012-01-27 6:19 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2012-01-27 10:22 ` [Qemu-devel] " Andreas Färber
@ 2012-01-27 12:26 ` Jan Kiszka
2012-01-27 13:24 ` Andreas Färber
2012-01-30 10:27 ` [Qemu-devel] [PATCH v3] " Jan Kiszka
2 siblings, 2 replies; 7+ messages in thread
From: Jan Kiszka @ 2012-01-27 12:26 UTC (permalink / raw)
To: qemu-devel, qemu-trivial; +Cc: Andreas Färber, Stefan Hajnoczi
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>
---
Changes in v2:
- comment on .SECONDARY purpose
- make rm -rf dependent on success of build command
pc-bios/optionrom/Makefile | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
index 51da288..4e7275b 100644
--- a/pc-bios/optionrom/Makefile
+++ b/pc-bios/optionrom/Makefile
@@ -16,14 +16,17 @@ QEMU_CFLAGS = $(CFLAGS)
build-all: multiboot.bin linuxboot.bin
+# suppress auto-removal of intermediate files
+.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 *~
--
1.7.3.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v2] optionroms: Silence intermediate file removal
2012-01-27 12:26 ` [Qemu-devel] [PATCH v2] " Jan Kiszka
@ 2012-01-27 13:24 ` Andreas Färber
2012-01-30 10:27 ` [Qemu-devel] [PATCH v3] " Jan Kiszka
1 sibling, 0 replies; 7+ messages in thread
From: Andreas Färber @ 2012-01-27 13:24 UTC (permalink / raw)
To: Jan Kiszka; +Cc: qemu-trivial, qemu-devel, Stefan Hajnoczi
Am 27.01.2012 13:26, 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>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Thanks,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH v3] optionroms: Silence intermediate file removal
2012-01-27 12:26 ` [Qemu-devel] [PATCH v2] " Jan Kiszka
2012-01-27 13:24 ` Andreas Färber
@ 2012-01-30 10:27 ` Jan Kiszka
2012-02-01 22:11 ` Anthony Liguori
1 sibling, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2012-01-30 10:27 UTC (permalink / raw)
To: qemu-devel, qemu-trivial; +Cc: Andreas Färber, Stefan Hajnoczi
The build process of optionroms spits out an "rm ..." line. Moreover, it
removes all .o files that can be handy for debugging purposes. So
disable automatic intermediate removal.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
Changes in v3:
- do not remove intermediate file manually, it breaks parallel build
pc-bios/optionrom/Makefile | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
index 51da288..2caf7e6 100644
--- a/pc-bios/optionrom/Makefile
+++ b/pc-bios/optionrom/Makefile
@@ -16,6 +16,9 @@ QEMU_CFLAGS = $(CFLAGS)
build-all: multiboot.bin linuxboot.bin
+# suppress auto-removal of intermediate files
+.SECONDARY:
+
%.img: %.o
$(call quiet-command,$(LD) -Ttext 0 -e _start -s -o $@ $<," Building $(TARGET_DIR)$@")
--
1.7.3.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH v3] optionroms: Silence intermediate file removal
2012-01-30 10:27 ` [Qemu-devel] [PATCH v3] " Jan Kiszka
@ 2012-02-01 22:11 ` Anthony Liguori
0 siblings, 0 replies; 7+ messages in thread
From: Anthony Liguori @ 2012-02-01 22:11 UTC (permalink / raw)
To: Jan Kiszka; +Cc: qemu-trivial, qemu-devel, Stefan Hajnoczi, Andreas Färber
On 01/30/2012 04:27 AM, Jan Kiszka wrote:
> The build process of optionroms spits out an "rm ..." line. Moreover, it
> removes all .o files that can be handy for debugging purposes. So
> disable automatic intermediate removal.
>
> Signed-off-by: Jan Kiszka<jan.kiszka@siemens.com>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
>
> Changes in v3:
> - do not remove intermediate file manually, it breaks parallel build
>
> pc-bios/optionrom/Makefile | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile
> index 51da288..2caf7e6 100644
> --- a/pc-bios/optionrom/Makefile
> +++ b/pc-bios/optionrom/Makefile
> @@ -16,6 +16,9 @@ QEMU_CFLAGS = $(CFLAGS)
>
> build-all: multiboot.bin linuxboot.bin
>
> +# suppress auto-removal of intermediate files
> +.SECONDARY:
> +
> %.img: %.o
> $(call quiet-command,$(LD) -Ttext 0 -e _start -s -o $@ $<," Building $(TARGET_DIR)$@")
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-02-01 22:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-23 18:34 [Qemu-devel] [PATCH] optionroms: Silence intermediate file removal Jan Kiszka
2012-01-27 6:19 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
2012-01-27 10:22 ` [Qemu-devel] " Andreas Färber
2012-01-27 12:26 ` [Qemu-devel] [PATCH v2] " Jan Kiszka
2012-01-27 13:24 ` Andreas Färber
2012-01-30 10:27 ` [Qemu-devel] [PATCH v3] " Jan Kiszka
2012-02-01 22:11 ` Anthony Liguori
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).