]> granicus.if.org Git - postgis/commitdiff
Building in non-standard location now requires the PGSQL_SRC environment
authorPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 26 Jun 2001 23:57:10 +0000 (23:57 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Tue, 26 Jun 2001 23:57:10 +0000 (23:57 +0000)
variable to be set and installs in the build location.

git-svn-id: http://svn.osgeo.org/postgis/trunk@8 b70326c6-7e19-0410-871a-916f4a2858ee

Makefile

index ec8a8c99ee2932fde206d45ace725957dc1c0cab..0c3a10f189bc5bf716d5f79975e2c1cdfa5d26a1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -4,16 +4,18 @@
 subdir = contrib/postgis
 
 # Root of the pgsql source tree 
-#top_builddir = ../..
-top_builddir = /data3/postgresql-7.1.2/src
+ifneq (${PGSQL_SRC},"") 
+       top_builddir = ${PGSQL_SRC}
+       installlibdir = ${PWD}
+else
+       top_builddir = ../..
+       installlibdir = $(libdir)/contrib
+endif
 
 include $(top_builddir)/src/Makefile.global
 
 test_db = geom_regress
 
-# override libdir to install shlib in contrib not main directory
-libdir := $(libdir)/contrib
-
 # shared library parameters
 NAME=postgis
 SO_MAJOR_VERSION=0
@@ -36,18 +38,16 @@ all: all-lib $(NAME).sql
 # Shared library stuff
 include $(top_srcdir)/src/Makefile.shlib
 
-#$(NAME).sql: $(NAME).sql.in
-#      sed -e 's:@MODULE_FILENAME@:$(libdir)/$(shlib):g' < $< > $@
-
 $(NAME).sql: $(NAME).sql.in
-       sed -e 's:@MODULE_FILENAME@:/data1/Refractions/Projects/PostGIS/work_dave/postgis/$(shlib):g' < $< > $@
+       sed -e 's:@MODULE_FILENAME@:$(installlibdir)/$(shlib):g' < $< > $@
+
 
 install: all installdirs install-lib
        $(INSTALL_DATA) $(srcdir)/README.$(NAME)  $(docdir)/contrib
        $(INSTALL_DATA) $(NAME).sql $(datadir)/contrib
 
 installdirs:
-       $(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(libdir)
+       $(mkinstalldirs) $(docdir)/contrib $(datadir)/contrib $(installlibdir)
 
 uninstall: uninstall-lib
        @rm -f $(docdir)/contrib/README.$(NAME) $(datadir)/contrib/$(NAME).sql