Consider the following makefile:
foo :
mkdir foo
foo/a.out : foo a.in
cp a.in foo/a.out
foo/b.out : foo b.in
cp b.in foo/b.out
an
As an authority on Make recently pointed out:
"The one thing you must NEVER do is use a directory as a simple prerequisite. The rules the filesystem uses to update the modified time on directories do not work well with make."
But I think this will do what you want:
foo :
mkdir foo
foo/a.out : a.in | foo
cp a.in foo/a.out
foo/b.out : b.in | foo
cp b.in foo/b.out