Improve custom build rule for apr.h; update dependency on apr.