On 2021-May-19, Tom Lane wrote: > Peter Eisentraut <peter.eisentr...@enterprisedb.com> writes: > > On 10.05.21 20:26, Peter Eisentraut wrote: > >> The reason this is there is that the test suite uses PGXS to build the > >> test program, and so things get installed automatically. I suggest that > >> we should either write out the build system by hand to avoid this, or > >> maybe extend PGXS to support building programs but not installing them. > > > Here is a patch that implements the second solution, which turned out to > > be very easy.
Great, thank you. > +1, except that you should add documentation for NO_INSTALL to the > list of definable symbols at the head of pgxs.mk, and to the list > in extend.sgml (compare that for NO_INSTALLCHECK). I propose this. -- Álvaro Herrera Valdivia, Chile
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml index ec95b4eb01..1a4f208692 100644 --- a/doc/src/sgml/extend.sgml +++ b/doc/src/sgml/extend.sgml @@ -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> diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk index 271e7eaba8..224eac069c 100644 --- a/src/makefiles/pgxs.mk +++ b/src/makefiles/pgxs.mk @@ -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'