Contrib Makefiles

Started by Magnus Haganderabout 19 years ago3 messages
#1Magnus Hagander
mha@sollentuna.net
1 attachment(s)

A couple of the Makefiles in contrib don't define OBJS= as standard,
instead they define SRCS= and then a makefile rule for OBJS= that does a
replacement on that.

Is there any actual reason for that? If not, could the attached patch
please be applied to make them all look the same. I'm working on getting
the vcbuild stuff to properly build the contrib modules, and it would be
a whole lot easier if they all looked the same :)

(patch not actually tested on this box because I don't have msys
working, but it makes them look like the other ones..)

//Magnus

Attachments:

contrib_makefile.diffapplication/octet-stream; name=contrib_makefile.diffDownload
Index: contrib/fuzzystrmatch/Makefile
===================================================================
RCS file: c:/prog/cvsrepo/pgsql/pgsql/contrib/fuzzystrmatch/Makefile,v
retrieving revision 1.7
diff -c -r1.7 Makefile
*** contrib/fuzzystrmatch/Makefile	27 Feb 2006 12:54:38 -0000	1.7
--- contrib/fuzzystrmatch/Makefile	18 Oct 2006 13:27:30 -0000
***************
*** 1,8 ****
  # $PostgreSQL: pgsql/contrib/fuzzystrmatch/Makefile,v 1.6 2005/09/27 17:13:03 tgl Exp $
  
  MODULE_big = fuzzystrmatch
! SRCS += fuzzystrmatch.c dmetaphone.c
! OBJS = $(SRCS:.c=.o)
  DATA_built = fuzzystrmatch.sql
  DATA = uninstall_fuzzystrmatch.sql
  DOCS = README.fuzzystrmatch README.soundex
--- 1,7 ----
  # $PostgreSQL: pgsql/contrib/fuzzystrmatch/Makefile,v 1.6 2005/09/27 17:13:03 tgl Exp $
  
  MODULE_big = fuzzystrmatch
! OBJS = fuzzystrmatch.o dmetaphone.o
  DATA_built = fuzzystrmatch.sql
  DATA = uninstall_fuzzystrmatch.sql
  DOCS = README.fuzzystrmatch README.soundex
Index: contrib/pgrowlocks/Makefile
===================================================================
RCS file: c:/prog/cvsrepo/pgsql/pgsql/contrib/pgrowlocks/Makefile,v
retrieving revision 1.2
diff -c -r1.2 Makefile
*** contrib/pgrowlocks/Makefile	30 Sep 2006 18:08:32 -0000	1.2
--- contrib/pgrowlocks/Makefile	18 Oct 2006 13:40:02 -0000
***************
*** 6,15 ****
  #
  #-------------------------------------------------------------------------
  
- SRCS		= pgrowlocks.c
- 
  MODULE_big	= pgrowlocks
! OBJS		= $(SRCS:.c=.o)
  DOCS		= README.pgrowlocks README.pgrowlocks.euc_jp
  DATA_built	= pgrowlocks.sql
  DATA		= uninstall_pgrowlocks.sql
--- 6,13 ----
  #
  #-------------------------------------------------------------------------
  
  MODULE_big	= pgrowlocks
! OBJS		= pgrowlocks.o
  DOCS		= README.pgrowlocks README.pgrowlocks.euc_jp
  DATA_built	= pgrowlocks.sql
  DATA		= uninstall_pgrowlocks.sql
Index: contrib/pgstattuple/Makefile
===================================================================
RCS file: c:/prog/cvsrepo/pgsql/pgsql/contrib/pgstattuple/Makefile,v
retrieving revision 1.6
diff -c -r1.6 Makefile
*** contrib/pgstattuple/Makefile	2 Sep 2006 17:05:29 -0000	1.6
--- contrib/pgstattuple/Makefile	18 Oct 2006 13:41:07 -0000
***************
*** 6,15 ****
  #
  #-------------------------------------------------------------------------
  
- SRCS		= pgstattuple.c pgstatindex.c
- 
  MODULE_big	= pgstattuple
! OBJS		= $(SRCS:.c=.o)
  DOCS		= README.pgstattuple README.pgstattuple.euc_jp
  DATA_built	= pgstattuple.sql
  DATA      	= uninstall_pgstattuple.sql
--- 6,13 ----
  #
  #-------------------------------------------------------------------------
  
  MODULE_big	= pgstattuple
! OBJS		= pgstattuple.o pgstatindex.o
  DOCS		= README.pgstattuple README.pgstattuple.euc_jp
  DATA_built	= pgstattuple.sql
  DATA      	= uninstall_pgstattuple.sql
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Magnus Hagander (#1)
Re: Contrib Makefiles

"Magnus Hagander" <mha@sollentuna.net> writes:

A couple of the Makefiles in contrib don't define OBJS= as standard,
instead they define SRCS= and then a makefile rule for OBJS= that does a
replacement on that.

Is there any actual reason for that?

Can't see one.

If not, could the attached patch
please be applied to make them all look the same.

Done, but what about pgcrypto? You may not have a choice but to have a
special case for that one, though, seeing it builds its list on the fly.

regards, tom lane

#3Magnus Hagander
mha@sollentuna.net
In reply to: Tom Lane (#2)
Re: [PATCHES] Contrib Makefiles

A couple of the Makefiles in contrib don't define OBJS= as

standard,

instead they define SRCS= and then a makefile rule for

OBJS= that does

a replacement on that.

Is there any actual reason for that?

Can't see one.

Ok. Thanks.

If not, could the attached patch
please be applied to make them all look the same.

Done, but what about pgcrypto? You may not have a choice but
to have a special case for that one, though, seeing it builds
its list on the fly.

Yeah, it's currently on my list of "not yet done" parts. I'm also
thinking there's a very large probability that I'll have to special-case
it.

//Magnus