Date: Tue, 2 Mar 1999 18:22:10 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: nygren AT tecnet1 DOT jcte DOT jcs DOT mil cc: djgpp AT delorie DOT com Subject: Re: DJGPP Ma v3.77 recursion bug In-Reply-To: <199903012055.PAA28011@huey.nawcad.navy.mil> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Mon, 1 Mar 1999 nygren AT tecnet1 DOT jcte DOT jcs DOT mil wrote: > I have a rule in a makefile in the root directory called R. > I have a rule in a makefile in a subdirectory called S. > R depends upon S > I type make at the root directory prompt > When it makes R, make properly changes directories to the subdirectory > Make tells me it went into the subdirectory > Make executes rule S > Make tells me it went back to the root directory (**I think its lying**) Why do you think it's lying? Can you insert a command into the Makefile that prints the directory, and see? Make always returns to the original directory after it finishes its job. This is so for the DJGPP port as well. If you think this isn't working for you, please post the shortest Makefile which demonstrates the problem. > I think make is erroneously finishing executing rule R in the subdirectory, > instead of the root directory, because I found rule R's partial target file > in the subdirectory instead of the root directory. I think you failed to describe too many fine details of your case, and therein be dragons. Throw together the shortest test case which exhibits the problem, and post it here.