delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/17/16:03:08

Date: Mon, 17 Jan 2000 21:24:15 +0100 (MET)
From: Gisle Vanem <giva AT bryggen DOT bgnett DOT no>
To: djgpp AT delorie DOT com
Subject: Re: make depend
Message-ID: <Pine.UW2.3.95.1000117212306.28382A-100000@bryggen.bgnett.no>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> said:

>> Ever since installing gcc 2.95.2 (and djgpp 2.03), 'make depend' targets always
>> includes extra files from $DJDIR/include. Example:
>>
>>   charpool.o: charpool.c e:/djgpp/lib/../include/sys/version.h \
>>    charpool.h utils.h error.h
>
> Please show at least one example of your `depend' targets, it's very hard
> to help you without seeing how you invoke the compiler.

Though you read this between the lines :) But for the record:

  SRC = file1.c file2.c  ...
  CFLAGS = -I../../inc -g -Wall -O2 -m486

  depend:
        @copy Makefile.dj Makefile.bak
        sed -e "/^# DO NOT DELETE THIS LINE/,$$d" < Makefile.bak > Makefile.dj
        echo "# DO NOT DELETE THIS LINE" >> Makefile.dj
        $(CC) -MM $(CFLAGS) $(SRC)       >> Makefile.dj

> I don't think so.  I suspect that it's the result of adding this to
> specs:  -imacros %s../include/sys/version.h.
> Please try editing this out of specs and see if the problem goes away.

Didn't help. Also tried adding -MG switch with same result.

> .. If not, perhaps we need to ask for such a
> switch.  (Or perhaps you could view this as a feature: a different libc
> version does require to recompile, right? ;-)

Not only that. If I distribute the makefile, the user must probably run
"make depend" again (requiring sed to be installed with additional complains
as a result). I could always add an extra sed command to remove
"$(DJDIR)/lib/../include/sys/version.h"

Gisle V.

- Raw text -


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