mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
makefiles: retry faster deps again
From commit 29abba3785
we have hopefully
fixed most of troubles for deps tracking we had in past - so retry
again.
Drop explicit configure.h from DEPS - as it's automatically gathered
by gcc dependency tracking anyway.
This commit is contained in:
parent
39eee85fff
commit
6846af6612
@ -280,7 +280,7 @@ INCLUDES += -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)/include -include confi
|
|||||||
|
|
||||||
|
|
||||||
DEPS = $(top_builddir)/libdm/make.tmpl $(top_srcdir)/VERSION \
|
DEPS = $(top_builddir)/libdm/make.tmpl $(top_srcdir)/VERSION \
|
||||||
$(top_builddir)/libdm/Makefile $(top_builddir)/include/configure.h
|
$(top_builddir)/libdm/Makefile
|
||||||
|
|
||||||
OBJECTS = $(SOURCES:%.c=%.o) $(CXXSOURCES:%.cpp=%.o)
|
OBJECTS = $(SOURCES:%.c=%.o) $(CXXSOURCES:%.cpp=%.o)
|
||||||
POTFILES = $(SOURCES:%.c=%.pot)
|
POTFILES = $(SOURCES:%.c=%.pot)
|
||||||
@ -397,14 +397,16 @@ endif
|
|||||||
|
|
||||||
.LIBPATTERNS = lib%.so lib%.a
|
.LIBPATTERNS = lib%.so lib%.a
|
||||||
|
|
||||||
|
DEPFLAGS=-MT $@ -MMD -MP -MF $*.d
|
||||||
|
|
||||||
# still needed in 2018 for 32bit builds
|
# still needed in 2018 for 32bit builds
|
||||||
DEFS+=-D_FILE_OFFSET_BITS=64
|
DEFS+=-D_FILE_OFFSET_BITS=64
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c $(DEPS)
|
||||||
@echo " [CC] $(<F)"
|
@echo " [CC] $(<F)"
|
||||||
$(Q) $(CC) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
|
$(Q) $(CC) $(DEPFLAGS) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
|
||||||
|
|
||||||
%.o: %.cpp
|
%.o: %.cpp $(DEPS)
|
||||||
@echo " [CXX] $(<F)"
|
@echo " [CXX] $(<F)"
|
||||||
$(Q) $(CXX) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
|
$(Q) $(CXX) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
|
||||||
|
|
||||||
@ -462,17 +464,8 @@ $(LIB_STATIC): $(OBJECTS)
|
|||||||
$(Q) $(RM) $@
|
$(Q) $(RM) $@
|
||||||
$(Q) $(AR) rsv $@ $(OBJECTS) > /dev/null
|
$(Q) $(AR) rsv $@ $(OBJECTS) > /dev/null
|
||||||
|
|
||||||
%.d: %.c
|
%.d:
|
||||||
@echo " [DEP] $(<F)"
|
.PRECIOUS: %.d
|
||||||
$(Q) $(MKDIR_P) $(dir $@); \
|
|
||||||
set -e; \
|
|
||||||
FILE=`echo $@ | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \
|
|
||||||
DEPS=`echo $(DEPS) | sed -e 's/\\//\\\\\\//g'`; \
|
|
||||||
$(CC) -MM $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) -o $@ $<; \
|
|
||||||
sed -i "s/\(.*\)\.o[ :]*/$$FILE.o $$FILE.d $$FILE.pot: $$DEPS /g" $@; \
|
|
||||||
DEPLIST=`sed 's/ \\\\//;s/.*://;' < $@`; \
|
|
||||||
echo $$DEPLIST | fmt -1 | sed 's/ //g;s/\(.*\)/\1:/' >> $@; \
|
|
||||||
[ -s $@ ] || $(RM) $@
|
|
||||||
|
|
||||||
%.mo: %.po
|
%.mo: %.po
|
||||||
@echo " [MSGFMT] $(<F)"
|
@echo " [MSGFMT] $(<F)"
|
||||||
|
23
make.tmpl.in
23
make.tmpl.in
@ -300,7 +300,7 @@ INCLUDES += -I$(srcdir) -I$(top_srcdir) -I$(top_builddir)/include -include confi
|
|||||||
#VDO_INCLUDES=-I@VDO_INCLUDE@
|
#VDO_INCLUDES=-I@VDO_INCLUDE@
|
||||||
|
|
||||||
DEPS = $(top_builddir)/make.tmpl $(top_srcdir)/VERSION \
|
DEPS = $(top_builddir)/make.tmpl $(top_srcdir)/VERSION \
|
||||||
$(top_builddir)/Makefile $(top_builddir)/include/configure.h
|
$(top_builddir)/Makefile
|
||||||
|
|
||||||
OBJECTS = $(SOURCES:%.c=%.o) $(CXXSOURCES:%.cpp=%.o)
|
OBJECTS = $(SOURCES:%.c=%.o) $(CXXSOURCES:%.cpp=%.o)
|
||||||
POTFILES = $(SOURCES:%.c=%.pot)
|
POTFILES = $(SOURCES:%.c=%.pot)
|
||||||
@ -436,14 +436,16 @@ endif
|
|||||||
|
|
||||||
.LIBPATTERNS = lib%.so lib%.a
|
.LIBPATTERNS = lib%.so lib%.a
|
||||||
|
|
||||||
|
DEPFLAGS=-MT $@ -MMD -MP -MF $*.d
|
||||||
|
|
||||||
# still needed in 2018 for 32bit builds
|
# still needed in 2018 for 32bit builds
|
||||||
DEFS+=-D_FILE_OFFSET_BITS=64
|
DEFS+=-D_FILE_OFFSET_BITS=64
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c $(DEPS)
|
||||||
@echo " [CC] $(<F)"
|
@echo " [CC] $(<F)"
|
||||||
$(Q) $(CC) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
|
$(Q) $(CC) $(DEPFLAGS) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
|
||||||
|
|
||||||
%.o: %.cpp
|
%.o: %.cpp $(DEPS)
|
||||||
@echo " [CXX] $(<F)"
|
@echo " [CXX] $(<F)"
|
||||||
$(Q) $(CXX) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
|
$(Q) $(CXX) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
|
||||||
|
|
||||||
@ -501,17 +503,8 @@ $(LIB_STATIC): $(OBJECTS)
|
|||||||
$(Q) $(RM) $@
|
$(Q) $(RM) $@
|
||||||
$(Q) $(AR) rsv $@ $(OBJECTS) > /dev/null
|
$(Q) $(AR) rsv $@ $(OBJECTS) > /dev/null
|
||||||
|
|
||||||
%.d: %.c
|
%.d:
|
||||||
@echo " [DEP] $(<F)"
|
.PRECIOUS: %.d
|
||||||
$(Q) $(MKDIR_P) $(dir $@); \
|
|
||||||
set -e; \
|
|
||||||
FILE=`echo $@ | sed 's/\\//\\\\\\//g;s/\\.d//g'`; \
|
|
||||||
DEPS=`echo $(DEPS) | sed -e 's/\\//\\\\\\//g'`; \
|
|
||||||
$(CC) -MM $(INCLUDES) $(VALGRIND_CFLAGS) $(PROGS_CFLAGS) $(DEFS) -o $@ $<; \
|
|
||||||
sed -i "s/\(.*\)\.o[ :]*/$$FILE.o $$FILE.d $$FILE.pot: $$DEPS /g" $@; \
|
|
||||||
DEPLIST=`sed 's/ \\\\//;s/.*://;' < $@`; \
|
|
||||||
echo $$DEPLIST | fmt -1 | sed 's/ //g;s/\(.*\)/\1:/' >> $@; \
|
|
||||||
[ -s $@ ] || $(RM) $@
|
|
||||||
|
|
||||||
%.mo: %.po
|
%.mo: %.po
|
||||||
@echo " [MSGFMT] $(<F)"
|
@echo " [MSGFMT] $(<F)"
|
||||||
|
Loading…
Reference in New Issue
Block a user