Commit Graph

130 Commits

Author SHA1 Message Date
Tom Lane 1568fa75bc Use single quotes in preference to double quotes for protecting pathnames.
Per recommendation from Peter.  Neither choice is bulletproof, but this
is the existing style and it does help prevent unexpected environment
variable substitution.
2011-06-15 21:45:23 -04:00
Tom Lane a61b6b7d18 Fix assorted issues with build and install paths containing spaces.
Apparently there is no buildfarm critter exercising this case after all,
because it fails in several places.  With this patch, build, install,
check-world, and installcheck-world pass for me on OS X.
2011-06-14 16:40:35 -04:00
Peter Eisentraut fc946c39ae Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
Peter Eisentraut 19e231bbda Improved parallel make support
Replace for loops in makefiles with proper dependencies.  Parallel
make can now span across directories.  Also, make -k and make -q work
properly.

GNU make 3.80 or newer is now required.
2010-11-12 22:15:16 +02:00
Magnus Hagander 9f2e211386 Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Tom Lane 8307b092b7 Still more third thoughts: when linking shared libraries, LDFLAGS probably
needs to appear before anything placed in SHLIB_LINK.  This is because
SHLIB_LINK is typically a subset of LIBS, and LIBS has to appear after
LDFLAGS on platforms that are sensitive to the relative order of -L and -l
switches.
2010-07-06 03:55:33 +00:00
Tom Lane 291a957745 Split the LDFLAGS make variable into two parts: LDFLAGS is now used for
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.
2010-07-05 18:54:38 +00:00
Peter Eisentraut 234c7ce9f2 Derived files that are shipped in the distribution used to be built in the
source directory even for out-of-tree builds.  They are now alsl built in
the build tree.  This should be more convenient for certain developers'
workflows, and shouldn't really break anything else.
2009-08-28 20:26:19 +00:00
Tom Lane 3d167209a7 Make the .DEF file generation rules safe against tabs in exports.txt.
Per bug #5016, although I think the MSVC build scripts may need a similar fix.
2009-08-27 17:55:53 +00:00
Peter Eisentraut 9d182ef002 Update of install-sh, mkinstalldirs, and associated configury
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).
2009-08-26 22:24:44 +00:00
Peter Eisentraut 26af72b46b Allow out-of-tree builds on mingw and cygwin
Author: Richard Evans <richard.evans@blueallegro.net>
2009-01-05 09:27:20 +00:00
Peter Eisentraut 218b4e8dd8 Append major version number and for libraries soname major version number
to the gettext domain name, to simplify parallel installations.

Also, rename set_text_domain() to pg_bindtextdomain(), because that is what
it does.
2008-12-11 07:34:09 +00:00
Peter Eisentraut 0884acbcab Move FAQ_AIX information to installation instructions.
The information on why the shared libraries are built the way they are
was not relevant to end users and has been made a mailing list archive
link in Makefile.shlib.
2008-11-24 11:59:37 +00:00
Peter Eisentraut 86ec73b909 Synchronize the shared object build rules in Makefile.port with Makefile.shlib
somewhat by adding CFLAGS where the compiler is used and Makefile.shlib
already used CFLAGS.
2008-09-01 08:50:10 +00:00
Peter Eisentraut db5f60cb18 On cygwin and win32, don't override the shlib name when building a module.
Should fix regression test failures on those platforms.
2008-04-08 09:50:29 +00:00
Peter Eisentraut 64e31b4f82 Always define stlib, since some platforms need it for building modules.
Should fix build failures on AIX.
2008-04-07 23:08:15 +00:00
Peter Eisentraut 46e76373ec Implement a few changes to how shared libraries and dynamically loadable
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.
2008-04-07 14:15:58 +00:00
Peter Eisentraut 9623b727da Don't build the win32 support files in the all target, only in distprep and
when they are actually needed as prerequisites.
2008-02-26 14:26:16 +00:00
Peter Eisentraut bdaf90b70f Reorganize some of the exports list generation code. It seems that this
has been reinvented about four different times throughout history (aix,
cygwin, win32, darwin/linux) and a lot of the concepts are actually shared,
which the code now shows better.
2008-02-26 10:45:24 +00:00
Peter Eisentraut 734a56ca2e Escape # character in variable assignment 2008-02-26 10:30:06 +00:00
Peter Eisentraut a1d5d85747 Refactor the code that creates the shared library export files to appear
only once in Makefile.shlib and not in four copies.
2008-02-26 06:41:24 +00:00
Bruce Momjian e152949ee2 Change $(CC) to $(COMPILER) on Solaris gcc so -m64 is passed into the
shared link line.
2007-02-20 22:45:57 +00:00
Tom Lane 733abd2987 Fix another erroneous =-for-:= substitution. 2007-02-11 19:31:45 +00:00
Peter Eisentraut c138b966d4 Replace useless uses of := by = in makefiles. 2007-02-09 15:56:00 +00:00
Peter Eisentraut fe733968ea Indent comments in makefiles better so they don't appear in the output. 2007-01-07 08:49:31 +00:00
Tom Lane 9b5e108ee9 Fix shared library creation to work properly on AIX. Albe Laurenz 2006-09-19 15:36:08 +00:00
Tom Lane 1e7bb2da57 Arrange to strip libpq.so of symbols that aren't officially supposed to
be exported on Linux and Darwin.  We already did this on Windows but
that's not enough, as evidenced by the fact that libecpg had an unexpected
dependency on one such symbol.  We should try to do it on more platforms.
Fix ecpg's oversight, and bump libpq's major .so version number to reflect
the unwanted but nonetheless real ABI break.
2006-04-28 02:53:20 +00:00
Tom Lane 04ca4caa81 Remove use of lorder and tsort while building static libraries. There's
no evidence that any currently-supported platform needs this, and good
reason to think that any platform that did need it couldn't use the static
libraries anyway --- libpq, at least, has circular references.  Removing
the code shuts up tsort warnings about the circular references on some
platforms.
2006-04-19 16:32:08 +00:00
Bruce Momjian 44f9021223 Remove BEOS port. 2006-01-05 03:01:38 +00:00
Bruce Momjian 12af9cdff4 Add support for Solaris x86_64 using Sun's compiler.
Pierre Girard
2005-12-30 21:43:41 +00:00
Peter Eisentraut a29c04a541 Allow installation into directories containing spaces in the name. 2005-12-09 21:19:36 +00:00
Tom Lane 6d4bcda38c Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX.
Per example from Dirk Pirschel.
2005-12-03 20:16:31 +00:00
Tom Lane a7de22d8d5 Clean up AIX build to avoid 'duplicate symbol' warnings, by moving use
of postgres.imp file into BE_DLLLIBS macro.  This makes the AIX build
work more like the Windows and Darwin builds, which have similar requirements
to mention a backend library when linking shared libraries that will be
dynamically loaded into the backend.
2005-10-28 17:32:22 +00:00
Tom Lane be27a20123 Cygwin no longer needs to hack SHLIB_LINK, now that Rocco Altier
fixed the contrib library inclusions properly.
2005-08-08 03:35:13 +00:00
Tom Lane 89439b8c4f Set shlib naming convention on Cygwin to 'cygFOO.dll', which appears
to be the platform standard.  This should fix recursive-rule breakage
due to recent Makefile changes.  Per discussion.
2005-08-07 19:02:08 +00:00
Tom Lane 0016911b5d Fix unwanted side-effects of recent SHLIB_LINK -L patch on existing
hacking of SHLIB_LINK for HPUX.
2005-07-13 17:00:44 +00:00
Bruce Momjian 5bced8f5cb Move -L flag around for shared builds:
I wrote:
> So either we code up some intelligence to put the "C" in the right
> position or we have to pass down "A B" and "D" separately from the
> main makefile.

The following patch might just do the former.  Please try it out.


Peter E.
2005-07-13 02:11:57 +00:00
Tom Lane b4363b7733 Hack around the discrepancy between default library search paths for
gcc and for HP's ld on HPUX.  There may be better ways to do this,
but this seems to work for me...
2005-07-12 23:06:48 +00:00
Bruce Momjian 7504f0bae8 Reverse this patch:
---------------------------------------------------------------------------

> A quick look shows that when you use --with-libraries=/foo/bar the
> generated link line for libraries says
>
>  -L/foo/bar -lpq
>
> and it should probably be the other way around (as it is for the
> executables).
>
> So I suspect we need some makefile tuning.

You were correct. This patch fixes it.

Jim C. Nasby
2005-07-04 04:17:00 +00:00
Bruce Momjian 16661d60ab > A quick look shows that when you use --with-libraries=/foo/bar the
> generated link line for libraries says
>
>  -L/foo/bar -lpq
>
> and it should probably be the other way around (as it is for the
> executables).
>
> So I suspect we need some makefile tuning.

You were correct. This patch fixes it.

Jim C. Nasby
2005-07-02 23:28:22 +00:00
Tom Lane a34d76ef65 Fix up makefile dependencies for pg_config_paths.h. 2004-11-20 21:13:06 +00:00
Tom Lane 8e57975219 Clean up rpath handling for HPUX --- we can't use the cc-style rpath
switch syntax when calling ld directly.
2004-11-19 21:27:42 +00:00
Tom Lane 86b5545260 Adjust SHLIB_LINK for cygwin case.
Reini Urban
2004-11-17 17:08:15 +00:00
Tom Lane bb85f1b9b1 Suppress duplicate rules for lib$(NAME).a on WIN32 and Cygwin.
Andrew Dunstan
2004-11-16 21:51:13 +00:00
Bruce Momjian c7add816f5 Export only required symbols in libpq on Win32.
Magnus Hagander
2004-10-16 03:26:43 +00:00
Bruce Momjian 4d94e99b90 > This lets you do something like:
>
>    ./configure LDFLAGS=-static-libgcc LDFLAGS_SL=-static-libgcc
>
> to produce binaries that do not depend on libgcc_s.so at all.

Oliver Jowett
2004-10-15 05:11:00 +00:00
Bruce Momjian 4855d7ebe4 Allow compiles for Cygwin /contrib modules.
Reini Urban
2004-10-13 10:20:04 +00:00
Bruce Momjian ae1703d897 Enable static lib builds on Win32 and Cygwin. 2004-10-13 09:51:47 +00:00
Bruce Momjian bac78bbac6 Update Cygwin build to not use DLLINIT, per Cygwin report from Reini
Urban
2004-10-12 22:20:17 +00:00
Neil Conway 0b112045b7 Fix vpath build break, induced by Bruce's recent commit. 2004-10-12 04:48:36 +00:00