From: Carl Worth Date: Fri, 4 Dec 2009 23:37:39 +0000 (-0800) Subject: Makefile: Silence compiler errors during dependency generation. X-Git-Tag: 0.1~222 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=40e584ecfc2da7b443ceebeabe064c096b3ab999;ds=sidebyside Makefile: Silence compiler errors during dependency generation. We have a bootstrapping issue with our dependency generation. When the Makefile.config doesn't exist yet, the complete compilation flags are not yet available for passing to the compiler to generate the dependencies. But we don't have explicit rules to create these dependency files, (just the implicit rule that is created by the -include), so we can't control when make will attempt to create them. We do have a dependency of the dependency files on Makefile.config, so make should eventually call the compiler with the correct flags and everything should be good. So in the meantime, silence any complaints. --- diff --git a/Makefile b/Makefile index c3feee1d..248a4cfd 100644 --- a/Makefile +++ b/Makefile @@ -62,13 +62,13 @@ quiet ?= $($1) .deps/%.d: %.c $(all_deps) @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ - $(CC) -M $(CPPFLAGS) $(FINAL_CFLAGS) $< > $@.$$$$; \ + $(CC) -M $(CPPFLAGS) $(FINAL_CFLAGS) $< > $@.$$$$ 2>/dev/null ; \ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ .deps/%.d: %.cc $(all_deps) @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ - $(CXX) -M $(CPPFLAGS) $(FINAL_CXXFLAGS) $< > $@.$$$$; \ + $(CXX) -M $(CPPFLAGS) $(FINAL_CXXFLAGS) $< > $@.$$$$ 2>/dev/null ; \ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$