Date: Fri, 23 Oct 1998 16:20:01 +0100 (BST) From: George Foot To: "djgpp AT delorie DOT com" Subject: Re: Recursive make: portable technique? In-Reply-To: <362FF086.BDA6266C@montana.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Thu, 22 Oct 1998, bowman wrote: > On a straight DOS system with only command.com for a shell, make will > fail after > > cd ../new_dir; $(MAKE) > > I found that doing an explicit cd ../original_dir fixed the problem, > and there were a few exchanges about this in the archives that indicated > this was the case. > > I ran a small test using this hack with bash available, and pointed to > by SHELL, and it still seemed to work. > > So, my question, is the explicit cd safe in all configurations, or will > I get burnt? I think the standard thing is for Make to return to the current directory before executing each line, but that the DOS port behaves differently for some reasons. Is there a reason why you don't want to do "$(MAKE) -C new_dir"? -- george DOT foot AT merton DOT oxford DOT ac DOT uk xu do tavla fo la lojban -- http://xiron.pc.helsinki.fi/lojban/lojban.html