My dependencies are:
build/Linux-x86_64-64.g++-release/lib/libdata_access.so : build/Linux-x86_64-64.g++-release/obj-mt-pic/data_access/data_access.o
build/Linux-x86_64-64.g++-release/obj-mt-pic/data_access/data_access.o : src/c++/data_access/data_access.cc
src/c++/data_access/data_access.cc : src/c++/data_access/data_access.reflect.h
src/c++/data_access/data_access.reflect.h : src/c++/data_access/data_access.h src/c++/reflect/generate.py
What happens is that make correctly identifies that data_access.cc depends on data_access.reflect.h, finds an implicit rule that generates data_access.reflect.h, rebuilds the dependencies of data_access.reflect.h but neglects to build data_access.reflect.h itself.
Why does it not build data_access.reflect.h please?
I am using GNU make-4.0. Below is the relevant bit from `make -r -d` output:
Considering target file 'build/Linux-x86_64-64.g++-release/lib/libdata_access.so'.
File 'build/Linux-x86_64-64.g++-release/lib/libdata_access.so' does not exist.
Pruning file 'build/Linux-x86_64-64.g++-release/obj-mt-pic/data_access'.
Pruning file 'build/Linux-x86_64-64.g++-release/lib/libjson.so'.
Pruning file 'build/Linux-x86_64-64.g++-release/lib/libutil_linux.so'.
Pruning file 'build/Linux-x86_64-64.g++-release/lib/libutil.so'.
Pruning file 'build/Linux-x86_64-64.g++-release/lib'.
Considering target file 'build/Linux-x86_64-64.g++-release/obj-mt-pic/data_access/data_access.o'.
File 'build/Linux-x86_64-64.g++-release/obj-mt-pic/data_access/data_access.o' does not exist.
Pruning file 'build/Linux-x86_64-64.g++-release/obj-mt-pic/data_access'.
Considering target file 'src/c++/data_access/data_access.cc'.
Looking for an implicit rule for 'src/c++/data_access/data_access.reflect.h'.
Trying pattern rule with stem 'data_access/data_access'.
Trying implicit prerequisite 'src/c++/data_access/data_access.h'.
Trying rule prerequisite 'src/c++/reflect/generate.py'.
Trying rule prerequisite 'etc/rules.mk'. Found an implicit rule for 'src/c++/data_access/data_access.reflect.h'.
Pruning file 'src/c++/data_access/data_access.h'.
Considering target file 'src/c++/reflect/generate.py'.
Looking for an implicit rule for 'src/c++/reflect/generate.py'.
Trying pattern rule with stem 'generate'.
Trying rule prerequisite 'src/python/olivetree_c.py'.
Found an implicit rule for 'src/c++/reflect/generate.py'.
Considering target file 'src/python/olivetree_c.py'.
File 'src/python/olivetree_c.py' does not exist.
Considering target file 'src/python/olivetree_c.py.release'.
Considering target file 'etc/olivetree_c.py.template'.
Looking for an implicit rule for 'etc/olivetree_c.py.template'.
No implicit rule found for 'etc/olivetree_c.py.template'.
Finished prerequisites of target file 'etc/olivetree_c.py.template'.
No need to remake target 'etc/olivetree_c.py.template'.
Finished prerequisites of target file 'src/python/olivetree_c.py.release'.
Prerequisite 'etc/olivetree_c.py.template' is older than target 'src/python/olivetree_c.py.release'.
No need to remake target 'src/python/olivetree_c.py.release'.
Finished prerequisites of target file 'src/python/olivetree_c.py'.
Must remake target 'src/python/olivetree_c.py'.
cd src/python && ln -fs olivetree_c.py.release olivetree_c.py
Putting child 0x1e74d10 (src/python/olivetree_c.py) PID 4317 on the chain.
Live child 0x1e74d10 (src/python/olivetree_c.py) PID 4317
Reaping winning child 0x1e74d10 PID 4317
Removing child 0x1e74d10 PID 4317 from chain.
Successfully remade target file 'src/python/olivetree_c.py'.
Considering target file 'src/python/olivetree_c.py'.
File 'src/python/olivetree_c.py' was considered already.
Finished prerequisites of target file 'src/c++/reflect/generate.py'.
Prerequisite 'src/python/olivetree_c.py' of target 'src/c++/reflect/generate.py' does not exist.
Must remake target 'src/c++/reflect/generate.py'.
Successfully remade target file 'src/c++/reflect/generate.py'.
Finished prerequisites of target file 'src/c++/data_access/data_access.cc'.
Prerequisite 'src/c++/data_access/data_access.reflect.h' of target 'src/c++/data_access/data_access.cc' does not exist.
No need to remake target 'src/c++/data_access/data_access.cc'.
Finished prerequisites of target file 'build/Linux-x86_64-64.g++-release/obj-mt-pic/data_access/data_access.o'