From: Tom Lane Date: Fri, 17 Dec 2004 03:52:49 +0000 (+0000) Subject: In a PGXS build, expect to find the postgres executable already installed, X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=be48aac04bb3f06a57a3b2062a52c38febbc0155;p=users%2Fbernd%2Fpostgres.git In a PGXS build, expect to find the postgres executable already installed, rather than in $(top_builddir)/src/backend/postgres. Sean Chittenden --- diff --git a/src/makefiles/Makefile.beos b/src/makefiles/Makefile.beos index 7c79bcecd9..83855f0cc3 100644 --- a/src/makefiles/Makefile.beos +++ b/src/makefiles/Makefile.beos @@ -9,7 +9,11 @@ DLSUFFIX = .so CFLAGS_SL = -fpic -DPIC %.so: %.o - ln -fs $(top_srcdir)/src/backend/postgres _APP_ +ifdef PGXS + ln -fs $(DESTDIR)$(bindir)/postgres _APP_ +else + ln -fs $(top_builddir)/src/backend/postgres _APP_ +endif $(CC) -nostart -Xlinker -soname=$@ -o $@ _APP_ $< sqlmansect = 7 diff --git a/src/makefiles/Makefile.cygwin b/src/makefiles/Makefile.cygwin index f4d19bc7b0..3c5c7eb8d6 100644 --- a/src/makefiles/Makefile.cygwin +++ b/src/makefiles/Makefile.cygwin @@ -1,7 +1,11 @@ # $PostgreSQL$ DLLTOOL= dlltool DLLWRAP= dllwrap +ifdef PGXS +BE_DLLLIBS= -L$(DESTDIR)$(bindir) -lpostgres +else BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres +endif DLLINIT = $(top_builddir)/src/utils/dllinit.o # linking with -lm or -lc causes program to crash diff --git a/src/makefiles/Makefile.darwin b/src/makefiles/Makefile.darwin index cad692dc4c..9d823a76a8 100644 --- a/src/makefiles/Makefile.darwin +++ b/src/makefiles/Makefile.darwin @@ -3,8 +3,13 @@ AWK= awk DLSUFFIX = .so CFLAGS_SL = + +ifdef PGXS +BE_DLLLIBS= -bundle_loader $(DESTDIR)$(bindir)/postgres +else BE_DLLLIBS= -bundle_loader $(top_builddir)/src/backend/postgres - +endif + # Rule for building shared libs (currently used only for regression test # shlib ... should go away, since this is not really enough knowledge) %.so: %.o diff --git a/src/makefiles/Makefile.win32 b/src/makefiles/Makefile.win32 index cf2bec6720..4482244813 100644 --- a/src/makefiles/Makefile.win32 +++ b/src/makefiles/Makefile.win32 @@ -5,7 +5,11 @@ override CPPFLAGS+="-I$(top_srcdir)/src/include/port/win32" DLLTOOL= dlltool DLLWRAP= dllwrap +ifdef PGXS +BE_DLLLIBS= -L$(DESTDIR)$(bindir) -lpostgres +else BE_DLLLIBS= -L$(top_builddir)/src/backend -lpostgres +endif DLLINIT = $(top_builddir)/src/utils/dllinit.o AROPT = crs