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 <kzak@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
Karel Zak 2014-12-10 12:30:05 +01:00 committed by David Sterba
parent 2c2e6c4e12
commit 67b1307955
1 changed files with 12 additions and 2 deletions

View File

@ -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