From 21f6919d91a942f62ac7fc471c018cb0a01ce43e Mon Sep 17 00:00:00 2001 From: Joe Ayers Date: Thu, 17 Nov 2022 10:31:56 -0500 Subject: [PATCH 1/3] restore Windows compatibility in Makefile --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 05dd0f7..768db32 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,16 @@ REGRESS = set_user LDFLAGS_SL += $(filter -lm, $(LIBS)) +ifdef USE_PGXS PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) +else +subdir = contrib/set_user +top_builddir = ../.. +include $(top_builddir)/src/Makefile.global +include $(top_srcdir)/contrib/contrib-global.mk +endif .PHONY: install-headers uninstall-headers From 679c5679dc34ab09cc415866c1caeb26bc203784 Mon Sep 17 00:00:00 2001 From: Joe Ayers Date: Mon, 21 Nov 2022 12:51:37 -0500 Subject: [PATCH 2/3] make USE_PGXS case the default, make specific case for Windows builds --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 768db32..dcb1c01 100644 --- a/Makefile +++ b/Makefile @@ -8,15 +8,15 @@ REGRESS = set_user LDFLAGS_SL += $(filter -lm, $(LIBS)) -ifdef USE_PGXS -PG_CONFIG = pg_config -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -else +ifdef WINDOWS_DISUSE_PGXS subdir = contrib/set_user top_builddir = ../.. include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk +else +PG_CONFIG = pg_config +PGXS := $(shell $(PG_CONFIG) --pgxs) +include $(PGXS) endif .PHONY: install-headers uninstall-headers From 29cbcc6a1fc24597421741ab23a079c34ff5fd83 Mon Sep 17 00:00:00 2001 From: Joe Ayers Date: Mon, 21 Nov 2022 15:58:38 -0500 Subject: [PATCH 3/3] add NO_PGXS option flag to Makefile --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dcb1c01..ff7eb7a 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ REGRESS = set_user LDFLAGS_SL += $(filter -lm, $(LIBS)) -ifdef WINDOWS_DISUSE_PGXS +ifdef NO_PGXS subdir = contrib/set_user top_builddir = ../.. include $(top_builddir)/src/Makefile.global