Skip to content

Commit 791a71a

Browse files
committed
Revert "Backpatch pgxs vpath build and installation fixes (v2)"
This reverts commit 176c70b. pending resolution of http://www.postgresql.org/message-id/1381193255.25702.4.camel@vanquo.pezone.net
1 parent 56e90da commit 791a71a

File tree

2 files changed

+19
-49
lines changed

2 files changed

+19
-49
lines changed

src/Makefile.global.in

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -415,22 +415,12 @@ else
415415
libpq_pgport = -L$(top_builddir)/src/port -lpgport $(libpq)
416416
endif
417417

418-
# If PGXS is not defined, build libpq and libpgport dependancies as required.
419-
# If the build is with PGXS, then these are supposed to be already built and
420-
# installed, and we just ensure that the expected files exist.
421-
ifndef PGXS
418+
422419
submake-libpq:
423420
$(MAKE) -C $(libpq_builddir) all
424-
else
425-
submake-libpq: $(libdir)/libpq.so ;
426-
endif
427421

428-
ifndef PGXS
429422
submake-libpgport:
430423
$(MAKE) -C $(top_builddir)/src/port all
431-
else
432-
submake-libpgport: $(libdir)/libpgport.a
433-
endif
434424

435425
.PHONY: submake-libpq submake-libpgport
436426

src/makefiles/pgxs.mk

Lines changed: 18 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,8 @@ top_builddir := $(dir $(PGXS))../..
6262
include $(top_builddir)/src/Makefile.global
6363

6464
top_srcdir = $(top_builddir)
65-
# If USE_VPATH is set or Makefile is not in current directory we are building
66-
# the extension with VPATH so we set the variable here
67-
ifdef USE_VPATH
68-
srcdir = $(USE_VPATH)
69-
VPATH = $(USE_VPATH)
70-
else
71-
ifeq ($(CURDIR),$(dir $(firstword $(MAKEFILE_LIST))))
7265
srcdir = .
7366
VPATH =
74-
else
75-
srcdir = $(dir $(firstword $(MAKEFILE_LIST)))
76-
VPATH = $(srcdir)
77-
endif
78-
endif
7967
endif
8068

8169

@@ -114,40 +102,33 @@ all: all-lib
114102
endif # MODULE_big
115103

116104

117-
install: all installdirs installcontrol installdata installdatatsearch installdocs installscripts
118-
ifdef MODULES
119-
$(INSTALL_SHLIB) $(addsuffix $(DLSUFFIX), $(MODULES)) '$(DESTDIR)$(pkglibdir)/'
120-
endif # MODULES
121-
ifdef PROGRAM
122-
$(INSTALL_PROGRAM) $(PROGRAM)$(X) '$(DESTDIR)$(bindir)'
123-
endif # PROGRAM
124-
125-
installcontrol: $(addsuffix .control, $(EXTENSION)) | installdirs
105+
install: all installdirs
126106
ifneq (,$(EXTENSION))
127-
$(INSTALL_DATA) $^ '$(DESTDIR)$(datadir)/extension/'
128-
endif
129-
130-
installdata: $(DATA) $(DATA_built) | installdirs
107+
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(addsuffix .control, $(EXTENSION))) '$(DESTDIR)$(datadir)/extension/'
108+
endif # EXTENSION
131109
ifneq (,$(DATA)$(DATA_built))
132-
$(INSTALL_DATA) $^ '$(DESTDIR)$(datadir)/$(datamoduledir)/'
133-
endif
134-
135-
installdatatsearch: $(DATA_TSEARCH) | installdirs
110+
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(DATA)) $(DATA_built) '$(DESTDIR)$(datadir)/$(datamoduledir)/'
111+
endif # DATA
136112
ifneq (,$(DATA_TSEARCH))
137-
$(INSTALL_DATA) $^ '$(DESTDIR)$(datadir)/tsearch_data/'
138-
endif
139-
140-
installdocs: $(DOCS) | installdirs
113+
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(DATA_TSEARCH)) '$(DESTDIR)$(datadir)/tsearch_data/'
114+
endif # DATA_TSEARCH
115+
ifdef MODULES
116+
$(INSTALL_SHLIB) $(addsuffix $(DLSUFFIX), $(MODULES)) '$(DESTDIR)$(pkglibdir)/'
117+
endif # MODULES
141118
ifdef DOCS
142119
ifdef docdir
143-
$(INSTALL_DATA) $^ '$(DESTDIR)$(docdir)/$(docmoduledir)/'
120+
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(DOCS)) '$(DESTDIR)$(docdir)/$(docmoduledir)/'
144121
endif # docdir
145122
endif # DOCS
146-
147-
installscripts: $(SCRIPTS) $(SCRIPTS_built) | installdirs
123+
ifdef PROGRAM
124+
$(INSTALL_PROGRAM) $(PROGRAM)$(X) '$(DESTDIR)$(bindir)'
125+
endif # PROGRAM
148126
ifdef SCRIPTS
149-
$(INSTALL_SCRIPT) $^ '$(DESTDIR)$(bindir)/'
127+
$(INSTALL_SCRIPT) $(addprefix $(srcdir)/, $(SCRIPTS)) '$(DESTDIR)$(bindir)/'
150128
endif # SCRIPTS
129+
ifdef SCRIPTS_built
130+
$(INSTALL_SCRIPT) $(SCRIPTS_built) '$(DESTDIR)$(bindir)/'
131+
endif # SCRIPTS_built
151132

152133
ifdef MODULE_big
153134
install: install-lib
@@ -272,7 +253,6 @@ test_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(test_files_src)
272253

273254
all: $(test_files_build)
274255
$(test_files_build): $(abs_builddir)/%: $(srcdir)/%
275-
$(MKDIR_P) $(dir $@)
276256
ln -s $< $@
277257
endif # VPATH
278258

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy