In a PGXS build, expect to find the postgres executable already installed,
authorTom Lane <[email protected]>
Fri, 17 Dec 2004 03:52:49 +0000 (03:52 +0000)
committerTom Lane <[email protected]>
Fri, 17 Dec 2004 03:52:49 +0000 (03:52 +0000)
rather than in $(top_builddir)/src/backend/postgres.  Sean Chittenden

src/makefiles/Makefile.beos
src/makefiles/Makefile.cygwin
src/makefiles/Makefile.darwin
src/makefiles/Makefile.win32

index 7c79bcecd9446c326ffbd0f13ea0a3180e791e36..83855f0cc3c272977f4ae7dccf806c7c2c8b3b56 100644 (file)
@@ -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
index f4d19bc7b0cc460816b86c0a9368788188eb1e35..3c5c7eb8d6ffdcc98618b1c0f308cbe5c224e102 100644 (file)
@@ -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
index cad692dc4cb834f0c089b503812ad01a716ea188..9d823a76a85ca61980fd8c856e5faf387ad24a84 100644 (file)
@@ -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
index cf2bec67207d3b897eaeb7fa12c4da25b75af09e..4482244813d47f7a3befb6a90b8a619f0fbffb83 100644 (file)
@@ -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