btrfs-progs: build: add rule for cleaning build dependencies

The header dependency rules generated as .o.d files are sometimes stale
and fail the build. Add a rule to clean them if needed, otherwise
they're also cleaned by 'make clean'.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2022-10-11 08:57:43 +02:00
parent e1d9dab326
commit aa8040ef8c
1 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,7 @@
# to default locationh (/usr/local)
# clean clean built binaries (not the documentation)
# clean-all clean as above, clean docs and generated files
# clean-dep clean header dependency files (*.o.d)
#
# All-in-one binary (busybox style):
# btrfs.box single binary with functionality of mkfs.btrfs, btrfs-image,
@ -816,6 +817,10 @@ clean-gen:
config.log config.h config.h.in~ aclocal.m4 \
configure autom4te.cache/ config/
clean-dep:
@echo "Cleaning dependency files"
$(Q)$(RM) -f -- *.o.d */*.o.d */*/*.o.d
$(CLEANDIRS):
@echo "Cleaning $(patsubst clean-%,%,$@)"
$(Q)$(MAKE) $(MAKEOPTS) -C $(patsubst clean-%,%,$@) clean