Skip to content

Commit 26af72b

Browse files
committed
Allow out-of-tree builds on mingw and cygwin
Author: Richard Evans <richard.evans@blueallegro.net>
1 parent 901d419 commit 26af72b

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

src/Makefile.shlib

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Copyright (c) 1998, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.119 2008/12/11 07:34:07 petere Exp $
9+
# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.120 2009/01/05 09:27:19 petere Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

@@ -406,15 +406,16 @@ else # PORTNAME == cygwin || PORTNAME == win32
406406

407407
# Cygwin or Win32 case
408408

409-
DLL_DEFFILE = lib$(NAME)dll.def
410-
411409
# If SHLIB_EXPORTS is set, the rules below will build a .def file from
412410
# that. Else we build a temporary one here.
413411
ifeq (,$(SHLIB_EXPORTS))
412+
DLL_DEFFILE = lib$(NAME)dll.def
414413
exports_file = $(DLL_DEFFILE)
415414

416415
$(exports_file): $(OBJS)
417416
$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $@ $^
417+
else
418+
DLL_DEFFILE = $(srcdir)/lib$(NAME)dll.def
418419
endif
419420

420421
$(shlib): $(OBJS) $(DLL_DEFFILE)

src/bin/pgevent/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ all: $(NAME)
2121

2222
install: all install-lib
2323

24-
pgevent.dll: $(OBJS) pgevent.def
25-
$(DLLWRAP) --def pgevent.def -o $(NAME) $(OBJS)
24+
pgevent.dll: pgevent.def $(OBJS)
25+
$(DLLWRAP) --def $< -o $(NAME) $(OBJS)
2626

2727
pgmsgevent.o: pgmsgevent.rc win32ver.rc
28-
$(WINDRES) pgmsgevent.rc -o pgmsgevent.o --include-dir=$(top_builddir)/src/include
28+
$(WINDRES) $< -o $@ --include-dir=$(top_builddir)/src/include --include-dir=$(top_srcdir)/src/include --include-dir=$(srcdir)
2929

3030
all-lib: $(NAME)
3131

src/interfaces/libpq/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.172 2009/01/01 17:24:03 momjian Exp $
8+
# $PostgreSQL: pgsql/src/interfaces/libpq/Makefile,v 1.173 2009/01/05 09:27:19 petere Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -19,7 +19,7 @@ NAME= pq
1919
SO_MAJOR_VERSION= 5
2020
SO_MINOR_VERSION= 2
2121

22-
override CPPFLAGS := -DFRONTEND -DUNSAFE_STAT_OK -I$(srcdir) $(CPPFLAGS) -I$(top_builddir)/src/port
22+
override CPPFLAGS := -DFRONTEND -DUNSAFE_STAT_OK -I$(srcdir) $(CPPFLAGS) -I$(top_builddir)/src/port -I$(top_srcdir)/src/port
2323
ifneq ($(PORTNAME), win32)
2424
override CFLAGS += $(PTHREAD_CFLAGS)
2525
endif

src/makefiles/Makefile.win32

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $PostgreSQL: pgsql/src/makefiles/Makefile.win32,v 1.12 2008/12/07 08:36:22 petere Exp $
1+
# $PostgreSQL: pgsql/src/makefiles/Makefile.win32,v 1.13 2009/01/05 09:27:20 petere Exp $
22

33
# Use replacement include files for those missing on Win32
44
override CPPFLAGS+="-I$(top_srcdir)/src/include/port/win32"
@@ -67,4 +67,4 @@ win32ver.rc: $(top_srcdir)/src/port/win32ver.rc
6767
sed -e 's;FILEDESC;$(PGFILEDESC);' -e 's;VFT_APP;$(PGFTYPE);' -e 's;_ICO_;$(PGICOSTR);' -e 's;\(VERSION.*\),0 *$$;\1,'`date '+%y%j' | sed 's/^0*//'`';' $< >$@
6868

6969
win32ver.o: win32ver.rc
70-
$(WINDRES) -i $< -o $@ --include-dir=$(top_builddir)/src/include
70+
$(WINDRES) -i $< -o $@ --include-dir=$(top_builddir)/src/include --include-dir=$(srcdir)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy