mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 10:58:10 +01:00
97c7cffdc6
I saw this recommendation in the implementation notes for "Recursive Make Considered Harmful" and then the further recommendation for implementing the idea in the GNU make manual. The idea is that if any of the files change then we need to regenerate the dependency file before we regenerate any targets. The approach from the GNU make manual is simpler in that it just uses a sed script to fix up the output of an extra invocation of the compiler, (as opposed to the approach in the implementation notes from the paper's author which use a wrapper script for the compiler that's always invoked rather than the compiler itself).
22 lines
511 B
Text
22 lines
511 B
Text
dir=lib
|
|
|
|
libnotmuch_c_srcs = \
|
|
$(dir)/libsha1.c \
|
|
$(dir)/message-file.c \
|
|
$(dir)/sha1.c \
|
|
$(dir)/tags.c \
|
|
$(dir)/xutil.c
|
|
|
|
libnotmuch_cxx_srcs = \
|
|
$(dir)/database.cc \
|
|
$(dir)/index.cc \
|
|
$(dir)/message.cc \
|
|
$(dir)/query.cc \
|
|
$(dir)/thread.cc
|
|
|
|
libnotmuch_modules = $(libnotmuch_c_srcs:.c=.o) $(libnotmuch_cxx_srcs:.cc=.o)
|
|
$(dir)/notmuch.a: $(libnotmuch_modules)
|
|
$(AR) rcs $@ $^
|
|
|
|
SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)
|
|
CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/notmuch.a
|