utils/cbfstool: Fix building with `make test-tools`

The variable `RM` is empty and thus set it to `rm`. While
executing the `clean` rule, run each `rm` command with the -f flag
to ignore non-existing files.

Also, disable the objutil feature locally fixing another build issue.

Change-Id: Icb17e2c924ef480f8ac6195f96cf495709a0a023
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62415
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Felix Singer 2022-02-27 05:06:09 +01:00
parent e61e7789c2
commit 2060bff9c0
1 changed files with 13 additions and 11 deletions

View File

@ -1,5 +1,6 @@
top ?= $(abspath ../..) top ?= $(abspath ../..)
objutil ?= $(top)/util objutil ?= $(top)/util
RM ?= rm
CONFIG_FMD_GENPARSER ?= n CONFIG_FMD_GENPARSER ?= n
@ -8,6 +9,7 @@ PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin BINDIR ?= $(PREFIX)/bin
INSTALL ?= /usr/bin/env install INSTALL ?= /usr/bin/env install
OBJCOPY ?= objcopy OBJCOPY ?= objcopy
override objutil := ..
VBOOT_SOURCE ?= $(top)/3rdparty/vboot VBOOT_SOURCE ?= $(top)/3rdparty/vboot
VBOOT_HOST_BUILD ?= $(abspath $(objutil)/vboot_lib) VBOOT_HOST_BUILD ?= $(abspath $(objutil)/vboot_lib)
@ -35,17 +37,17 @@ cse_serger: $(objutil)/cbfstool/cse_serger
.PHONY: clean cbfstool ifittool fmaptool rmodtool ifwitool cbfs-compression-tool elogtool cse_fpt cse_serger .PHONY: clean cbfstool ifittool fmaptool rmodtool ifwitool cbfs-compression-tool elogtool cse_fpt cse_serger
clean: clean:
$(RM) fmd_parser.c fmd_parser.h fmd_scanner.c fmd_scanner.h $(RM) -f fmd_parser.c fmd_parser.h fmd_scanner.c fmd_scanner.h
$(RM) $(objutil)/cbfstool/cbfstool $(cbfsobj) $(RM) -f $(objutil)/cbfstool/cbfstool $(cbfsobj)
$(RM) $(objutil)/cbfstool/fmaptool $(fmapobj) $(RM) -f $(objutil)/cbfstool/fmaptool $(fmapobj)
$(RM) $(objutil)/cbfstool/rmodtool $(rmodobj) $(RM) -f $(objutil)/cbfstool/rmodtool $(rmodobj)
$(RM) $(objutil)/cbfstool/ifwitool $(ifwiobj) $(RM) -f $(objutil)/cbfstool/ifwitool $(ifwiobj)
$(RM) $(objutil)/cbfstool/ifittool $(ifitobj) $(RM) -f $(objutil)/cbfstool/ifittool $(ifitobj)
$(RM) $(objutil)/cbfstool/cbfs-compression-tool $(cbfscompobj) $(RM) -f $(objutil)/cbfstool/cbfs-compression-tool $(cbfscompobj)
$(RM) $(objutil)/cbfstool/elogtool $(elogobj) $(RM) -f $(objutil)/cbfstool/elogtool $(elogobj)
$(RM) $(objutil)/cbfstool/cse_fpt $(cse_fpt_obj) $(RM) -f $(objutil)/cbfstool/cse_fpt $(cse_fpt_obj)
$(RM) $(objutil)/cbfstool/cse_serger $(cse_serger_obj) $(RM) -f $(objutil)/cbfstool/cse_serger $(cse_serger_obj)
$(RM) -r $(VBOOT_HOST_BUILD) $(RM) -rf $(VBOOT_HOST_BUILD)
linux_trampoline.c: linux_trampoline.S linux_trampoline.c: linux_trampoline.S
rm -f linux_trampoline.c rm -f linux_trampoline.c