From a3c0b02243f61bea5ac47bb3049a906e88d3602d Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Sun, 26 Jul 2026 14:25:46 -0500 Subject: [PATCH] Fix make pgtle PGTLE_VERSION=X being silently ignored (#65) base.mk's pgtle target never forwarded the PGTLE_VERSION make variable to pgtle.sh's --pgtle-version flag, so `make pgtle PGTLE_VERSION=1.5.0+` generated all three version ranges instead of just the one requested, despite this being the documented usage in CLAUDE.md. Related changes in pgxntool-test: - Added a BATS test asserting `make pgtle PGTLE_VERSION=1.5.0+` only generates the requested version range's output file Co-Authored-By: Claude --- HISTORY.asc | 7 +++++++ base.mk | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/HISTORY.asc b/HISTORY.asc index b0894da..8c28614 100644 --- a/HISTORY.asc +++ b/HISTORY.asc @@ -1,3 +1,10 @@ +STABLE +------ +== Fix `make pgtle PGTLE_VERSION=X` generating all versions instead of one +`base.mk`'s `pgtle` target never passed the `PGTLE_VERSION` make variable +through to `pgtle.sh --pgtle-version`, so it silently generated all pg_tle +version ranges regardless of the value given on the command line. + 2.1.0 ----- == Fix setup.sh / pgxntool-sync.sh / update-setup-files.sh inside a git worktree diff --git a/base.mk b/base.mk index a7ab93c..3d5c1fd 100644 --- a/base.mk +++ b/base.mk @@ -328,11 +328,12 @@ PGXNTOOL_EXTENSIONS = $(basename $(PGXNTOOL_CONTROL_FILES)) # Depend on 'all' to ensure versioned SQL files are generated first # Depend on control.mk (which defines EXTENSION_VERSION_FILES) # Depend on control files explicitly so changes trigger rebuilds -# Generates all supported pg_tle versions for each extension +# Generates all supported pg_tle versions for each extension, unless +# PGTLE_VERSION is set on the command line to limit output to one range .PHONY: pgtle pgtle: all control.mk $(PGXNTOOL_CONTROL_FILES) @$(foreach ext,$(PGXNTOOL_EXTENSIONS),\ - $(PGXNTOOL_DIR)/pgtle.sh --extension $(ext);) + $(PGXNTOOL_DIR)/pgtle.sh --extension $(ext) $(if $(PGTLE_VERSION),--pgtle-version $(PGTLE_VERSION));) # # pg_tle installation support