diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2015-05-18 10:27:48 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2015-05-18 12:45:42 +0200 |
commit | 30c3bbcd9e852d7f79846ecc57148a47e52e818d (patch) | |
tree | 0357f2c82acde5941377578029d4add4e7aa4bb6 /include | |
parent | 1bed578535f9f2442916ce7da060132233502bcb (diff) | |
download | lvm2-30c3bbcd9e852d7f79846ecc57148a47e52e818d.tar.gz |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.in | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/Makefile.in b/include/Makefile.in index 3daaab105..2049b671e 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 |