From: | Cédric Villemain <cedric(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | Marti Raudsepp <marti(at)juffo(dot)org>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net> |
Subject: | Re: PostgreSQL 9.3 beta breaks some extensions "make install" |
Date: | 2013-05-14 14:38:57 |
Message-ID: | 201305141639.07811.cedric@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Le mardi 14 mai 2013 10:17:13, Marti Raudsepp a écrit :
> On Tue, May 14, 2013 at 5:27 AM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> > On Tue, 2013-05-14 at 04:12 +0300, Marti Raudsepp wrote:
> >> It's caused by this common pattern in extension makefiles:
> >> DATA = $(wildcard sql/*--*.sql) sql/$(EXTENSION)--$(EXTVERSION).sql
> >
> > What is the point of this? Why have the wildcard and then the
> > non-wildcard term?
>
> Because the non-wildcard file is built by the same Makefile (it's
> copied from the sql/$(EXTENSION).sql file). If it wasn't there, a
> "make install" from a clean checkout would miss this file.
>
> all: sql/$(EXTENSION)--$(EXTVERSION).sql
>
> sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
> cp $< $@
There is also something else here, the addition of the all:.... target.
I believe it should be removed and the added target(s) be written after the
include of pgxs makefile.
If I follow your example, then I would rewrite http://manager.pgxn.org/howto
From
=====
PG91 = $(shell $(PG_CONFIG) --version | grep -qE " 8\.| 9\.0" && echo no ||
echo yes)
ifeq ($(PG91),yes)
all: sql/$(EXTENSION)--$(EXTVERSION).sql
sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
cp $< $@
DATA = $(wildcard sql/*--*.sql) sql/$(EXTENSION)--$(EXTVERSION).sql
EXTRA_CLEAN = sql/$(EXTENSION)--$(EXTVERSION).sql
endif
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
====
To
====
PG91 = $(shell $(PG_CONFIG) --version | grep -qE " 8\.| 9\.0" && echo no ||
echo yes)
ifeq ($(PG91),yes)
DATA = $(wildcard sql/*--*.sql) sql/$(EXTENSION)--$(EXTVERSION).sql
EXTRA_CLEAN = sql/$(EXTENSION)--$(EXTVERSION).sql
endif
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
ifeq ($(PG91),yes)
sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
cp $< $@
endif
====
because the default target from the PostgreSQL Makefile is «all:» and the
addition of a target before inclusion of PostgreSQL makefile change the default
(see DEFAULT_GOAL variable)
Thought ?
--
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2013-05-14 14:50:51 | Re: Parallel Sort |
Previous Message | Noah Misch | 2013-05-14 14:35:01 | Re: Parallel Sort |