Discussion
Building Bitcoin from source should support remote builds. Meaning, if I want to create a build directory outside of the Bitcoin source directories and run the configure script from the Bitcoin source repo, it should work. Subsequently, running make inside my build directory should also produce object files and other binaries in my build directory leaving my source directories clean. The way the Autoconf and Makefile configs were written, this works pretty well, except for the embedded LevelDB sources and its custom Makefile and scripts. This PR moves that custom makefile a bit closer to a canonical Autotools build system without resorting to adding a configure.ac to this subdirectory.
Actions taken
Added the ability to build Bitcoin sources in a remote build directory (taking advantage of VPATH). The embedded leveldb custom Makefile and build_detect_platform shell script were the sole hold outs in order to make this happen.
- Made Autoconf aware of the fact that there is a Makefile.in in the leveldb directory.
- Ensured that this file is checked into source control and not ignored.
- Removed the reference to the custom Makefile in the leveled directory because the configure script (using config.status) will be writing the actual Makefile in the leveldb directory.
- Referenced @srcdir@ in the Makefile.in for the leveldb directory in order to make use of the actual srcdir for remote builds.
- Altered the builder script (build_detect_platform) to write the proper paths into its output file.