aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2014-02-14 11:31:35 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2014-02-14 11:31:35 -0500
commita7983e989d9cafc9cef49becfee054e34b1ed9b4 (patch)
tree2a8696f392e96b2b08485e79031477d0cb2672b7 /src
parent4d894b41cd12179b710526eba9dc62c2b99abc4d (diff)
downloadpostgresql-a7983e989d9cafc9cef49becfee054e34b1ed9b4.tar.gz
postgresql-a7983e989d9cafc9cef49becfee054e34b1ed9b4.zip
Cosmetic improvements in plpython's make rule for libpython import library.
This build technique is remarkably ugly, but that doesn't mean it has to be unreadable too. Be a bit more liberal with the vertical whitespace, and give the .def file a proper dependency, just in case.
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpython/Makefile15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/pl/plpython/Makefile b/src/pl/plpython/Makefile
index 3fe8e4a7d34..46d2030d698 100644
--- a/src/pl/plpython/Makefile
+++ b/src/pl/plpython/Makefile
@@ -61,14 +61,19 @@ endif
# which are not compatible with mingw gcc. Therefore we need to build a
# new import library to link with.
ifeq ($(PORTNAME), win32)
+
pytverstr=$(subst .,,${python_version})
+PYTHONDLL=$(subst \,/,$(WINDIR))/system32/python${pytverstr}.dll
+
OBJS += libpython${pytverstr}.a
+
libpython${pytverstr}.a: python${pytverstr}.def
- dlltool --dllname python${pytverstr}.dll --def python${pytverstr}.def --output-lib libpython${pytverstr}.a
-WD=$(subst \,/,$(WINDIR))
-python${pytverstr}.def:
- pexports $(WD)/system32/python${pytverstr}.dll > python${pytverstr}.def
-endif
+ dlltool --dllname python${pytverstr}.dll --def python${pytverstr}.def --output-lib libpython${pytverstr}.a
+
+python${pytverstr}.def: $(PYTHONDLL)
+ pexports $^ > $@
+
+endif # win32
SHLIB_LINK = $(python_libspec) $(python_additional_libs) $(filter -lintl,$(LIBS))