On Tue, Nov 24, 2009 at 3:55 PM, tom fogal <[email protected]> wrote: > Dan Nicholson <[email protected]> writes: >> On Tue, Nov 24, 2009 at 12:37 PM, tom fogal <[email protected]> wrote: >> > Dan Nicholson <[email protected]> writes: >> >> On Thu, Nov 19, 2009 at 8:28 AM, Brian Paul <[email protected]> wrote: >> >> > tom fogal wrote: >> >> >> Brian Paul <[email protected]> writes: >> >> >>> Please test and report any problems ASAP. If there aren't any issues >> >> >>> we'd like to release 7.6.1 on Friday or Saturday. >> > [snip] >> >> >> Secondly, the AIX build is failing in progs/Makefile. >> > >> > PROGRAM_DIRS = >> > ^ (there's a space here [1] ;) >> > >> > in a config/ though. *shrug*. As I said, it doesn't matter much for >> > me. >> >> Actually, I don't know why this is a problem. On my system with GNU >> make (which you're using, too) having just spaces after the = gets >> stripped. > > We're using the native make on AIX, not GNU make. > > Speaking of which, I guess AIX make *does* support $(strip ...). > >> $ cat > Makefile << "EOF" >> DIRS = # bunch of spaces here >> SUBDIRS = $(DIRS) >> dirs: >> @echo '"$(SUBDIRS)"' >> @test -n "$(SUBDIRS)" && echo non-empty || echo empty >> EOF >> $ make dirs > > This test does in fact work fine. > > However, if you do: > �...@for d in "$(SUBDIRS)" ; do \ > echo "$$d" \ > done > after the @test -n line, AIX make chokes. > >> What is the actual error you're seeing? > > -bash-3.00$ cat Makefile > DIRS = > SUBDIRS = $(DIRS) > dirs: > �...@echo '"$(SUBDIRS)"' > �...@test -n "$(SUBDIRS)" && echo non-empty || echo empty > �...@for dir in $(SUBDIRS) ; do \ > echo "$$dir" \ > done > -bash-3.00$ make > "" > empty > /usr/bin/sh: 0403-057 Syntax error at line 1 : `;' is not expected. > make: 1254-004 The error code from the last command is 2. > > > Stop. > -bash-3.00$ > > If I quote the $(SUBDIRS) in the @for line, I get the error "`for' is > not matched.".
Yeah, both errors are because of the AIX shell. It's not as resilient to poorly constructed loops as bash, I guess. >> 31f7e8efb25a77e3bdfb6e9850cf31e339060976 is definitely correct as the >> quotes would cause all the directories to be a single argument. Can >> you try the automake way, which I believe is used to workaround this >> exact issue? It constructs the for loop using a shell variable instead >> of a make variable. >> >> subdirs: >> @list='$(SUBDIRS)'; for dir in $$list; do echo $$dir; done > > This works great with AIX (and of course GNU) make. > >> >> Tom, what arguments do you pass to configure? >> > >> > FWIW on AIX we do something like this: >> > >> > ./configure CC=xlc CXX=xlC CFLAGS=-qcpluscmt -qlanglvl=extc99 >> > -DUSE_MGL_NAMESPACE CXXFLAGS=-DUSE_MGL_NAMESPACE >> > --prefix=/usr/common/homes/f/fogal1/sw >> > --without-demos --with-driver=xxx --disable-gallium --with-max-width=16384 >> > --with-max-height=16384 --disable-glw --disable-glu --disable-egl >> > >> > Except it happens twice, the first time with xxx=xlib and the latter >> > with xxx=osmesa. If you're *really* curious, see the function >> > 'build_mesa' in: >> > >> > http://portal.nersc.gov/svn/visit/trunk/src/svn_bin/build_visit >> >> That's strange since --without-demos will substitute PROGRAM_DIRS="". >> I think there's something else funky going on. > > The issue is SUBDIRS = $(PROGRAM_DIRS) in progs/Makefile, I think (but > haven't verified). That seems to cause AIX make to think that SUBDIRS > is a string with a single space, which != the empty string, and thus > the test -n fails. > > 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]> -- Dan ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Mesa3d-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
