> Moving the mkdir into the recipe for depend.mk does not change the behavior; > however, removing objdir from the depends of depend.mk does.
Generally, making things depend on the directory in which they exist is A Bad Idea. Creating any file in the directory changes the directory, hence forces recreation of everything that depends on it, which is seldom the right thing to do. If the directory contains two files that each depend on it, recreating either changes the directory so makes the other out of date: this (to my surprise) doesn't usually cause make to spin, but it does cause every build to remake both files, wantonly The way I handle this is by having a touch-file $D/.esists, that I create when I mkdir; things that depend on the directory's existence so that they can be created depend instead on the .exists file, whose rule does the mkdir -p for the directory, then touches .exists in it; search in page for ".exists" at http://www.chaos.org.uk/~eddy/craft/make.html Eddy. _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make