Date: Wed, 19 Jan 2000 10:02:57 +0200 (WET) From: Andris Pavenis To: Gisle Vanem cc: Eli Zaretskii , djgpp AT delorie DOT com Subject: Re: make depend In-Reply-To: <01a701bf6198$9fa72d80$293f8589@gv015029.bgo.nera.no> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 18 Jan 2000, Gisle Vanem wrote: > 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" > $@ Currently for DJGPP port of gcc-2.95.2 specs file is generated at build time by dumping builtin specs (gcc -dump-specs). So such way should work. However You can also make a copy of actual specs file and remove -imacros ... with sed (untested) $TMPDIR/specs:: cat $(shell gcc -print-file-name=specs) |\ sed -e 's|-imacros %s../include/sys/version.h||g' >$(TMPDIR)/specs > > 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! > Andris