From 1fe69873ef712b124bd1aa311dc4fe55abfdcff5 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Wed, 7 Oct 2026 16:30:29 -0500 Subject: [PATCH] Fix `make test` failing when test/sql/ doesn't exist `installcheck` has an order-only prerequisite on `$(TESTDIR)/sql/`, but the rule that creates it was spelled `$(TESTDIR)/sql`. Make treats the two as different targets, so a project without a test/sql/ directory failed with "No rule to make target 'test/sql/', needed by 'installcheck'". setup.sh normally creates the directory, which hid this. The rule now uses the same trailing-slash spelling as the prerequisite and as its `test/expected/` and `results/` siblings. Related changes in pgxntool-test: - Add a `make -n installcheck` check against a TESTDIR with no sql/, expected/ or results/ directory Co-Authored-By: Claude Opus 5.5 --- HISTORY.asc | 6 ++++++ base.mk | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/HISTORY.asc b/HISTORY.asc index 2e99b76..073a9dd 100644 --- a/HISTORY.asc +++ b/HISTORY.asc @@ -1,5 +1,11 @@ STABLE ------ +== Fix `make test` failing when `test/sql/` doesn't exist +`installcheck` needs `test/sql/` to exist, but the rule that creates it was +spelled `test/sql` (no trailing slash), which Make treats as a different +target. A project without that directory got `No rule to make target +'test/sql/'`; it now gets created like `test/expected/` and `results/`. + == Add `make post-tag-version-bump` and `releasing-with-pgxntool.md` New target `post-tag-version-bump` sets each extension's `default_version` to a placeholder (`stable` by default) after a release, so later `make` diff --git a/base.mk b/base.mk index 8802012..5b158ea 100644 --- a/base.mk +++ b/base.mk @@ -658,7 +658,7 @@ print-pgtle: pgtle cat "$$f";) # These targets ensure all the relevant directories exist -$(TESTDIR)/sql $(TESTDIR)/expected/ $(TESTOUT)/results/: +$(TESTDIR)/sql/ $(TESTDIR)/expected/ $(TESTOUT)/results/: @mkdir -p $@ # pg_regress aborts with "could not open file" if an expected output file is # missing, so create empty placeholders for any test that lacks one.