www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/23/10:22:19

Date: Fri, 23 Oct 1998 16:20:01 +0100 (BST)
From: George Foot <george DOT foot AT merton DOT oxford DOT ac DOT uk>
To: "djgpp AT delorie DOT com" <djgpp AT delorie DOT com>
Subject: Re: Recursive make: portable technique?
In-Reply-To: <362FF086.BDA6266C@montana.com>
Message-ID: <Pine.OSF.4.05.9810231618190.19056-100000@sable.ox.ac.uk>
MIME-Version: 1.0
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019