diff --git a/HISTORY.asc b/HISTORY.asc index 5306249..8440012 100644 --- a/HISTORY.asc +++ b/HISTORY.asc @@ -1,5 +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. + == Rename `EXTENSION_VERSION_FILES` to `EXTENSION__CURRENT_VERSION__FILES` The old name implied it listed every version file for an extension; it actually only ever holds the current/most-recent one per extension. If your diff --git a/base.mk b/base.mk index 98e4e70..b45273b 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__CURRENT_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