mirror of
https://github.com/Zygo/bees.git
synced 2025-06-16 17:46:16 +02:00
Makefile: speedup dependency generation
Dependencies can be generated in parallel which can be much faster. It also puts away the problem that for may fail multiple times in a row and leaving behind a broken intermediate file which would be picked up by successive runs. Signed-off-by: Kai Krakow <kai@kaishome.de>
This commit is contained in:
@ -24,8 +24,12 @@ libcrucible.so: $(CRUCIBLE_OBJS)
|
||||
|
||||
include ../makeflags
|
||||
|
||||
depends.mk: *.cc
|
||||
for x in $^; do $(CXX) $(CXXFLAGS) -M -MG -MT "$${x/%.cc/.o}" "$$x"; done > $@.new
|
||||
.depends/%.dep: %.cc Makefile
|
||||
@mkdir -p .depends
|
||||
$(CXX) $(CXXFLAGS) -M -MF $@ -MT $(<:.cc=.o) $<
|
||||
|
||||
depends.mk: $(CRUCIBLE_OBJS:%.o=.depends/%.dep)
|
||||
cat $^ > $@.new
|
||||
mv -f $@.new $@
|
||||
|
||||
.version.cc: Makefile ../makeflags *.cc ../include/crucible/*.h
|
||||
|
Reference in New Issue
Block a user