diff --git a/build/autoMakefile.am.toplevel b/build/autoMakefile.am.toplevel
index 644a47e03c33baccd584d36266bb341d804f7953..f272ed8be9c68d5bb3c40e8a9b054812baa01d0e 100644
--- a/build/autoMakefile.am.toplevel
+++ b/build/autoMakefile.am.toplevel
@@ -29,7 +29,7 @@ sources: all-sources
 
 all-sources:
 	for dir in $(SOURCES_SUBDIRS) ; do \
-		$(MAKE) sources -C $$dir ; \
+		$(MAKE) sources -C $$dir || exit $$? ; \
 	done
 
 if LINUX