delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/11/09:33:40

Date: Mon, 11 Oct 1999 12:17:50 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Kalum Somaratna <kalum AT myflat DOT com>
cc: djgpp AT delorie DOT com, Robert Hoehne <robert DOT hoehne AT gmx DOT net>
Subject: RE: Please Help. RHIDE generated makefiles don't support dependencies?
In-Reply-To: <199910110147.TAA06057@lakdiva.slt.lk>
Message-ID: <Pine.SUN.3.91.991011121709.28307A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 10 Oct 1999, Kalum Somaratna wrote:

> And I did the following as you suggested-:
> 
> GNU Make version 3.77   
> MAKE.EXE       185,856  08-14-98 10:12a

This is the latest version.

> RHIDE  version 1.4

This is not: the latest is 1.4.7; perhaps the problem I found (see
below) is corrected there.

> test.h still doesn't appear anywhere in the output of make (I did a 
> search for test.h in makedump and could't find it)

Here's the relevant part of the Makefile:

> all:: test.exe
> DEPS_0=\
> 		d:/paint/test.o				<<<<<<<<
> NO_LINK=
> LINK_FILES=$(filter-out $(NO_LINK),$(DEPS_0))
> test.exe:: $(DEPS_0)
> 	$(RHIDE_COMPILE_LINK)
> DEPS_1=test.cpp\
> 		j:/djgpp/include/stdio.h\
> 		j:/djgpp/include/sys/djtypes.h\
> 		j:/djgpp/include/sys/version.h\
> 		d:/paint/test.h
> test.o:: $(DEPS_1)
> 	$(RHIDE_COMPILE.cpp.o)

The problem is in the dependency marked with "<<<<<<<<".  It names the
full pathname of test.o, whereas the dependency for test.o uses just
"test.o".  How's Make supposed to know these two are one and the same
file?  Make is just a text-processing program, as far as reading the
Makefile is considered.

If I change d:/paint/test.o to test.o, everything works like you'd
expect.

Now, I don't know if this is a bug in RHIDE (I don't use RHIDE myself)
or your own usage error.  I'd guess that RHIDE gets these dependencies
by processing the output of "gcc -M", which outputs the full pathnames
of the files.  In that case, I'd think RHIDE needs to name the targets
(like test.exe, test.o, test.cpp in this case) with their full
pathnames as well, to prevent such cases.

- Raw text -


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