Juergen Schmidt <[EMAIL PROTECTED]> writes: > has anybody an idea on this or can help me?
I am not sure this will actually help you but here it goes. GNU make makes some strange guesses (see make.c around line 99) when it comes to files in directories that do not exist. Consider for example the following /tmp/makefile: OUT=/tmp/out .PHONY: all all: $(OUT)/bin/foo $(OUT)/obj/%.o: %.c mkdir -p $(@D) gcc -o $@ -c $< $(OUT)/bin/%: $(OUT)/obj/%.o mkdir -p $(@D) gcc -o $@ $< (A side note: when you are submitting your example and it has to use absolute paths, make sure they all start from /tmp for a lot of people (including myself) will be lazy to go and create /usr/local/maketest just to try your example.) foo.c is in /tmp, make is run from /tmp. This makefile exhibits two different behaviors depending on whether /tmp/out exists or not. If /tmp/out exists (/tmp/out/bin and /tmp/out/obj do not exist) then everything works file. When /tmp/out does not exist make fails. I have to idea about the logic behind this. If you don't mind using non-main-line make you can get my -bk patchset where this bug (IMO, anyway) is fixed: http://kolpackov.net/projects/make/bk/ Also there is a generally better way to handle directory creation which is described here (works in main-line make): http://kolpackov.net/pipermail/notes/2004-January/000001.html hth, -boris _______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/bug-make