Mesa (master): dri: Ensure subdirs have finished before linking driver

Brian Paul brianp at
Tue Nov 17 10:23:33 PST 2009

Module: Mesa
Branch: master
Commit: cf65d81cf1eb031384f7e8bfe849ce59c458f27e

Author: Dan Nicholson <dbn.lists at>
Date:   Mon Nov  9 05:51:23 2009 -0800

dri: Ensure subdirs have finished before linking driver

Recursive make is hard. If there are subdirectories in the DRI drivers,
it's pretty certain we want to finish building in them before linking
the driver. Add a new target to serialize the rules.

Signed-off-by: Dan Nicholson <dbn.lists at>


 src/mesa/drivers/dri/Makefile.template |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template
index 1ce9315..39d25ce 100644
--- a/src/mesa/drivers/dri/Makefile.template
+++ b/src/mesa/drivers/dri/Makefile.template
@@ -60,9 +60,13 @@ SHARED_INCLUDES = \
 ##### TARGETS #####
-default: symlinks subdirs depend $(LIBNAME) $(TOP)/$(LIB_DIR)/$(LIBNAME)
+default: subdirs lib
+.PHONY: lib
+lib: symlinks subdirs depend
 	$(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \

More information about the mesa-commit mailing list