* David Kastrup (2005-06-09) writes: > Ralf Angeli <[EMAIL PROTECTED]> writes: > >> +DESCEND=if test -n "$(subdirs)"; then OLDPWD="`pwd`";for i in >> ""$(subdirs);do cd $$i;echo "Descending into `pwd`";$(MAKE) >> 'DESTDIR=$(DESTDIR)' PACKAGE=$(PACKAGE) $@ || exit $$?;cd $$OLDPWD;echo >> "Ascending into $$OLDPWD";done;fi >> > > One note here: avoid "if" in Makefile rules, rather use the > short-circuit operators || and &&. The reason is that not all Bourne > shells return "success" for "if false", causing "make" to bomb out.
I guess the something like the following should work. DESCEND=test -n "$(subdirs)" && (OLDPWD="`pwd`";for i in ""$(subdirs);do cd $$i;echo "Descending into `pwd`";$(MAKE) 'DESTDIR=$(DESTDIR)' PACKAGE=$(PACKAGE) $@ || exit $$?;cd $$OLDPWD;echo "Ascending into $$OLDPWD";done) > The alternative is to put in > > else : > > at the end. Yes, this is idiotic. "else :"? Never heard of that. -- Ralf _______________________________________________ auctex-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/auctex-devel
