delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/04/02:10:52

Date: Sun, 4 Feb 1996 09:01:49 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: coomar AT iitk DOT ernet DOT in
Cc: djgpp AT delorie DOT com
Subject: Re: Problem with make

On Thu, 1 Feb 1996 coomar AT iitk DOT ernet DOT in wrote:

>         libraries: config.h
>                 (cd sources; make)
> 
> when I type  'make libraries', It takes the line (cd sources; make) as single
> line and hence gives 'BAD COMMAND OR FILENAME' message. I am running it on
> DOS 6.22. Same problem happens with gnu make 3.7.1 also. Any solutions?

Yes.  Rewrite that line to be these 3 lines:

	libraries: config.h
		cd sources
		make
		cd ..

That line assumes you use a Unix shell which can execute multi-command 
lines, and also (implicitly) assumes that when that line finishes, you 
are back in your original directory, because on Unix, the current working 
directory is local to the program that executes, rather than global.  
That is why, for a Unix system, writing that line as 2 or 3 lines won't 
work, because the shell that executes the `cd' line exits and the next 
`make' command is run in the original directory, not in sources.

- Raw text -


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