delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/22/07:30:04

Date: Mon, 22 Feb 1999 18:15:14 +0530 (IST)
From: "Raju K.V" <rajukv AT wipinfo DOT soft DOT net>
X-Sender: rajukv AT tagore
To: djgpp AT delorie DOT com
Subject: Re: MAKEing trouble
In-Reply-To: <36D112BB.6C7678AA@whitehorse.net>
Message-ID: <Pine.SV4.3.93.990222181325.1666A-100000@tagore>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

I think you should write the first line as
list.exe: list.o swap.o
saying ur list.exe is dependent on list.o and swap.o.

Raju

On Mon, 22 Feb 1999, Richard Legner wrote:

> Hello again,
> 
> I have recently started to experiment with Make.
> 
> I created the following makefile:
> 
> #make list.exe
> list.exe: list.cpp swap.cpp
> 	gxx -o list.exe list.o swap.o
> swap.o: swap.cpp
> 	gcc -c swap.cpp
> list.o: list.cpp
> 	gcc -c list.cpp
> 
> The problem:
> 
> When I run Make, it only looks at the first dependency and executes the
> first command (gxx -o list.exe list.o swap.o)
> 
> Notes:
> 
> 1) when I first ran it, it reported 'no such file or directory' error
> with respect to list.o and swap.o
> 
> 2) I manually created the above object files (for debugging purposes)
> and now the executable gets built when I run make.
> 
> 3) when I run Make twice in a row (without modifying the two object
> files in between , it still rebuilds the executable.
> 
> 4) when I make changes to list.cpp and swap.cpp and then run Make, the
> executable gets rebuilt with the old abject files (Make does not update
> the object files with the most recent changes to cpp files)
> 
> 5) I am not changing the system time - that is not the problem.
> 
> 6) Yes, those are actual TAB characters in front of the commands, not
> spaces :)
> 
> Where is the problem?
> 
> It looks like make does not proceed beyond the first command line.  How
> do I fix this?
> 

- Raw text -


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