Mail Archives: djgpp/1999/03/02/13:51:28
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.
- Raw text -