summaryrefslogtreecommitdiff
path: root/src/makefiles/pgxs.mk
Commit message (Collapse)AuthorAgeFilesLines
* Link $(WIN32RES) into single-file modules only when PGFILEDESC is set.Noah Misch2015-08-051-1/+1
| | | | | | | | | | Commit 0ffc201a51395ca71fe429ef86c872850a5850ee included this object unconditionally. Being unprepared for that, most external, single-file modules failed to build. This better aligns the GNU make build system with the heuristic in the MSVC build's Project::AddDirResourceFile(). In-tree, installed modules set PGFILEDESC, so they will see no change. Also, under PGXS, omit the nonfunctioning rule to build win32ver.rc. Back-patch to 9.5, where the aforementioned commit first appeared.
* Consolidate makefile code for setting top_srcdir, srcdir and VPATH.Noah Misch2015-07-301-15/+0
| | | | | | | | | Responsibility was formerly split between Makefile.global and pgxs.mk. As a result of commit b58233c71b93a32fcab7219585cafc25a27eb769, in the PGXS case, these variables were unset while parsing Makefile.global and callees. Inclusion of Makefile.custom did not work from PGXS, and the subtle difference seemed like a recipe for future bugs. Back-patch to 9.4, where that commit first appeared.
* Fix parallel make risk with new check temp-install setupPeter Eisentraut2015-04-291-1/+1
| | | | | | | | | | | | | | | The "check" target no longer needs to depend on "all", because it now runs "install" directly, which in turn depends on "all". Doing both will cause problems with parallel make, because two builds will run next to each other. Also remove the redirection of the temp-install output into a log file. This was appropriate when this was done from within pg_regress, but now it's just a regular make run, and especially with the above changes this will now take the place of running the "all" target before the test suites. problem report by Jeff Janes, patch in part by Michael Paquier
* Don't overwrite EXTRA_INSTALLPeter Eisentraut2015-04-251-1/+1
| | | | | | | | The temp-install target sets EXTRA_INSTALL to install the current directory. But when doing so, it should append instead of overwrite, otherwise settings of EXTRA_INSTALL from a makefile won't take effect. This would cause the earthdistance test to fail when called directly, because it would miss installing the cube module.
* Improve speed of make check-worldPeter Eisentraut2015-04-231-4/+3
| | | | | | | | | | | | | | | Before, make check-world would create a new temporary installation for each test suite, which is slow and wasteful. Instead, we now create one test installation that is used by all test suites that are part of a make run. The management of the temporary installation is removed from pg_regress and handled in the makefiles. This allows for better control, and unifies the code with that of test suites not run through pg_regress. review and msvc support by Michael Paquier <michael.paquier@gmail.com> more review by Fabien Coelho <coelho@cri.ensmp.fr>
* Revert haphazard pgxs makefile changesPeter Eisentraut2014-12-041-25/+18
| | | | | | These changes were originally submitted as "adds support for VPATH with USE_PGXS", but they are not necessary for VPATH support, so they just add more lines of code for no reason.
* Remove USE_VPATH make variable from PGXSPeter Eisentraut2014-12-041-5/+4
| | | | | The user can just set VPATH directly. There is no need to invent another variable.
* Fix suggested layout for PGXS makefilePeter Eisentraut2014-11-191-1/+2
| | | | | | | Custom rules must come after pgxs inclusion, not before, because any rule added before pgxs will break the default 'all' target. Author: Cédric Villemain <cedric@2ndquadrant.fr>
* Add file version information to most installed Windows binaries.Noah Misch2014-07-141-1/+1
| | | | | | | | Prominent binaries already had this metadata. A handful of minor binaries, such as pg_regress.exe, still lack it; efforts to eliminate such exceptions are welcome. Michael Paquier, reviewed by MauMau.
* Ensure installation dirs are built before contents are installed (v2)Andrew Dunstan2013-09-301-6/+6
| | | | | | Push dependency on installdirs down to individual targets. Christoph Berg
* Ensure installation dirs are built before contents are installed.Andrew Dunstan2013-09-291-1/+1
| | | | Cédric Villemain
* Install all a Makefile's extension controls, not just the first.Andrew Dunstan2013-07-031-1/+1
| | | | | Bug introduced by commit 6697aa2bc25c83b88d6165340348a31328c35de6 and reported by Robert Haas.
* Improve support for building PGXS modules with VPATH.Andrew Dunstan2013-07-011-18/+38
| | | | | | | | | | | | | | A VPATH build will be performed when the module's make file path is not the current directory or when USE_VPATH is set. This will assist packagers and others who prefer to build without polluting the source directories. There is still a bit of work to do here, notably documentation, but it's probably a good idea to commit what we have so far and let people test it out on their modules. Cédric Villemain, with an addition from me.
* Make pgxs build executables with the right suffix.Andrew Dunstan2013-01-191-1/+1
| | | | | | | | | | | | | | | Complaint and patch from Zoltán Böszörményi. When cross-compiling, the native make doesn't know about the Windows .exe suffix, so it only builds with it when explicitly told to do so. The native make will not see the link between the target name and the built executable, and might this do unnecesary work, but that's a bigger problem than this one, if in fact we consider it a problem at all. Back-patch to all live branches.
* Add mode where contrib installcheck runs each module in a separately named ↵Andrew Dunstan2012-12-111-1/+5
| | | | | | | | | | | | | | | | | | | | | database. Normally each module is tested in a database named contrib_regression, which is dropped and recreated at the beginhning of each pg_regress run. This new mode, enabled by adding USE_MODULE_DB=1 to the make command line, runs most modules in a database with the module name embedded in it. This will make testing pg_upgrade on clusters with the contrib modules a lot easier. Second attempt at this, this time accomodating make versions older than 3.82. Still to be done: adapt to the MSVC build system. Backpatch to 9.0, which is the earliest version it is reasonably possible to test upgrading from.
* Revert "Add mode where contrib installcheck runs each module in a separately ↵Andrew Dunstan2012-12-031-5/+1
| | | | | | named database." This reverts commit e2b3c21b05c78c3a726b189242e41d4aa4422bf1.
* Add mode where contrib installcheck runs each module in a separately named ↵Andrew Dunstan2012-12-021-1/+5
| | | | | | | | | | | | | | | | | database. Normally each module is tested in aq database named contrib_regression, which is dropped and recreated at the beginhning of each pg_regress run. This mode, enabled by adding USE_MODULE_DB=1 to the make command line, runs most modules in a database with the module name embedded in it. This will make testing pg_upgrade on clusters with the contrib modules a lot easier. Still to be done: adapt to the MSVC build system. Backpatch to 9.0, which is the earliest version it is reasonably possible to test upgrading from.
* Make sure sharedir/extension/ directory is created when needed.Tom Lane2012-12-011-0/+3
| | | | | | | | | The previous coding worked as long as MODULEDIR wasn't set explicitly, because we create sharedir/$(datamoduledir) and the default value of that is "extension". But if some other value is specified for MODULEDIR then the installation directory needed for the control file wasn't made. Cédric Villemain
* pgxs: Supply default values for BISON and FLEX variablesPeter Eisentraut2012-03-301-0/+10
| | | | | | Otherwise, the availability of these variables depends on what happened to be available at the time the PostgreSQL build was configured.
* Add pg_upgrade test suitePeter Eisentraut2011-11-271-1/+1
| | | | | | | | It runs the regression tests, runs pg_upgrade on the populated database, and compares the before and after dumps. While not actually a cross-version upgrade, this does detect omissions and bugs in the involved tools from time to time. It's also possible to do a cross-version upgrade by manually supplying parameters.
* Fix pgxs.mk to always add --dbname=$(CONTRIB_TESTDB) to REGRESS_OPTS.Tom Lane2011-08-241-4/+3
| | | | | | | | | | | | | | The previous coding resulted in contrib modules unintentionally overriding the use of CONTRIB_TESTDB. There seems no particularly good reason to allow that (after all, the makefile can set CONTRIB_TESTDB if that's really what it intends). In passing, document REGRESS_OPTS where the other pgxs.mk options are documented. Back-patch to 9.1 --- in prior versions, there were no cases of contrib modules setting REGRESS_OPTS without including the --dbname switch, so while the coding was fragile there was no actual bug.
* Add some environment checks prior to sepgsql regression testing.Robert Haas2011-07-251-2/+2
| | | | | | This probably needs more work, but it's a start. KaiGai Kohei
* Rewrite installation makefile rules without for loopsPeter Eisentraut2011-05-021-28/+7
| | | | | | | | | | install-sh can install multiple files at once, so for loops are not necessary. This was already changed for the rest of the code some time ago, but pgxs.mk was apparently forgotten, and the obsolete coding style has now been copied to the PLs as well. This also fixes the problem that the for loops in question did not catch errors.
* Support "make check" in contribPeter Eisentraut2011-04-251-6/+7
| | | | | | | | | | | | | | Added a new option --extra-install to pg_regress to arrange installing the respective contrib directory into the temporary installation. This is currently not yet supported for Windows MSVC builds. Updated the .gitignore files for contrib modules to ignore the leftovers of a temp-install check run. Changed the exit status of "make check" in a pgxs build (which still does nothing) to 0 from 1. Added "make check" in contrib to top-level "make check-world".
* Allow make check in PL directoriesPeter Eisentraut2011-02-151-5/+3
| | | | | Also add make check-world target, and refactor pg_regress invocation code in makefiles a bit.
* Clean up installation directory choices for extensions.Tom Lane2011-02-111-10/+25
| | | | | | | | | | | | | | Arrange for the control files to be in $SHAREDIR/extension not $SHAREDIR/contrib, since we're generally trying to deprecate the term "contrib" and this is a once-in-many-moons opportunity to get rid of it in install paths. Fix PGXS to install the $EXTENSION file into that directory no matter what MODULEDIR is set to; a nondefault MODULEDIR should only affect the script and secondary extension files. Fix the control file directory parameter to be interpreted relative to $SHAREDIR, to avoid a surprising disconnect between how you specify that and what you set MODULEDIR to. Per discussion with David Wheeler.
* Core support for "extensions", which are packages of SQL objects.Tom Lane2011-02-081-11/+12
| | | | | | | | | | | | | This patch adds the server infrastructure to support extensions. There is still one significant loose end, namely how to make it play nice with pg_upgrade, so I am not yet committing the changes that would make all the contrib modules depend on this feature. In passing, fix a disturbingly large amount of breakage in AlterObjectNamespace() and callers. Dimitri Fontaine, reviewed by Anssi Kääriäinen, Itagaki Takahiro, Tom Lane, and numerous others
* Remove useless whitespace at end of linesPeter Eisentraut2010-11-231-1/+1
|
* Remove cvs keywords from all files.Magnus Hagander2010-09-201-1/+1
|
* Dept. of third thoughts: PG_LIBS may contain a -L switch, so it had betterTom Lane2010-07-051-2/+2
| | | | stay in front of LDFLAGS.
* Make sure LDFLAGS come before LIBS when linking contrib programs.Tom Lane2010-07-051-2/+2
| | | | | Solaris, at least, seems to be sensitive to the relative order of -L and -l switches, so this is needed. Per buildfarm results.
* Split the LDFLAGS make variable into two parts: LDFLAGS is now used forTom Lane2010-07-051-3/+2
| | | | | | | | | | | | | linking both executables and shared libraries, and we add on LDFLAGS_EX when linking executables or LDFLAGS_SL when linking shared libraries. This provides a significantly cleaner way of dealing with link-time switches than the former behavior. Also, make sure that the various platform-specific %.so: %.o rules incorporate LDFLAGS and LDFLAGS_SL; most of them missed that before. (I did not add these variables for the platforms that invoke $(LD) directly, however. It's not clear if we can do that safely, since for the most part we assume these variables use CC command-line syntax.) Per gripe from Aaron Swenson and subsequent investigation.
* Fix a few places where we needed -I. in CPPFLAGS to work properly inTom Lane2010-01-051-2/+2
| | | | VPATH builds. We had this already in several places, but not all.
* Improve PGXS makefile system to allow the module's makefile to specifyTom Lane2010-01-041-23/+31
| | | | | | | | where to install DATA and DOCS files. This is mainly intended to allow versioned installation, eg, install into contrib/fooM.N/ rather than directly into contrib/. Mark Cave-Ayland
* Update of install-sh, mkinstalldirs, and associated configuryPeter Eisentraut2009-08-261-6/+6
| | | | | | | | | | | | | | Update install-sh to that from Autoconf 2.63, plus our Darwin-specific changes (which I simplified a bit). install-sh is now able to install multiple files in one run, so we could simplify our makefiles sometime. install-sh also now has a -d option to create directories, so we don't need mkinstalldirs anymore. Use AC_PROG_MKDIR_P in configure.in, so we can use mkdir -p when available instead of install-sh -d. For consistency with the rest of the world, the corresponding make variable has been renamed from $(mkinstalldirs) to $(MKDIR_P).
* When calling unsupported "make check" with a pgxs module, return a nonzeroPeter Eisentraut2009-07-081-1/+2
| | | | exit code.
* Put back the copying of some of the regression test data files for vpathPeter Eisentraut2008-10-031-1/+18
| | | | builds. It is too complicated to fix in another way for now.
* Partial fix for contrib vpath breakage.Tom Lane2008-10-021-2/+2
|
* Allow pg_regress to be run outside the build tree. Look for input filesPeter Eisentraut2008-10-011-18/+1
| | | | in both input and output dir, to handle vpath builds more simply.
* Implement a few changes to how shared libraries and dynamically loadablePeter Eisentraut2008-04-071-12/+14
| | | | | | | | | | | | | | | modules are built. Foremost, it creates a solid distinction between these two types of targets based on what had already been implemented and duplicated in ad hoc ways before. Specifically, - Dynamically loadable modules no longer get a soname. The numbers previously set in the makefiles were dummy numbers anyway, and the presence of a soname upset a few packaging tools, so it is nicer not to have one. - The cumbersome detour taken on installation (build a libfoo.so.0.0.0 and then override the rule to install foo.so instead) is removed. - Lots of duplicated code simplified.
* Teach pgxs.mk and Install.pm how to install files from a contrib moduleTom Lane2007-10-161-1/+14
| | | | | into SHAREDIR/tsearch_data. Use this instead of ad-hoc coding in dict_xsyn/Makefile. Should fix current ContribCheck failures on MSVC.
* Fix PGXS conventions so that extensions can be built against PostgresTom Lane2007-06-261-2/+6
| | | | | | installations whose pg_config program does not appear first in the PATH. Per gripe from Eddie Stanley and subsequent discussions with Fabien Coelho and others.
* Ah, I finally realize why Magnus wanted to add a --bindir option toTom Lane2006-07-211-2/+5
| | | | | | | | | pg_regress: there's no other way to cope with testing a relocated installation. Seems better to call it --psqldir though, since the only thing we need to find in that case is psql. It'd be better if we could use find_other_exec, but that's not happening unless we are willing to install pg_regress alongside psql, which seems unlikely to happen.
* Rewrite pg_regress as a C program instead of a shell script.Tom Lane2006-07-191-4/+4
| | | | | | | This allows it to be used on Windows without installing mingw (though you do still need 'diff'), and opens the door to future improvements such as message localization. Magnus Hagander and Tom Lane.
* Allow installation into directories containing spaces in the name.Peter Eisentraut2005-12-091-24/+24
|
* Some marginal tweaks to make 'make installcheck' mostly work whenTom Lane2005-09-271-1/+8
| | | | | building contrib with USE_PGXS. To make it work all the way, the pg_regress script would need to be included in the installation tree.
* Fix this:Bruce Momjian2005-08-121-2/+6
| | | | | | | | | | | | $ ./configure --without-docdir .. $ cd contrib/pgstattuple/ $ make install mkdir -p -- /contrib mkdir: cannot create directory `/contrib': Permission denied make: *** [installdirs] Error 1 ISHIDA Akio
* Add a --dbname option to the pg_regress script, and use pl_regressionTom Lane2005-05-171-4/+4
| | | | | | for testing PLs and contrib_regression for testing contrib, instead of overwriting the core system's regression database as formerly done. Andrew Dunstan
* Remove gratuitous editorialization on rpath.Tom Lane2004-10-101-2/+1
|
* please find attached an alternate submission which addresses open itemBruce Momjian2004-10-061-2/+2
| | | | | | | | | | | | | "make pgxs install by default". It is up to the committers to chose. (1) there is only one "install" target. no more "install-all-headers". it simplifies/changes several makefiles. (2) the documentation reflects the change. (3) a minor fix on pgxs to use a nicer patch without a double slash. Fabien Coelho