optionroms: Silence intermediate file removal
PATCH 1/1 optionroms: Silence intermediate file removal
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.
--- pc-bios/optionrom/Makefile | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
pc-bios/optionrom/Makefile +4 -2
@@ -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 *~
Signature · 1 line
1.7.3.4
Quoted 16 lines · 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 <[email protected]>--- pc-bios/optionrom/Makefile | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)pc-bios/optionrom/Makefile +0
-0
pc-bios/optionrom/Makefile QEMU_CFLAGS = $(CFLAGS) · line 19
Quoted 4 lines
pc-bios/optionrom/Makefile +1
-0@@ -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.
Am 23.01.2012 19:34, schrieb Jan Kiszka:
Quoted 24 lines
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 <[email protected]>--- pc-bios/optionrom/Makefile | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)pc-bios/optionrom/Makefile +2
-0@@ -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)$@")
pc-bios/optionrom/Makefile QEMU_CFLAGS = $(CFLAGS) · line 31
Quoted 10 lines
pc-bios/optionrom/Makefile +2
-2%.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
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
PATCH v2 1/1 optionroms: Silence intermediate file removal
In reply to Jan KiszkaThe 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.
---
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(-)
pc-bios/optionrom/Makefile +5 -2
@@ -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 *~
Signature · 1 line
1.7.3.4
Am 27.01.2012 13:26, schrieb Jan Kiszka:
Quoted 7 lines
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 <[email protected]>
Thanks,
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
PATCH v3 1/1 optionroms: Silence intermediate file removal
In reply to Jan KiszkaThe 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.
---
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(-)
pc-bios/optionrom/Makefile +3 -0
@@ -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)$@")
Signature · 1 line
1.7.3.4
Anthony Liguori
AppliedQuoted 5 lines · 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. So disable automatic intermediate removal.
Signed-off-by Jan Kiszka<[email protected]>
Applied. Thanks.
Regards,
Anthony Liguori
Quoted 22 lines
---
Changes in v3:
- do not remove intermediate file manually, it breaks parallel buildpc-bios/optionrom/Makefile | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)pc-bios/optionrom/Makefile +3
-0@@ -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)$@")