Re: Where `gcc -MMD' puts .d files

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Alexander Klimov <ask(at)wisdom(dot)weizmann(dot)ac(dot)il>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Where `gcc -MMD' puts .d files
Date: 2001-05-08 16:57:06
Message-ID: Pine.LNX.4.30.0105081841010.759-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alexander Klimov writes:

> The point is that I do use gcc 2.95.2, and it puts .d file in the curent
> directory, not to the directory there files come from. Anyway, my patch
> solve the problem at least for me.

I see the problem, the port/Makefile needs some changes because it's
trying to put output files outside the current directory. Try this patch:

diff -c -r1.28 Makefile.in
*** Makefile.in 2000/12/11 00:49:54 1.28
--- Makefile.in 2001/05/08 16:42:20
***************
*** 22,29 ****
include $(top_builddir)/src/Makefile.global

OBJS = dynloader.o @INET_ATON@ @STRERROR@ @MISSING_RANDOM@ @SRANDOM@
! OBJS+= @GETHOSTNAME@ @GETRUSAGE@ @STRCASECMP@ @STRDUP@ @TAS@ @ISINF@
OBJS+= @STRTOL@ @STRTOUL@ @SNPRINTF@
ifeq ($(PORTNAME), qnx4)
OBJS += getrusage.o qnx4/SUBSYS.o
endif
--- 22,32 ----
include $(top_builddir)/src/Makefile.global

OBJS = dynloader.o @INET_ATON@ @STRERROR@ @MISSING_RANDOM@ @SRANDOM@
! OBJS+= @GETHOSTNAME@ @GETRUSAGE@ @STRCASECMP@ @TAS@ @ISINF@
OBJS+= @STRTOL@ @STRTOUL@ @SNPRINTF@
+ ifdef STRDUP
+ OBJS += $(top_builddir)/src/utils/strdup.o
+ endif
ifeq ($(PORTNAME), qnx4)
OBJS += getrusage.o qnx4/SUBSYS.o
endif
***************
*** 56,61 ****
--- 59,68 ----

tas.o: tas.s
$(CC) $(CFLAGS) -c $<
+
+ $(top_builddir)/src/utils/strdup.o:
+ $(MAKE) -C $(top_builddir)/src/utils strdup.o
+

distclean clean:
rm -f SUBSYS.o $(OBJS)
===snip

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kovacs Zoltan 2001-05-08 17:30:19 Re: incorrect query result using complex structures (views?)
Previous Message Peter Eisentraut 2001-05-08 16:55:37 Re: Is `#!/bin/sh' configurable?