summaryrefslogtreecommitdiff
path: root/src/pl/plpython/Makefile
diff options
context:
space:
mode:
authorPeter Eisentraut2011-02-28 16:41:10 +0000
committerPeter Eisentraut2011-02-28 16:41:10 +0000
commit474a42473adf9b18417242f1fc0691a857ec578b (patch)
tree427ce236377cc8c596f258924f6374d990be77e3 /src/pl/plpython/Makefile
parent0ef0b302040284a087c1bc90df5b115f0dea7764 (diff)
PL/Python custom SPI exceptions
This provides a separate exception class for each error code that the backend defines, as well as the ability to get the SQLSTATE from the exception object. Jan UrbaƄski, reviewed by Steve Singer
Diffstat (limited to 'src/pl/plpython/Makefile')
-rw-r--r--src/pl/plpython/Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/pl/plpython/Makefile b/src/pl/plpython/Makefile
index c72e1e300cd..8e3ebddf73a 100644
--- a/src/pl/plpython/Makefile
+++ b/src/pl/plpython/Makefile
@@ -88,9 +88,16 @@ PSQLDIR = $(bindir)
include $(top_srcdir)/src/Makefile.shlib
+# Force this dependency to be known even without dependency info built:
+plpython.o: spiexceptions.h
+
+spiexceptions.h: $(top_srcdir)/src/backend/utils/errcodes.txt generate-spiexceptions.pl
+ $(PERL) $(srcdir)/generate-spiexceptions.pl $< > $@
all: all-lib
+distprep: spiexceptions.h
+
install: all installdirs install-lib
ifeq ($(python_majorversion),2)
cd '$(DESTDIR)$(pkglibdir)' && rm -f plpython$(DLSUFFIX) && $(LN_S) $(shlib) plpython$(DLSUFFIX)
@@ -142,13 +149,16 @@ endif
submake:
$(MAKE) -C $(top_builddir)/src/test/regress pg_regress$(X)
-clean distclean maintainer-clean: clean-lib
+clean distclean: clean-lib
rm -f $(OBJS)
rm -rf $(pg_regress_clean_files)
ifeq ($(PORTNAME), win32)
rm -f python${pytverstr}.def
endif
+maintainer-clean: distclean
+ rm -f spiexceptions.h
+
else # can't build
all: