shell for-loop in make

"ElChino" <[email protected]> Thu, 23 Oct 2014 19:34:01 +0200
Newsgroups gmane.comp.gnu.utils
Organization A noiseless patient Spider
Message-ID <[email protected]>
Hello list. Can someone please help me fix the
below Makefile snippet. I try to understand why the sh-script 
doesn't exit the makefile when make returns with !=0 exit-code.
Here is a snippet from my Makefile:

DIRS = dir1 \
           dir2 
      # etc. a long list of dirs.

depend all clean distclean:
  rm -f make.log ; \
  _cwd=`pwd` ; \
  for d in $(DIRS) ; do \
    $(MAKE) -C $$d $@ | tee -a make.log ; \
    if [ $$? -ne 0 ]; then \
      echo "make failed with error $$?" | tee -a make.log; \
      exit 1; \
    fi; \
  cd $$_cwd ; \
  done

----------

But the 'exit' isn't called when $(MAKE) fails on a target.
Anybody see the problem?