X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=Makefile;h=3fedcf12e87c4cb26005d09953c36f90f2ed12e2;hp=0411cbbed663c933fad48d434d9168ea4508995e;hb=aac1d6035238f6a2b18c0dc0d7a5190a2187c511;hpb=0a575c95804da3cb740ebe2fbece862f19dce35a diff --git a/Makefile b/Makefile index 0411cbbe..3fedcf12 100644 --- a/Makefile +++ b/Makefile @@ -10,9 +10,12 @@ extra_cxxflags := $(shell xapian-config --cxxflags) emacs_lispdir := $(shell pkg-config emacs --variable sitepkglispdir) # Hard-code if this system doesn't have an emacs.pc file ifeq ($(emacs_lispdir),) - emacs_lispdir = $(prefix)/share/site-lisp + emacs_lispdir = $(prefix)/share/emacs/site-lisp endif +all_deps = Makefile Makefile.local Makefile.config \ + lib/Makefile lib/Makefile.local + # Now smash together user's values with our extra values override CFLAGS += $(WARN_FLAGS) $(extra_cflags) override CXXFLAGS += $(WARN_FLAGS) $(extra_cflags) $(extra_cxxflags) @@ -28,22 +31,22 @@ include lib/Makefile.local # And get user settings from the output of configure include Makefile.config -%.o: %.cc - $(CXX) -c $(CFLAGS) $(CXXFLAGS) $< -o $@ +%.o: %.cc $(all_deps) + $(CXX) -c $(CXXFLAGS) $< -o $@ -%.o: %.c +%.o: %.c $(all_deps) $(CC) -c $(CFLAGS) $< -o $@ %.elc: %.el emacs -batch -f batch-byte-compile $< -.deps/%.d: %.c +.deps/%.d: %.c $(all_deps) @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CC) -M $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \ rm -f $@.$$$$ -.deps/%.d: %.cc +.deps/%.d: %.cc $(all_deps) @set -e; rm -f $@; mkdir -p $$(dirname $@) ; \ $(CXX) -M $(CPPFLAGS) $(CXXFLAGS) $< > $@.$$$$; \ sed 's,'$$(basename $*)'\.o[ :]*,$*.o $@ : ,g' < $@.$$$$ > $@; \