BUG #5351: compiling with --disable-shared is broken (patch included) - Mailing list pgsql-bugs

From Jonas Lund
Subject BUG #5351: compiling with --disable-shared is broken (patch included)
Date
Msg-id 201002282241.o1SMfYDv051128@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5351: compiling with --disable-shared is broken (patch included)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5351
Logged by:          Jonas Lund
Email address:      whizzter@gmail.com
PostgreSQL version: 8.4.2 (+others)
Operating system:   FreeBSD (generic problem)
Description:        compiling with --disable-shared is broken (patch
included)
Details:

I'm compiling with "--disable-shared" on 8.4.2 (worked with 8.3.1) and it
fails with:

gmake[3]: *** No rule to make target `libpq.so.5', needed by
`all-shared-lib'.

When examining Makefile.shlib i noticed that an ifeq clause had been
narrowed down in the file between 8.3.1 and 8.4.2 and now missed a bunch of
"secondary clauses" declaring the "shlib" variable and thus activating the:

all-shared-lib: $(shlib)

makefile rule EVEN IF --disable-shared is enabled and thus not making the
libfile.

This following patch disables those clauses:
------------------------------------------------------
--- Makefile.shlib.orig    2010-02-28 23:15:15.877364960 +0100
+++ Makefile.shlib    2010-02-28 23:08:28.631839830 +0100
@@ -120,6 +120,8 @@
 override CPPFLAGS += -DSO_MAJOR_VERSION=$(SO_MAJOR_VERSION)
 endif

+ifeq ($(enable_shared), yes)
+
 ifeq ($(PORTNAME), aix)
   ifdef SO_MAJOR_VERSION
     shlib        = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
@@ -332,6 +334,8 @@
 endif


+endif
+

 ##
 ## BUILD

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: possible bug not in open items
Next
From: Tom Lane
Date:
Subject: Re: BUG #5351: compiling with --disable-shared is broken (patch included)