From 67b1307955dc45b4a958e5da4179e4ec2a719038 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 10 Dec 2014 12:30:05 +0100 Subject: [PATCH] btrfs-progs: autoconf: clean generated files, make version.h stuff more robust - add rule to generated version.h when any relevant stuff changed - add rule to clean generated files on "make clean-all" Signed-off-by: Karel Zak Signed-off-by: David Sterba --- Makefile.in | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 696b39fb..cceb8b30 100644 --- a/Makefile.in +++ b/Makefile.in @@ -163,6 +163,10 @@ test: btrfs btrfs-convert btrfs-image btrfs-corrupt-block # static: $(progs_static) +version.h: version.sh version.h.in configure.ac + @echo " [SH] $@" + $(Q)bash ./config.status --silent $@ + $(libs_shared): $(libbtrfs_objects) $(lib_links) send.h @echo " [LD] $@" $(Q)$(CC) $(CFLAGS) $(libbtrfs_objects) $(LDFLAGS) $(LIBBTRFS_LIBS) \ @@ -270,14 +274,15 @@ test-build: manpages: $(Q)$(MAKE) $(MAKEOPTS) -C Documentation -clean-all: clean-doc clean + +clean-all: clean clean-doc clean-gen clean: $(CLEANDIRS) @echo "Cleaning" $(Q)rm -f $(progs) cscope.out *.o *.o.d \ dir-test ioctl-test quick-test send-test library-test library-test-static \ btrfs.static mkfs.btrfs.static \ - version.h $(check_defs) \ + $(check_defs) \ $(libs) $(lib_links) \ $(progs_static) $(progs_extra) @@ -285,6 +290,11 @@ clean-doc: @echo "Cleaning Documentation" $(Q)$(MAKE) $(MAKEOPTS) -C Documentation clean +clean-gen: + @echo "Cleaning Generated Files" + $(Q)rm -f version.h config.status config.cache connfig.log \ + configure.lineno config.status.lineno Makefile + $(CLEANDIRS): @echo "Cleaning $(patsubst clean-%,%,$@)" $(Q)$(MAKE) $(MAKEOPTS) -C $(patsubst clean-%,%,$@) clean