Here's a very simplified version for bibtex that writes a file at the end and does automatically compile it at the end. The external file is called \jobnamesepbib.tex, e.g. foosepbib.tex.
It's possible to include the .bbl file in a 'standalone' document. However, special packages etc. needed must be included in the file writing too.
However, the bibtex step must be done outside. Compile as usual three times.
This does not work for biblatex, however.
\documentclass{article}
\newwrite\bibstuff
\AtEndDocument{%
\immediate\openout\bibstuff=\jobname sepbib.tex
\immediate\write\bibstuff{%
\string\documentclass{article}^^J
\string\begin{document}^^J
\string\InputIfFileExists{\jobname.bbl}{}{}^^J
\string\end{document}^^J
}
\immediate\closeout\bibstuff
\immediate\write18{pdflatex \jobname sepbib.tex} % Compilation
}
\begin{document}
\section{Foo}
\nocite{*}
\bibliographystyle{alpha}
\bibliography{references}
\end{document}
Update
\documentclass{IEEEtran}
\usepackage{cite}
\newwrite\bibstuff
\AtEndDocument{%
\immediate\openout\bibstuff=\jobname sepbib.tex
\immediate\write\bibstuff{%
\string\documentclass{IEEEtran}^^J
\string\usepackage{cite}^^J
\string\begin{document}^^J
\string\InputIfFileExists{\jobname.bbl}{}{}^^J
\string\end{document}^^J
}
\immediate\closeout\bibstuff
\immediate\write18{pdflatex \jobname sepbib.tex}
}
\begin{document}
\section{Foo}
\cite{knuth1986texbook}
\bibliographystyle{IEEEtran}
\bibliography{references}
\end{document}
Here's my standard references.bib for TeX.SX`:
@book{knuth1986texbook,
keywords = {book},
title={The texbook},
author={Knuth, D.E. and Bibby, D.},
volume={1993},
year={1986},
publisher={Addison-Wesley}
}
@article{knuth1977fast,
keywords = {article},
title={Fast pattern matching in strings},
author={Knuth, D.E. and Morris Jr, J.H. and Pratt, V.R.},
journal={SIAM journal on computing},
volume={6},
number={2},
pages={323--350},
year={1977},
publisher={SIAM}
}