1 $(DEPDIR)/deps-ver: $(top_srcdir)/deps-ver
3 cp $(top_srcdir)/deps-ver $@
6 @cmp $(top_srcdir)/deps-ver $@ > /dev/null || ( \
8 echo -n "Prior $(subdir)/$(DEPDIR) version " && \
12 case "$(top_builddir)" in \
14 ./config.status Makefile depfiles \
18 ./config.status $(subdir)/Makefile depfiles && \
22 echo 'Fatal: depsver.mf Automake fragment limited' \
23 'to immediate subdirectories.' && \
24 echo "top_builddir: $(top_builddir)" && \
25 echo "subdir: $(subdir)" && \
29 echo -n "Cleaned $(subdir)/$(DEPDIR) version " && \
30 cat $(top_srcdir)/deps-ver \
32 cp $(top_srcdir)/deps-ver $@
34 .deps-ver: $(top_srcdir)/deps-ver
35 @[ ! -d $(DEPDIR) ] || $(MAKE) $(DEPDIR)/deps-ver
38 BUILT_SOURCES += .deps-ver
39 CLEANFILES += .deps-ver
42 # depsver.mf included in Makefile.am for directories with .deps
44 # When building in the same directory with sources that change over
45 # time, such as when tracking using bk, the .deps files can become
46 # stale with respect to moved, deleted, or superceded headers. Most
47 # commonly, this would exhibit as make reporting a failure to make a
48 # header file which is no longer in the location given. To address
49 # this issue, we use a deps-ver file which is updated with each change
50 # that breaks old .deps files. A copy of deps-ver is made into
51 # $(DEPDIR) if not already present. If $(DEPDIR)/deps-ver is present
52 # with different contents than deps-ver, we make clean to ensure all
53 # .o files built before the incompatible change are rebuilt along with
54 # their updated .deps files, then remove $(DEPDIR) and recreate it as
57 # It is normal when configured with --disable-dependency-tracking for
58 # the DEPDIR to not have been created. For this reason, we use the
59 # intermediate target .deps-ver, which invokes make recursively if
62 # If you modify depsver.mf, please make the changes to the master
63 # copy, the one in sntp is copied by the bootstrap script from it.
65 # This comment block follows rather than leads the related code so that
66 # it stays with it in the generated Makefile.in and Makefile.