buildsystem: Unbreak 'make -qp' on 1.8.

r408083 caused trouble with make -qp. Backport r408193 to 1.8 as well.

(closes issue ASTERISK-23382)
Reported by: Corey Farrell


git-svn-id: http://svn.asterisk.org/svn/asterisk/branches/1.8@409436 f38db490-d61c-443f-a65b-d21fe96a405b