Dan Nicholson <[email protected]> writes:
> On Tue, Nov 24, 2009 at 3:55 PM, tom fogal <[email protected]> wrote:
> >
> > I like your automake-esque solution.  How's the attached patch?  Note
> > that I tested the approach but not Mesa on AIX yet (please don't
> > apply).
> 
> Yeah, that's great. One of my _really_ rainy day projects was to
> convert all the mesa recursion targets to use the automake style since
> we know that's been thrown at tons of systems out in the wild.
> 
> Reviewed-by: Dan Nicholson <[email protected]>

I think this fell through the cracks (I see the old makefile in
7.6.1-rc2).  Note that I did send a followup mail after testing that
the approach works fine on AIX.

Could someone apply this to mesa_7_6_branch?

Thanks,

-tom

From 6fb5d204d98fd8a5c48724069f1ea9ee3cca2e4e Mon Sep 17 00:00:00 2001
From: Tom Fogal <[email protected]>
Date: Tue, 24 Nov 2009 16:46:31 -0700
Subject: [PATCH] Simplify hackery added to fix AIX build.

Borrow an idiom from the GNU build system which can handle `for'
loops over empty lists.
---
 progs/Makefile |   26 +++++++++++---------------
 1 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/progs/Makefile b/progs/Makefile
index d5852fa..5bc444e 100644
--- a/progs/Makefile
+++ b/progs/Makefile
@@ -4,7 +4,7 @@ TOP = ..
 
 include $(TOP)/configs/current
 
-SUBDIRS = "$(strip "$(PROGRAM_DIRS)")"
+SUBDIRS = $(PROGRAM_DIRS)
 
 
 default: message subdirs
@@ -15,22 +15,18 @@ message:
 
 
 subdirs:
-	@if test -n "$(SUBDIRS)" ; then \
-		for dir in $(SUBDIRS) ; do \
-			if [ -d $$dir ] ; then \
-				(cd $$dir && $(MAKE)) || exit 1 ; \
-			fi \
-		done \
-	fi
+	@list='$(SUBDIRS)'; for dir in $$list ; do \
+		if [ -d $$dir ] ; then \
+			(cd $$dir && $(MAKE)) || exit 1 ; \
+		fi \
+	done
 
 # Dummy install target
 install:
 
 clean:
-	-...@if test -n "$(SUBDIRS)" ; then \
-		for dir in $(SUBDIRS) tests ; do \
-			if [ -d $$dir ] ; then \
-				(cd $$dir && $(MAKE) clean) ; \
-			fi \
-		done \
-	fi
+	@list='$(SUBDIRS)'; for dir in $$list tests ; do \
+		if [ -d $$dir ] ; then \
+			(cd $$dir && $(MAKE) clean) ; \
+		fi \
+	done
-- 
1.6.3.3

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to