10000 Revert "Backpatch pgxs vpath build and installation fixes (v2)" · sqlparser/postgres@7a80aaf · GitHub
[go: up one dir, main page]

Skip to content

Commit 7a80aaf

Browse files
committed
Revert "Backpatch pgxs vpath build and installation fixes (v2)"
This reverts commit dd9abd3. pending resolution of http://www.postgresql.org/message-id/1381193255.25702.4.camel@vanquo.pezone.net
1 parent df9ede9 commit 7a80aaf

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

8068
# These might be set in Makefile.global, but if they were not found
8169
# during the build of PostgreSQL, supply default values so that users
@@ -124,40 +112,33 @@ all: all-lib
124112
endif # MODULE_big
125113

126114

127-
install: all installdirs installcontrol installdata installdatatsearch installdocs installscripts
128-
ifdef MODULES
129-
$(INSTALL_SHLIB) $(addsuffix $(DLSUFFIX), $(MODULES)) '$(DESTDIR)$(pkglibdir)/'
130-
endif # MODULES
131-
ifdef PROGRAM
132-
$(INSTALL_PROGRAM) $(PROGRAM)$(X) '$(DESTDIR)$(bindir)'
133-
endif # PROGRAM
134-
135-
installcontrol: $(addsuffix .control, $(EXTENSION)) | installdirs
115+
install: all installdirs
136116
ifneq (,$(EXTENSION))
137-
$(INSTALL_DATA) $^ '$(DESTDIR)$(datadir)/extension/'
138-
endif
139-
140-
installdata: $(DATA) $(DATA_built) | installdirs
117+
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(addsuffix .control, $(EXTENSION))) '$(DESTDIR)$(datadir)/extension/'
118+
endif # EXTENSION
141119
ifneq (,$(DATA)$(DATA_built))
142-
$(INSTALL_DATA) $^ '$(DESTDIR)$(datadir)/$(datamoduledir)/'
143-
endif
144-
145-
installdatatsearch: $(DATA_TSEARCH) | installdirs
120+
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(DATA)) $(DATA_built) '$(DESTDIR)$(datadir)/$(datamoduledir)/'
121+
endif # DATA
146122
ifneq (,$(DATA_TSEARCH))
147-
$(INSTALL_DATA) $^ '$(DESTDIR)$(datadir)/tsearch_data/'
148-
endif
149-
150-
installdocs: $(DOCS) | installdirs
123+
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(DATA_TSEARCH)) '$(DESTDIR)$(datadir)/tsearch_data/'
124+
endif # DATA_TSEARCH
125+
ifdef MODULES
126+
$(INSTALL_SHLIB) $(addsuffix $(DLSUFFIX), $(MODULES)) '$(DESTDIR)$(pkglibdir)/'
127+
endif # MODULES
151128
ifdef DOCS
152129
ifdef docdir
153-
$(INSTALL_DATA) $^ '$(DESTDIR)$(docdir)/$(docmoduledir)/'
130+
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(DOCS)) '$(DESTDIR)$(docdir)/$(docmoduledir)/'
154131
endif # docdir
155132
endif # DOCS
156-
157-
installscripts: $(SCRIPTS) $(SCRIPTS_built) | installdirs
133+
ifdef PROGRAM
134+
$(INSTALL_PROGRAM) $(PROGRAM)$(X) '$(DESTDIR)$(bindir)'
135+
endif # PROGRAM
158136
ifdef SCRIPTS
159-
$(INSTALL_SCRIPT) $^ '$(DESTDIR)$(bindir)/'
137+
$(INSTALL_SCRIPT) $(addprefix $(srcdir)/, $(SCRIPTS)) '$(DESTDIR)$(bindir)/'
160138
endif # SCRIPTS
139+
ifdef SCRIPTS_built
140+
$(INSTALL_SCRIPT) $(SCRIPTS_built) '$(DESTDIR)$(bindir)/'
141+
endif # SCRIPTS_built
161142

162143
ifdef MODULE_big
163144
install: install-lib
@@ -282,7 +263,6 @@ test_files_build := $(patsubst $(srcdir)/%, $(abs_builddir)/%, $(test_files_src)
282263

283264
all: $(test_files_build)
284265
$(test_files_build): $(abs_builddir)/%: $(srcdir)/%
285-
$(MKDIR_P) $(dir $@)
286266
ln -s $< $@
287267
endif # VPATH
288268

0 commit comments

Comments
 (0)
0