I have been trying to fix a simple warning in httpd 2.1 and am getting stuck in spaghetti. apr_sendfile is being exported even when it is not usable, and as a result there is no declaration prior to implementation of the function in network_io. So, I fix that and find that it won't build because exports.c is being created dynamically by the Makefile but using some odd combination of files to check dependencies rather than make itself. I find the make target for delete-exports, but note that it isn't implemented recursively like our normal targets and thus can't be run from the top. Then I notice that exports is not cleaned by a distclean, but rather by extraclean, which means we ship exports as it was found on the RM's machine rather than the user's machine, and the funky logic in the Makefile appears to specifically avoid recreating it. WTF? Mind you, exports isn't even needed if you don't compile shared, so this whole thing is a waste of time for people who compile static.
Can somebody please explain what they are trying to accomplish with exports and why it isn't being created by configure? My guess is that someone is attempting to create a single shared library that will work on a platform where sendfile may or may not be avaiable. If so, then please fix the problem and not the side-effect: remove the APR_HAS_SENDFILE conditionals from all of the exported declarations so that it is always exported. We can then simplify the creation of exports.c.
....Roy