Re: Coming attractions: VPATH build; make variables issue

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Coming attractions: VPATH build; make variables issue
Date: 2000-10-18 19:43:05
Message-ID: Pine.LNX.4.21.0010182135240.3228-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane writes:

> > dep depend:
> > $(CC) -MM $(CFLAGS) *.c >depend
>
> Why? Shouldn't CFLAGS include CPPFLAGS?

Nope. That's what it does now, but the implicit rule is

%.o: %.c
$(CC) -c $(CPPFLAGS) $(CFLAGS)

so if you set CFLAGS to include CPPFLAGS then you get all of it
double. So I have to fix all the rules to say

dep depend:
$(CC) -MM $(CPPFLAGS) $(CFLAGS) *.c >depend

I just notice that the workaround I had in mind won't work so well, so I
guess I'll have to fix it the hard way.

> These targets seem correct to me as they stand ... other than assuming
> CC is gcc, but nevermind that...

I'd be glad to add support for other compilers into the --enable-depend
mechanism, if someone supplies the details.

--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2000-10-18 19:44:46 Re: pgsql/doc (FAQ_MSWIN INSTALL_MSWIN)
Previous Message Travis Bauer 2000-10-18 18:28:37 Re: [HACKERS] pg_connect error