pdflatex seems to ignore -output-directory
From the trusty man
page for tex
and pdftex
(the command name):
tex [options] [&format] [file|\commands]
So the order is important: options go before the filename. Therefore, you should use:
pdflatex -halt-on-error -output-directory pdf src/foo.tex