1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

makefiles: avoid dependency calcs for base dir

For some targets we do not want to generate dependencies.
Also add note about usage of such Makefile - it might be
possibly better to rename it to different filename to avoid
any confusion.
This commit is contained in:
Zdenek Kabelac 2018-11-29 17:34:32 +01:00
parent ceb2f0ad3b
commit f54ead831f
3 changed files with 11 additions and 3 deletions

View File

@ -14,6 +14,9 @@
# Comment to build the advanced radix tree. # Comment to build the advanced radix tree.
#base/data-struct/radix-tree.o: CFLAGS += -DSIMPLE_RADIX_TREE #base/data-struct/radix-tree.o: CFLAGS += -DSIMPLE_RADIX_TREE
# NOTE: this include only works as 'include' for toplevel Makefile
# which defined all top_* variables
BASE_SOURCE=\ BASE_SOURCE=\
base/data-struct/radix-tree.c \ base/data-struct/radix-tree.c \
base/data-struct/hash.c \ base/data-struct/hash.c \
@ -23,7 +26,12 @@ BASE_DEPENDS=$(addprefix $(top_builddir)/,$(subst .c,.d,$(BASE_SOURCE)))
BASE_OBJECTS=$(addprefix $(top_builddir)/,$(subst .c,.o,$(BASE_SOURCE))) BASE_OBJECTS=$(addprefix $(top_builddir)/,$(subst .c,.o,$(BASE_SOURCE)))
CLEAN_TARGETS+=$(BASE_DEPENDS) $(BASE_OBJECTS) CLEAN_TARGETS+=$(BASE_DEPENDS) $(BASE_OBJECTS)
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) -include $(BASE_DEPENDS)
endif
endif
$(BASE_OBJECTS): INCLUDES+=-I$(top_srcdir)/base/ $(BASE_OBJECTS): INCLUDES+=-I$(top_srcdir)/base/

View File

@ -36,7 +36,7 @@ CLEAN_TARGETS+=$(DEVICE_MAPPER_DEPENDS) $(DEVICE_MAPPER_OBJECTS)
#$(DEVICE_MAPPER_OBJECTS): INCLUDES+=$(VDO_INCLUDES) #$(DEVICE_MAPPER_OBJECTS): INCLUDES+=$(VDO_INCLUDES)
ifeq ("$(USE_TRACKING)","yes") ifeq ("$(USE_TRACKING)","yes")
ifeq (,$(findstring $(MAKECMDGOALS),cscope.out cflow clean distclean lcov \ ifeq (,$(findstring $(MAKECMDGOALS),cscope.out cflow clean distclean lcov lcov-reset \
help check check_local check_cluster check_lvmetad check_lvmpolld)) help check check_local check_cluster check_lvmetad check_lvmpolld))
-include $(DEVICE_MAPPER_DEPENDS) -include $(DEVICE_MAPPER_DEPENDS)
endif endif

View File

@ -46,7 +46,7 @@ run-unit-test: test/unit/unit-test
LD_LIBRARY_PATH=libdm test/unit/unit-test run LD_LIBRARY_PATH=libdm test/unit/unit-test run
ifeq ("$(USE_TRACKING)","yes") ifeq ("$(USE_TRACKING)","yes")
ifeq (,$(findstring $(MAKECMDGOALS),cscope.out cflow clean distclean lcov \ ifeq (,$(findstring $(MAKECMDGOALS),cscope.out cflow clean distclean lcov lcov-reset \
help check check_local check_lvmpolld run-unit-test)) help check check_local check_lvmpolld run-unit-test))
-include $(UNIT_DEPENDS) -include $(UNIT_DEPENDS)
endif endif