From b9ba27ce6ef60fa05c21bc98dba12e8e22563d05 Mon Sep 17 00:00:00 2001 From: Andre Mikulec Date: Sun, 4 Aug 2024 07:37:43 -0400 Subject: [PATCH] fix Makefile.txt -> Makefile --- Makefile | 4 +-- Makefile.txt | 93 ---------------------------------------------------- 2 files changed, 2 insertions(+), 95 deletions(-) delete mode 100644 Makefile.txt diff --git a/Makefile b/Makefile index 03526e3..1069471 100755 --- a/Makefile +++ b/Makefile @@ -22,8 +22,8 @@ PG_CPPFLAGS += $(r_includespec) SRCS += plr.c pg_conversion.c pg_backend_support.c pg_userfuncs.c pg_rsupport.c OBJS := $(SRCS:.c=.o) SHLIB_LINK += -L$(r_libdir1x) -L$(r_libdir2x) -lR -DATA = plr--8.4.6.sql plr--unpackaged--8.4.6.sql plr--8.3.0.18--8.4.sql plr--8.4.1--8.4.2.sql plr--8.4.3--8.4.4.sql \ -plr--8.4--8.4.1.sql plr--8.4.2--8.4.3.sql plr--8.4.4--8.4.5.sql plr--8.4.5--8.4.6.sql +DATA = plr--8.4.7.sql plr--unpackaged--8.4.7.sql plr--8.3.0.18--8.4.sql plr--8.4.1--8.4.2.sql plr--8.4.3--8.4.4.sql \ +plr--8.4--8.4.1.sql plr--8.4.2--8.4.3.sql plr--8.4.4--8.4.5.sql plr--8.4.5--8.4.6.sql plr--8.4.6--8.4.7.sql REGRESS = plr bad_fun opt_window do out_args plr_transaction opt_window_frame ifdef USE_PGXS diff --git a/Makefile.txt b/Makefile.txt deleted file mode 100644 index 1069471..0000000 --- a/Makefile.txt +++ /dev/null @@ -1,93 +0,0 @@ -# location of R library - -ifdef R_HOME -r_libdir1x = ${R_HOME}/bin${R_ARCH} -r_libdir2x = ${R_HOME}/lib${R_ARCH} -# location of R includes -r_includespec = -I${R_HOME}/include -rhomedef = ${R_HOME} -else -R_HOME := $(shell pkg-config --variable=rhome libR) -r_libdir1x := $(shell pkg-config --variable=rlibdir libR) -r_libdir2x := $(shell pkg-config --variable=rlibdir libR) -r_includespec := $(shell pkg-config --cflags-only-I libR) -rhomedef := $(shell pkg-config --variable=rhome libR) -endif - -ifneq (,${R_HOME}) - -EXTENSION = plr -MODULE_big = plr -PG_CPPFLAGS += $(r_includespec) -SRCS += plr.c pg_conversion.c pg_backend_support.c pg_userfuncs.c pg_rsupport.c -OBJS := $(SRCS:.c=.o) -SHLIB_LINK += -L$(r_libdir1x) -L$(r_libdir2x) -lR -DATA = plr--8.4.7.sql plr--unpackaged--8.4.7.sql plr--8.3.0.18--8.4.sql plr--8.4.1--8.4.2.sql plr--8.4.3--8.4.4.sql \ -plr--8.4--8.4.1.sql plr--8.4.2--8.4.3.sql plr--8.4.4--8.4.5.sql plr--8.4.5--8.4.6.sql plr--8.4.6--8.4.7.sql -REGRESS = plr bad_fun opt_window do out_args plr_transaction opt_window_frame - -ifdef USE_PGXS -ifndef PG_CONFIG -PG_CONFIG := pg_config -endif -PGXS := $(shell $(PG_CONFIG) --pgxs) -include $(PGXS) -else -subdir = contrib/plr -top_builddir = ../.. -include $(top_builddir)/src/Makefile.global -include $(top_srcdir)/contrib/contrib-global.mk -endif - -ifeq ($(PORTNAME), darwin) - DYSUFFIX = dylib - DLPREFIX = libR -else - ifeq ($(PORTNAME), win32) - DLPREFIX = R - else - DLPREFIX = libR - endif -endif - -# we can only build PL/R if libR is available -# Since there is no official way to determine this, -# we see if there is a file that is named like a shared library. -ifneq ($(PORTNAME), darwin) - ifneq (,$(wildcard $(r_libdir1x)/$(DLPREFIX)*$(DLSUFFIX)*)$(wildcard $(r_libdir2x)/$(DLPREFIX)*$(DLSUFFIX)*)) - shared_libr = yes; - endif -else - ifneq (,$(wildcard $(r_libdir1x)/$(DLPREFIX)*$(DYSUFFIX)*)$(wildcard $(r_libdir2x)/$(DLPREFIX)*$(DYSUFFIX)*)) - shared_libr = yes - endif -endif - -# If we don't have a shared library and the platform doesn't allow it -# to work without, we have to skip it. -ifneq (,$(findstring yes, $(shared_libr)$(allow_nonpic_in_shlib))) - -override CPPFLAGS := -I"$(srcdir)" -I"$(r_includespec)" $(CPPFLAGS) -override CPPFLAGS += -DPKGLIBDIR=\"$(pkglibdir)\" -DDLSUFFIX=\"$(DLSUFFIX)\" -override CPPFLAGS += -DR_HOME_DEFAULT=\"$(rhomedef)\" - -else # can't build - -all: - @echo ""; \ - echo "*** Cannot build PL/R because libR is not a shared library." ; \ - echo "*** You might have to rebuild your R installation. Refer to"; \ - echo "*** the documentation for details."; \ - echo "" - -endif # can't build - cannot find libR - -else # can't build - no R_HOME - -all: - @echo ""; \ - echo "*** Cannot build PL/R because R_HOME cannot be found." ; \ - echo "*** Refer to the documentation for details."; \ - echo "" - -endif