]> git.notmuchmail.org Git - notmuch/commitdiff
Makefile: Silence compiler errors during dependency generation.
authorCarl Worth <cworth@cworth.org>
Fri, 4 Dec 2009 23:37:39 +0000 (15:37 -0800)
committerCarl Worth <cworth@cworth.org>
Fri, 4 Dec 2009 23:40:54 +0000 (15:40 -0800)
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.

Makefile

index c3feee1ddd17018c9a00afb59c980c476033fb3f..248a4cfd212722058126e4dab8a3d101fe2d29d8 100644 (file)
--- 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 $@.$$$$