Skip to content

Commit

Permalink
Add NO_INSTALL option to pgxs
Browse files Browse the repository at this point in the history
Apply in libpq_pipeline test makefile, so that the test file is not
installed into tmp_install.

Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/cb9d16a6-760f-cd44-28d6-b091d5fb6ca7%40enterprisedb.com
  • Loading branch information
petere committed May 27, 2021
1 parent 0251106 commit 6abc8c2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/src/sgml/extend.sgml
Expand Up @@ -1672,6 +1672,16 @@ include $(PGXS)
</listitem>
</varlistentry>

<varlistentry>
<term><varname>NO_INSTALL</varname></term>
<listitem>
<para>
don't define an <literal>install</literal> target, useful for test
modules that don't need their build products to be installed
</para>
</listitem>
</varlistentry>

<varlistentry>
<term><varname>NO_INSTALLCHECK</varname></term>
<listitem>
Expand Down
13 changes: 13 additions & 0 deletions src/makefiles/pgxs.mk
Expand Up @@ -49,6 +49,8 @@
# TAP_TESTS -- switch to enable TAP tests
# ISOLATION -- list of isolation test cases
# ISOLATION_OPTS -- additional switches to pass to pg_isolation_regress
# NO_INSTALL -- don't define an install target, useful for test modules
# that don't need their build products to be installed
# NO_INSTALLCHECK -- don't define an installcheck target, useful e.g. if
# tests require special configuration, or don't use pg_regress
# EXTRA_CLEAN -- extra files to remove in 'make clean'
Expand Down Expand Up @@ -227,6 +229,8 @@ all: all-lib
endif # MODULE_big


ifndef NO_INSTALL

install: all installdirs
ifneq (,$(EXTENSION))
$(INSTALL_DATA) $(addprefix $(srcdir)/, $(addsuffix .control, $(EXTENSION))) '$(DESTDIR)$(datadir)/extension/'
Expand Down Expand Up @@ -336,6 +340,15 @@ endif # with_llvm
uninstall: uninstall-lib
endif # MODULE_big

else # NO_INSTALL

# Need this so that temp-install builds artifacts not meant for
# installation (Normally, check should depend on all, but we don't do
# that because of parallel make risk (dbf2ec1a1c0).)
install: all

endif # NO_INSTALL


clean:
ifdef MODULES
Expand Down
2 changes: 2 additions & 0 deletions src/test/modules/libpq_pipeline/Makefile
Expand Up @@ -3,6 +3,8 @@
PROGRAM = libpq_pipeline
OBJS = libpq_pipeline.o

NO_INSTALL = 1

PG_CPPFLAGS = -I$(libpq_srcdir)
PG_LIBS_INTERNAL += $(libpq_pgport)

Expand Down

0 comments on commit 6abc8c2

Please sign in to comment.