Fix [install]check in interfaces/libpq/Makefile
authorAlvaro Herrera <[email protected]>
Fri, 22 Jul 2022 18:15:11 +0000 (20:15 +0200)
committerAlvaro Herrera <[email protected]>
Fri, 22 Jul 2022 18:15:11 +0000 (20:15 +0200)
The common recipe when TAP tests are disabled doesn't work, because the
libpq-specific recipe wants to define the PATH environment variable, so
the starting '@' is misinterpreted as part of the command instead of
silencing said command.

Fix by setting the environment variable in a way that doesn't interfere
with the recipe.

Reported-by: Justin Pryzby <[email protected]>
Discussion: https://postgr.es/m/20220720172321[email protected]

src/interfaces/libpq/Makefile

index b5fd72a4acf68975e93cb598a968e254d7b8d3d1..8abdb092c202c7818f4f41fd23fc3fa9ef418cb2 100644 (file)
@@ -143,11 +143,13 @@ install: all installdirs install-lib
 test-build:
    $(MAKE) -C test all
 
+check installcheck: export PATH := $(CURDIR)/test:$(PATH)
+
 check: test-build all
-   PATH="$(CURDIR)/test:$$PATH" && $(prove_check)
+   $(prove_check)
 
 installcheck: test-build all
-   PATH="$(CURDIR)/test:$$PATH" && $(prove_installcheck)
+   $(prove_installcheck)
 
 installdirs: installdirs-lib
    $(MKDIR_P) '$(DESTDIR)$(includedir)' '$(DESTDIR)$(includedir_internal)' '$(DESTDIR)$(datadir)'