diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2018-12-15 01:55:11 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2018-12-17 10:55:20 +0100 |
commit | 94237354ddbf2abc0f04e7f06ee3c1263dfc6b6e (patch) | |
tree | 4a8991e7e52deedde5c156c28dcd458b98c30aa6 /base | |
parent | 0dc7abe013729b3b3560b67fcc37f3cc619f323d (diff) | |
download | lvm2-94237354ddbf2abc0f04e7f06ee3c1263dfc6b6e.tar.gz |
makefiles: correcting login of makefile
Fixing some ordering issue with inclusion of common make.tmpl.
Correcting dependency calculation
Simplifying inclusive makefile
Diffstat (limited to 'base')
-rw-r--r-- | base/Makefile | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/base/Makefile b/base/Makefile index 6050c3a2a..9f8bccca6 100644 --- a/base/Makefile +++ b/base/Makefile @@ -14,7 +14,7 @@ # Comment to build the advanced radix tree. #base/data-struct/radix-tree.o: CFLAGS += -DSIMPLE_RADIX_TREE -# NOTE: this include only works as 'include' for toplevel Makefile +# NOTE: this Makefile only works as 'include' for toplevel Makefile # which defined all top_* variables BASE_SOURCE=\ @@ -22,24 +22,19 @@ BASE_SOURCE=\ base/data-struct/list.c \ base/data-struct/radix-tree.c +BASE_TARGET = base/libbase.a BASE_DEPENDS = $(BASE_SOURCE:%.c=%.d) BASE_OBJECTS = $(BASE_SOURCE:%.c=%.o) CLEAN_TARGETS += $(BASE_DEPENDS) $(BASE_OBJECTS) \ $(BASE_SOURCE:%.c=%.gcda) \ - $(BASE_SOURCE:%.c=%.gcno) + $(BASE_SOURCE:%.c=%.gcno) \ + $(BASE_TARGET) -ifeq ("$(USE_TRACKING)","yes") -ifeq (,$(findstring $(MAKECMDGOALS),cscope.out cflow clean distclean lcov lcov-reset \ - help check check_local check_cluster check_lvmetad check_lvmpolld)) - -include $(BASE_DEPENDS) -endif -endif - -$(BASE_OBJECTS): INCLUDES+=-I$(top_srcdir)/base/ - -base/libbase.a: $(BASE_OBJECTS) +$(BASE_TARGET): $(BASE_OBJECTS) @echo " [AR] $@" $(Q) $(RM) $@ $(Q) $(AR) rsv $@ $(BASE_OBJECTS) > /dev/null -CLEAN_TARGETS += base/libbase.a +ifeq ("$(DEPENDS)","yes") +-include $(BASE_DEPENDS) +endif |