Re: Coming attractions: VPATH build; make variables issue - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Coming attractions: VPATH build; make variables issue
Date
Msg-id Pine.LNX.4.21.0010182135240.3228-100000@peter.localdomain
Whole thread Raw
In response to Re: Coming attractions: VPATH build; make variables issue  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@gmx.net       http://yi.org/peter-e/



pgsql-hackers by date:

Previous
From: Brian Edginton
Date:
Subject: pg_connect error
Next
From: Peter Eisentraut
Date:
Subject: Re: [COMMITTERS] pgsql/doc (FAQ_MSWIN INSTALL_MSWIN)