From: Zdenek Kabelac Date: Mon, 18 May 2015 10:52:31 +0000 (UTC) Subject: master - makefiles: better clean Message-ID: <20150518105231.6BF4E61057@fedorahosted.org> List-Id: To: lvm-devel@redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=30c3bbcd9e852d7f79846ecc57148a47e52e818d Commit: 30c3bbcd9e852d7f79846ecc57148a47e52e818d Parent: 1bed578535f9f2442916ce7da060132233502bcb Author: Zdenek Kabelac AuthorDate: Mon May 18 10:27:48 2015 +0200 Committer: Zdenek Kabelac CommitterDate: Mon May 18 12:45:42 2015 +0200 makefiles: better clean More exact clean of library exported symbols files. Also use $(firstword) test to check for empty string so 'make clean' has now cleaner condensed look. Clean also created include links. --- include/Makefile.in | 12 ++++++++---- libdm/Makefile.in | 2 +- liblvm/Makefile.in | 2 +- make.tmpl.in | 20 ++++++++++++++------ test/Makefile.in | 10 ++++------ tools/Makefile.in | 3 ++- 6 files changed, 30 insertions(+), 19 deletions(-) diff --git a/include/Makefile.in b/include/Makefile.in index 3daaab1..2049b67 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -20,8 +20,12 @@ include $(top_builddir)/make.tmpl all: .symlinks_created -.symlinks_created: .symlinks - find . -maxdepth 1 -type l -exec $(RM) \{\} \; +LINKS := $(shell find . -maxdepth 1 -type l) + +.symlinks_created: .symlinks +ifneq (,$(firstword $(LINKS))) + $(RM) $(LINKS) +endif for i in `cat $<`; do $(LN_S) $$i ; done touch $@ @@ -31,5 +35,5 @@ device-mapper: all cflow: all -DISTCLEAN_TARGETS += $(shell find . -maxdepth 1 -type l) -DISTCLEAN_TARGETS += .include_symlinks .symlinks_created .symlinks +DISTCLEAN_TARGETS += .symlinks +CLEAN_TARGETS += $(LINKS) .include_symlinks .symlinks_created diff --git a/libdm/Makefile.in b/libdm/Makefile.in index c1d7871..ba65c6a 100644 --- a/libdm/Makefile.in +++ b/libdm/Makefile.in @@ -94,4 +94,4 @@ install_ioctl_static: $(LIB_STATIC) $(INSTALL_DATA) -D $< $(usrlibdir)/$(