delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/18/15:40:25

Message-ID: <01a701bf6198$9fa72d80$293f8589@gv015029.bgo.nera.no>
From: "Gisle Vanem" <gvanem AT eunet DOT no>
To: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
Cc: <djgpp AT delorie DOT com>
Subject: Re: make depend
Date: Tue, 18 Jan 2000 10:44:31 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp AT delorie DOT com

>> > 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.
>
>Are you sure you edited the right specs file?  If -imacros is gone,
>and the dependency is still there, it probably means that this is
>somehow built into GCC's code, but I don't think this is true.

I repeated the try now here at work. And that worked!!
Better check out my setup at home...

>> I could always add an extra sed command to remove
>> "$(DJDIR)/lib/../include/sys/version.h"
>
>That's what I would suggest also.


I  got another idea; force gcc (and the cpp stage) to use a 
specific 'specs' file. I tried this hack:

  $(TMPDIR)/specs::
          echo "*cpp: %(cpp_cpu) %{posix:-D_POSIX_SOURCE} -remap" > $@

  depend: $(TMPDIR)/specs
        @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) -specs=$(TMPDIR)/specs -MM $(CFLAGS) $(SRC)   >> Makefile.dj

Which works!

Gisle V.

- Raw text -


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