By modifying src/Makefile.am as follows:
bin_PROGRAMS = tester mpiblast mpiformatdb
....
tester$(EXEEXT):
perl -w $(top_srcdir)/test.pl ncbi-toolkit $(CONFIG_NCBIDIR)
we can run the test script so that it checks if the ncbi-toolkit has
been patched, and patches it if need be. This will be done by
comparing date stamps on files that need to be patched to the
others in the dir.
We can also check to make sure that it is patched correctly, but
this is more complex. I prefer just checking the timestamp on
ncbi/tools/blast.c
The test script will call a subroutine that does the check, and if the
toolkit hasn't been patched, asks the user if they'd like to patch
and rebuild the toolkit. Then, if ncbi/build is populated, if we should
remove all the old files or trust the ncbi toolkit to correctly make
what it needs to.