From d52ded98b1aa588c4cd9c7845f9bc6635d15557a Mon Sep 17 00:00:00 2001 From: Sean Evans Date: Wed, 20 May 2026 12:03:10 -0400 Subject: [PATCH] Handle missing PGXS gracefully for test targets --- makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/makefile b/makefile index f0f6d6a..e3459de 100644 --- a/makefile +++ b/makefile @@ -5,6 +5,7 @@ EXTVERSION = 0.4.0 PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) +HAVE_PGXS := $(if $(wildcard $(PGXS)),1,0) # PostgreSQL connection defaults for local development/testing. PGDATABASE ?= postgres @@ -53,7 +54,11 @@ TESTS := $(CORE_TESTS) $(INTEGRATION_TESTS) $(PERFORMANCE_TESTS) REGRESS := $(notdir $(basename $(TESTS))) REGRESS_OPTS = --inputdir=test +ifeq ($(HAVE_PGXS),1) include $(PGXS) +else +$(warning PGXS makefile not found at $(PGXS); build/install targets are unavailable in this environment.) +endif .PHONY: test test-core test-integration test-performance test-all test-one test-one-verbose