delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/22/05:52:58

From: Richard Legner <rlegner AT whitehorse DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: MAKEing trouble
Date: Mon, 22 Feb 1999 02:18:03 -0600
Organization: Blackstone Janitorial Services
Lines: 43
Message-ID: <36D112BB.6C7678AA@whitehorse.net>
NNTP-Posting-Host: 199.247.227.195
Mime-Version: 1.0
X-Trace: 919678118 VRL06/YYIE3C3C7F7C usenet54.supernews.com
X-Complaints-To: newsabuse AT remarQ DOT com
X-Mailer: Mozilla 4.07 [en] (Win95; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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