summaryrefslogtreecommitdiff
path: root/src/test/examples/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Prevent accidental linking of system-supplied copies of libpq.so etc.Tom Lane2018-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were being careless in some places about the order of -L switches in link command lines, such that -L switches referring to external directories could come before those referring to directories within the build tree. This made it possible to accidentally link a system-supplied library, for example /usr/lib/libpq.so, in place of the one built in the build tree. Hilarity ensued, the more so the older the system-supplied library is. To fix, break LDFLAGS into two parts, a sub-variable LDFLAGS_INTERNAL and the main LDFLAGS variable, both of which are "recursively expanded" so that they can be incrementally adjusted by different makefiles. Establish a policy that -L switches for directories in the build tree must always be added to LDFLAGS_INTERNAL, while -L switches for external directories must always be added to LDFLAGS. This is sufficient to ensure a safe search order. For simplicity, we typically also put -l switches for the respective libraries into those same variables. (Traditional make usage would have us put -l switches into LIBS, but cleaning that up is a project for another day, as there's no clear need for it.) This turns out to also require separating SHLIB_LINK into two variables, SHLIB_LINK and SHLIB_LINK_INTERNAL, with a similar rule about which switches go into which variable. And likewise for PG_LIBS. Although this change might appear to affect external users of pgxs.mk, I think it doesn't; they shouldn't have any need to touch the _INTERNAL variables. In passing, tweak src/common/Makefile so that the value of CPPFLAGS recorded in pg_config lacks "-DFRONTEND" and the recorded value of LDFLAGS lacks "-L../../../src/common". Both of those things are mistakes, apparently introduced during prior code rearrangements, as old versions of pg_config don't print them. In general we don't want anything that's specific to the src/common subdirectory to appear in those outputs. This is certainly a bug fix, but in view of the lack of field complaints, I'm unsure whether it's worth the risk of back-patching. In any case it seems wise to see what the buildfarm makes of it first. Discussion: https://postgr.es/m/25214.1522604295@sss.pgh.pa.us
* Fix up .gitignore and cleanup actions in some src/test/ subdirectories.Tom Lane2015-04-241-2/+2
| | | | | | | | | | | | | | examples/, locale/, and thread/ lacked .gitignore files and were also not connected up to top-level "make clean" etc. This had escaped notice because none of those directories are built in normal scenarios. Still, they have working Makefiles, so if someone does a "make" in one of these directories it would be good if (a) git doesn't bleat about the product files and (b) cleaning up removes them. This is a longstanding oversight, but since this behavior is probably only of interest to developers, there seems no need for back-patching. Michael Paquier and Tom Lane
* Add API for 64-bit large object access. Now users can access up toTatsuo Ishii2012-10-071-1/+1
| | | | | | | | | | | | 4TB large objects (standard 8KB BLCKSZ case). For this purpose new libpq API lo_lseek64, lo_tell64 and lo_truncate64 are added. Also corresponding new backend functions lo_lseek64, lo_tell64 and lo_truncate64 are added. inv_api.c is changed to handle 64-bit offsets. Patch contributed by Nozomi Anzai (backend side) and Yugo Nagata (frontend side, docs, regression tests and example program). Reviewed by Kohei Kaigai. Committed by Tatsuo Ishii with minor editings.
* Remove useless whitespace at end of linesPeter Eisentraut2010-11-231-1/+1
|
* enable examples to compile on Windows. patch from Hiroshi Saito.Andrew Dunstan2009-12-311-0/+4
|
* Have libpgport link before libpq so that PG client applications are moreBruce Momjian2005-03-251-1/+1
| | | | immunte to changes in libpq's usage of pgport between major versions.
* Attaching -lpq to LDFLAGS doesn't work, because the generated commandTom Lane2003-09-201-1/+1
| | | | puts that before the .c file name.
* Bring the libpq example programs into the 21st century.Tom Lane2003-06-221-2/+1
|
* Make sure -L and -I's for our source tree are always before system includePeter Eisentraut2001-02-201-1/+1
| | | | or library directories on the command line.
* Remove testlo2.c --- there seems to be no difference between this andTom Lane2000-10-241-1/+1
| | | | testlo.c, except it's even skimpier on error checking :-(
* Add support for VPATH builds, that is, building somewhere else than in thePeter Eisentraut2000-10-201-6/+2
| | | | | | | | | source directory. This involves mostly makefiles using $(srcdir) when they might have used ".". (Regression tests don't work with this, yet.) Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS). Add "override" keyword in most places, to preserve necessary flags even when the user overrode the flags.
* Fix relative path references so that make knowns which dependencies referPeter Eisentraut2000-08-311-4/+5
| | | | | to one another. Sort out builddir vs srcdir variable namings. Remove some now obsoleted make variables.
* Remove fmgrstamp-h business -- not needed and confusingPeter Eisentraut2000-06-171-7/+0
| | | | | Add options to configure to automatically build for Kerberos support; no more editing of make files.
* Massive examples fix from Nicola BernardelliBruce Momjian1997-09-251-1/+2
|
* This commit represents a clean compile with the new templates underMarc G. Fournier1997-04-041-3/+3
| | | | | | | | | FreeBSD The Makefile(s) have all been cleaned up such that there is a single LDFLAGS vs LD_ADD or LDADD or LDFLAGS or LDFLAGS_BE. The Makefile(s) should be alot more straightforward then they were before...and consistent
* Eliminate MKDIR, srcdir, objdir. Centralize setting of LIBPQDIR.Bryan Henderson1996-11-131-1/+0
|
* End of the make file simplifications.Bryan Henderson1996-11-121-56/+11
|
* Rename CDEBUG to COPTBruce Momjian1996-11-041-4/+4
|
* Postgres95 1.01 Distribution - Virgin SourcesPG95-1_01Marc G. Fournier1996-07-091-0/+74