From 92ec50854ac6e7c057807ac65f58e32ae5eda962 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Wed, 26 Jun 2002 18:25:11 +0000 Subject: [PATCH] Cygwin fixes to the install target to provide .exe extensions. git-svn-id: http://svn.osgeo.org/postgis/trunk@169 b70326c6-7e19-0410-871a-916f4a2858ee --- loader/Makefile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/loader/Makefile b/loader/Makefile index ed474a3c9..340a7ea5d 100644 --- a/loader/Makefile +++ b/loader/Makefile @@ -1,7 +1,14 @@ # # PostGIS Loader Makefile # +SHELL = /bin/sh + subdir = contrib/postgis/loader +EXE = + +ifeq ($(findstring CYGWIN,$(shell uname)),CYGWIN) + EXE = .exe +endif # Root of the pgsql source tree ifeq (${PGSQL_SRC},) @@ -18,18 +25,18 @@ OBJS = shpopen.o dbfopen.o getopt.o override CPPFLAGS := -g -I$(srcdir) -I$(top_builddir)/src/interfaces/libpq $(CPPFLAGS) -DFRONTEND -DSYSCONFDIR='"$(sysconfdir)"' -all: shp2pgsql pgsql2shp +all: shp2pgsql$(EXE) pgsql2shp$(EXE) -pgsql2shp: $(OBJS) pgsql2shp.o +pgsql2shp$(EXE): $(OBJS) pgsql2shp.o $(CC) $(CFLAGS) $(OBJS) pgsql2shp.o $(libpq) $(LDFLAGS) $(LIBS) -o $@ -shp2pgsql: $(OBJS) shp2pgsql.o +shp2pgsql$(EXE): $(OBJS) shp2pgsql.o $(CC) $(CFLAGS) $(OBJS) shp2pgsql.o $(libpq) $(LDFLAGS) $(LIBS) -o $@ install: all - $(INSTALL_PROGRAM) pgsql2shp $(bindir) - $(INSTALL_PROGRAM) shp2pgsql $(bindir) + $(INSTALL_PROGRAM) pgsql2shp$(EXE) $(bindir)/pgsql2shp$(EXE) + $(INSTALL_PROGRAM) shp2pgsql$(EXE) $(bindir)/shp2pgsql$(EXE) clean: - @rm -f $(OBJS) shp2pgsql.o pgsql2shp.o shp2pgsql pgsql2shp + @rm -f $(OBJS) shp2pgsql.o pgsql2shp.o shp2pgsql$(EXE) pgsql2shp$(EXE) -- 2.40.0