Hi John,

On 6/29/2009 1:44 PM, Ralf Wildenhues wrote:
Hello John,

* johnwohlb...@gmail.com wrote on Mon, Jun 29, 2009 at 09:36:09PM CEST:
in top/lib/Makefile.am
SUBDIRS = pika_comm pika_utilities
# provide a separate recursive target for making tests
tests : all
echo `pwd`;
for dir in $(SUBDIRS); do \
cd $$dir&&  $(MAKE) $(AM_MAKEFLAGS) $@ || exit 1; \
done
echo `pwd`;
.PHONY : tests

You don't ever 'cd' back out of the first subdirectory, so you can't
find the second:
Ralf is correct, of course. In my online catalog of solutions, I'd copied and modified this code from an Automake-generated Makefile. But I inadvertently left the parentheses off the cd command line, which would have invoked the entire line in a sub-shell:

for dir in $(SUBDIRS); do \
  (cd $$dir&&  $(MAKE) $(AM_MAKEFLAGS) $@ || exit 1) \
done


Sorry for the confusion.

John

Reply via email to