X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=Makefile.local;h=53b4a0de8fce5dc51219c2c069dc355e4f6facae;hp=d3bf9478b3f75ac165693c03522436de8efcafde;hb=a114ac8b77c683fafb350e3f3e07fdbbcf4edd3f;hpb=0bbfc5ce8be91b881d9542d86aceec7e6a716e86 diff --git a/Makefile.local b/Makefile.local index d3bf9478..53b4a0de 100644 --- a/Makefile.local +++ b/Makefile.local @@ -256,26 +256,12 @@ endif quiet ?= $($(shell echo $1 | sed -e s'/ .*//')) %.o: %.cc $(global_deps) - $(call quiet,CXX $(CXXFLAGS)) -c $(FINAL_CXXFLAGS) $< -o $@ + @mkdir -p .deps/$(@D) + $(call quiet,CXX $(CXXFLAGS)) -c $(FINAL_CXXFLAGS) $< -o $@ -MD -MP -MF .deps/$*.d %.o: %.c $(global_deps) - $(call quiet,CC $(CFLAGS)) -c $(FINAL_CFLAGS) $< -o $@ - -.deps/%.d: %.c $(global_deps) - @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ - $(CC) -M $(CPPFLAGS) $(FINAL_CFLAGS) $< > $@.$$$$ 2>/dev/null ; \ - sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ - rm -f $@.$$$$ - -.deps/%.d: %.cc $(global_deps) - @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ - $(CXX) -M $(CPPFLAGS) $(FINAL_CXXFLAGS) $< > $@.$$$$ 2>/dev/null ; \ - sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ - rm -f $@.$$$$ - -DEPS := $(SRCS:%.c=.deps/%.d) -DEPS := $(DEPS:%.cc=.deps/%.d) --include $(DEPS) + @mkdir -p .deps/$(@D) + $(call quiet,CC $(CFLAGS)) -c $(FINAL_CFLAGS) $< -o $@ -MD -MP -MF .deps/$*.d .PHONY : clean clean: @@ -305,7 +291,6 @@ notmuch_client_srcs = \ notmuch-tag.c \ notmuch-time.c \ query-string.c \ - show-message.c \ mime-node.c \ json.c @@ -350,3 +335,7 @@ install-desktop: SRCS := $(SRCS) $(notmuch_client_srcs) CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) notmuch.elc + +DEPS := $(SRCS:%.c=.deps/%.d) +DEPS := $(DEPS:%.cc=.deps/%.d) +-include $(DEPS)